mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Put debug output inside 'if DEBUG'.
This commit is contained in:
parent
7a58336511
commit
479c1b3008
1 changed files with 7 additions and 6 deletions
|
@ -26,9 +26,9 @@ import struct
|
||||||
import string
|
import string
|
||||||
import binascii
|
import binascii
|
||||||
|
|
||||||
DEBUG=1
|
DEBUG=0
|
||||||
|
if DEBUG:
|
||||||
testf = open('@xx', 'w') # XXXX
|
testf=open('@binhex.dbg.out', 'w')
|
||||||
|
|
||||||
Error = 'binhex.Error'
|
Error = 'binhex.Error'
|
||||||
|
|
||||||
|
@ -144,6 +144,7 @@ class _Rlecoderengine:
|
||||||
self.data = ''
|
self.data = ''
|
||||||
|
|
||||||
def write(self, data):
|
def write(self, data):
|
||||||
|
if DEBUG:
|
||||||
testf.write(data) # XXXX
|
testf.write(data) # XXXX
|
||||||
self.data = self.data + data
|
self.data = self.data + data
|
||||||
if len(self.data) < REASONABLY_LARGE:
|
if len(self.data) < REASONABLY_LARGE:
|
||||||
|
@ -469,7 +470,7 @@ def hexbin(inp, out):
|
||||||
|
|
||||||
def _test():
|
def _test():
|
||||||
if os.name == 'mac':
|
if os.name == 'mac':
|
||||||
fss, ok = macfs.StandardGetFile()
|
fss, ok = macfs.PromptGetFile('File to convert:')
|
||||||
if not ok:
|
if not ok:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
fname = fss.as_pathname()
|
fname = fss.as_pathname()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue