source: java2python/core/test/testcode/PrintStreamExample.py@ 484

Last change on this file since 484 was 473, checked in by wouter, 18 months ago

#126 Added CommentBlock to clean up the messy comment handling code.

File size: 587 bytes
Line 
1import sys
2from typing import List
3
4
5class 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
24if __name__ == "__main__":
25 PrintStreamExample.main(sys.argv[1:])
Note: See TracBrowser for help on using the repository browser.