summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-05 21:15:22 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-05 21:15:22 (GMT)
commit11845e00b267e30f87bbb2f2e7039fe9fe3fa594 (patch)
tree62d06e06f1fd2072dc710cba2202e7e382050913 /Tools
parent20417bcd180e1a3e6a95b1a116956bc5ebecba7d (diff)
downloadcpython-11845e00b267e30f87bbb2f2e7039fe9fe3fa594.zip
cpython-11845e00b267e30f87bbb2f2e7039fe9fe3fa594.tar.gz
cpython-11845e00b267e30f87bbb2f2e7039fe9fe3fa594.tar.bz2
Be a lot less verbose by default.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/bgen/bgen/bgenGenerator.py5
-rw-r--r--Tools/bgen/bgen/scantools.py8
2 files changed, 7 insertions, 6 deletions
diff --git a/Tools/bgen/bgen/bgenGenerator.py b/Tools/bgen/bgen/bgenGenerator.py
index 1a35c12..6213824 100644
--- a/Tools/bgen/bgen/bgenGenerator.py
+++ b/Tools/bgen/bgen/bgenGenerator.py
@@ -5,6 +5,7 @@ from bgenVariable import *
Error = "bgenGenerator.Error"
+DEBUG=0
# Strings to specify argument transfer modes in generator calls
IN = "in"
@@ -15,7 +16,7 @@ INOUT = IN_OUT = "in-out"
class BaseFunctionGenerator:
def __init__(self, name, condition=None):
- print "<--", name
+ if DEBUG: print "<--", name
self.name = name
self.prefix = name
self.objecttype = "PyObject" # Type of _self argument to function
@@ -25,7 +26,7 @@ class BaseFunctionGenerator:
self.prefix = prefix
def generate(self):
- print "-->", self.name
+ if DEBUG: print "-->", self.name
if self.condition:
Output()
Output(self.condition)
diff --git a/Tools/bgen/bgen/scantools.py b/Tools/bgen/bgen/scantools.py
index 5efa6fc..205a1ce 100644
--- a/Tools/bgen/bgen/scantools.py
+++ b/Tools/bgen/bgen/scantools.py
@@ -67,7 +67,7 @@ class Scanner:
for type in types:
modes = self.usedtypes[type].keys()
modes.sort()
- print type, string.join(modes)
+ self.report("%s %s", type, string.join(modes))
def gentypetest(self, file):
fp = open(file, "w")
@@ -89,7 +89,7 @@ if missing: raise "Missing Types"
fp.close()
def initsilent(self):
- self.silent = 0
+ self.silent = 1
def error(self, format, *args):
if self.silent >= 0:
@@ -486,7 +486,7 @@ if missing: raise "Missing Types"
return
self.report("==> %s %s <==", type, name)
if self.blacklisted(type, name):
- self.error("*** %s %s blacklisted", type, name)
+ self.report("*** %s %s blacklisted", type, name)
return
returnlist = [(type, name, 'ReturnMode')]
returnlist = self.repairarglist(name, returnlist)
@@ -496,7 +496,7 @@ if missing: raise "Missing Types"
if self.unmanageable(type, name, arglist):
##for arg in arglist:
## self.report(" %s", `arg`)
- self.error("*** %s %s unmanageable", type, name)
+ self.report("*** %s %s unmanageable", type, name)
return
self.alreadydone.append(name)
self.generate(type, name, arglist)