Line | |
---|
1 | import sys
|
---|
2 | from typing import List
|
---|
3 |
|
---|
4 |
|
---|
5 | class PrintStreamExample:
|
---|
6 | '''
|
---|
7 | Test for PrintStream. Uses several variants of print/println TODO also test
|
---|
8 | the other functions: write, append, printf, format etc
|
---|
9 | '''
|
---|
10 | @staticmethod
|
---|
11 | def main(args:List[str]) -> None:
|
---|
12 | '''
|
---|
13 |
|
---|
14 | @param args the arguments of the call.
|
---|
15 | '''
|
---|
16 | sys.stdout.write("H")
|
---|
17 | sys.stdout.write("e")
|
---|
18 | sys.stdout.write(str(1))
|
---|
19 | sys.stdout.write(str(1.0))
|
---|
20 | sys.stdout.write(str(True))
|
---|
21 | sys.stdout.write('\n')
|
---|
22 | sys.stdout.write( (''.join(["b","y","e"]))+'\n')
|
---|
23 |
|
---|
24 | if __name__ == "__main__":
|
---|
25 | PrintStreamExample.main(sys.argv[1:])
|
---|
Note:
See
TracBrowser
for help on using the repository browser.