autopep8 cleanup of Examples/python whitespace
automated cleanup only of the Examples/python example code
This commit is contained in:
parent
9086eb351c
commit
7770715457
40 changed files with 264 additions and 323 deletions
|
|
@ -1,13 +1,13 @@
|
|||
# file: runme.py
|
||||
|
||||
import sys
|
||||
import example
|
||||
import example
|
||||
|
||||
# Call printf
|
||||
example.printf("Hello World. I'm printf\n")
|
||||
|
||||
# Note: We call printf, but use *python* string formatting
|
||||
for i in range(0,10):
|
||||
for i in range(0, 10):
|
||||
example.printf("i is %d\n" % i)
|
||||
|
||||
# This will probably be garbled because %d is interpreted by C
|
||||
|
|
@ -15,21 +15,13 @@ example.printf("The value is %d\n")
|
|||
|
||||
stdout = example.stdout_stream()
|
||||
# Call fprintf
|
||||
example.fprintf(stdout,"Hello World. I'm fprintf\n")
|
||||
for i in range(0,10):
|
||||
example.fprintf(stdout,"i is %d\n" % i)
|
||||
example.fprintf(stdout, "Hello World. I'm fprintf\n")
|
||||
for i in range(0, 10):
|
||||
example.fprintf(stdout, "i is %d\n" % i)
|
||||
|
||||
# This won't be garbled since %d is not interpreted
|
||||
example.fprintf(stdout,"The value is %d\n")
|
||||
example.fprintf(stdout, "The value is %d\n")
|
||||
|
||||
# This function calls our NULL-terminated function
|
||||
|
||||
example.printv("Hello","World","this","is","a","test.")
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
example.printv("Hello", "World", "this", "is", "a", "test.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue