1. Armin Rigo
  2. cpython-withatomic

Commits

Jack Jansen  committed d297c72

Put debug output inside 'if DEBUG'.

  • Participants
  • Parent commits 448edc9
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Lib/binhex.py

View file
  • Ignore whitespace
 import string
 import binascii
 
-DEBUG=1
-
-testf = open('@xx', 'w')	# XXXX
-
+DEBUG=0
+if DEBUG:
+	testf=open('@binhex.dbg.out', 'w')
+	
 Error = 'binhex.Error'
 
 # States (what have we written)
 		self.data = ''
 
     def write(self, data):
-		testf.write(data) # XXXX
+    	if DEBUG:
+			testf.write(data) # XXXX
 		self.data = self.data + data
 		if len(self.data) < REASONABLY_LARGE:
 		    return
 
 def _test():
 	if os.name == 'mac':
-		fss, ok = macfs.StandardGetFile()
+		fss, ok = macfs.PromptGetFile('File to convert:')
 		if not ok:
 			sys.exit(0)
 		fname = fss.as_pathname()