comparison prettyprint.py @ 233:e34c53a3e407

fixes from eric's style check
author Dirk Olmes <dirk@xanthippe.ping.de>
date Thu, 25 Sep 2014 17:26:34 +0200
parents bb3c851b18b1
children 7c719c4f5655
comparison
equal deleted inserted replaced
232:18865de3a87d 233:e34c53a3e407
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 import sys 2 import sys
3 3
4 newlineAfter = [ '{', '[', ',' ] 4 newlineAfter = ['{', '[', ',']
5 newlineBefore = [ '}', ']' ] 5 newlineBefore = [ '}', ']' ]
6 6
7 def prettyPrint(file): 7 def prettyPrint(file):
8 indent = 0 8 indent = 0
9 doIndent = False 9 doIndent = False
36 sys.stdout.write(char) 36 sys.stdout.write(char)
37 sys.stdout.write("\n") 37 sys.stdout.write("\n")
38 38
39 def nl_p(char): 39 def nl_p(char):
40 sys.stdout.write("\n") 40 sys.stdout.write("\n")
41 sys.stdout.write(char) 41 sys.stdout.write(char)
42 42
43 if __name__ == "__main__": 43 if __name__ == "__main__":
44 if len(sys.argv) < 2: 44 if len(sys.argv) < 2:
45 print("usage: %s <file>" % (sys.argv[0])) 45 print("usage: %s <file>" % (sys.argv[0]))
46 sys.exit(1) 46 sys.exit(1)