autopep8 cleanup of Examples/python whitespace

automated cleanup only of the Examples/python example code
This commit is contained in:
Jon Schlueter 2015-05-08 08:33:29 -04:00
commit 7770715457
40 changed files with 264 additions and 323 deletions

View file

@ -2,8 +2,9 @@ import sys
sys.path.append('..')
import harness
def proc (mod) :
for i in range(1000000) :
def proc(mod):
for i in range(1000000):
x = mod.MyClass()
harness.run(proc)

View file

@ -2,9 +2,10 @@ import sys
sys.path.append('..')
import harness
def proc (mod) :
def proc(mod):
x = mod.MyClass()
for i in range(10000000) :
for i in range(10000000):
x.func()
harness.run(proc)

View file

@ -3,9 +3,10 @@ import time
import imp
from subprocess import *
def run (proc) :
try :
def run(proc):
try:
mod = imp.find_module(sys.argv[1])
mod = imp.load_module(sys.argv[1], *mod)
@ -14,15 +15,18 @@ def run (proc) :
t2 = time.clock()
print "%s took %f seconds" % (mod.__name__, t2 - t1)
except IndexError :
proc = Popen([sys.executable, 'runme.py', 'Simple_baseline'], stdout=PIPE)
except IndexError:
proc = Popen(
[sys.executable, 'runme.py', 'Simple_baseline'], stdout=PIPE)
(stdout, stderr) = proc.communicate()
print stdout
proc = Popen([sys.executable, 'runme.py', 'Simple_optimized'], stdout=PIPE)
proc = Popen(
[sys.executable, 'runme.py', 'Simple_optimized'], stdout=PIPE)
(stdout, stderr) = proc.communicate()
print stdout
proc = Popen([sys.executable, 'runme.py', 'Simple_builtin'], stdout=PIPE)
proc = Popen(
[sys.executable, 'runme.py', 'Simple_builtin'], stdout=PIPE)
(stdout, stderr) = proc.communicate()
print stdout

View file

@ -2,9 +2,10 @@ import sys
sys.path.append('..')
import harness
def proc (mod) :
def proc(mod):
x = mod.H()
for i in range(10000000) :
for i in range(10000000):
x.func()
harness.run(proc)

View file

@ -2,9 +2,10 @@ import sys
sys.path.append('..')
import harness
def proc (mod) :
def proc(mod):
x = mod.H()
for i in range(10000000) :
for i in range(10000000):
x += i
harness.run(proc)

View file

@ -2,9 +2,10 @@ import sys
sys.path.append('..')
import harness
def proc (mod) :
def proc(mod):
x = mod.MyClass()
for i in range(10000000) :
for i in range(10000000):
x = x + i
harness.run(proc)