]> granicus.if.org Git - python/commitdiff
Patch #812378: Normalize white space.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 24 Oct 2003 20:09:23 +0000 (20:09 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 24 Oct 2003 20:09:23 +0000 (20:09 +0000)
Lib/distutils/sysconfig.py
Tools/faqwiz/faqconf.py
Tools/framer/framer/template.py
Tools/modulator/EXAMPLE.py
Tools/modulator/ScrolledListbox.py
Tools/pynche/PyncheWidget.py
Tools/pynche/StripViewer.py
Tools/versioncheck/_checkversion.py
Tools/versioncheck/checkversions.py
Tools/versioncheck/pyversioncheck.py

index 67353a8d6431c070b5c27cb291d0ef056b158028..46d1acbb04e399c1c4620eecf91741586ff5dcd1 100644 (file)
@@ -70,9 +70,9 @@ def get_python_inc(plat_specific=0, prefix=None):
         return os.path.join(prefix, "include")
     elif os.name == "mac":
         if plat_specific:
-                return os.path.join(prefix, "Mac", "Include")
+            return os.path.join(prefix, "Mac", "Include")
         else:
-                return os.path.join(prefix, "Include")
+            return os.path.join(prefix, "Include")
     elif os.name == "os2":
         return os.path.join(prefix, "Include")
     else:
@@ -160,7 +160,7 @@ def customize_compiler(compiler):
         if os.environ.has_key('LDFLAGS'):
             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
         if basecflags:
-               opt = basecflags + ' ' + opt
+            opt = basecflags + ' ' + opt
         if os.environ.has_key('CFLAGS'):
             opt = opt + ' ' + os.environ['CFLAGS']
             ldshared = ldshared + ' ' + os.environ['CFLAGS']
index 9b5b8afcfc524666a427b08b8b70280b1b1b2645..ef01aa09f9925426885f5522033e028bd2e79d78 100644 (file)
@@ -15,20 +15,20 @@ SECTION_TITLES = {
 
 # Parameters you definitely want to change
 
-SHORTNAME = "Generic"                  # FAQ name with "FAQ" omitted
-PASSWORD = ""                          # Password for editing
-OWNERNAME = "FAQ owner"                        # Name for feedback
-OWNEREMAIL = "nobody@anywhere.org"     # Email for feedback
-HOMEURL = "http://www.python.org"      # Related home page
-HOMENAME = "Python home"               # Name of related home page
-RCSBINDIR = "/usr/local/bin/"          # Directory containing RCS commands
-                                       # (must end in a slash)
+SHORTNAME = "Generic"                   # FAQ name with "FAQ" omitted
+PASSWORD = ""                           # Password for editing
+OWNERNAME = "FAQ owner"                 # Name for feedback
+OWNEREMAIL = "nobody@anywhere.org"      # Email for feedback
+HOMEURL = "http://www.python.org"       # Related home page
+HOMENAME = "Python home"                # Name of related home page
+RCSBINDIR = "/usr/local/bin/"           # Directory containing RCS commands
+                                        # (must end in a slash)
 
 # Parameters you can normally leave alone
 
-MAXHITS = 10                           # Max #hits to be shown directly
-COOKIE_LIFETIME = 28*24*3600           # Cookie expiration in seconds
-                                       # (28*24*3600 = 28 days = 4 weeks)
+MAXHITS = 10                            # Max #hits to be shown directly
+COOKIE_LIFETIME = 28*24*3600            # Cookie expiration in seconds
+                                        # (28*24*3600 = 28 days = 4 weeks)
 PROCESS_PREFORMAT = 1                   # toggle whether preformatted text
                                         # will replace urls and emails with 
                                         # HTML links
@@ -36,10 +36,10 @@ PROCESS_PREFORMAT = 1                   # toggle whether preformatted text
 # Markers appended to title to indicate recently change
 # (may contain HTML, e.g. <IMG>); and corresponding 
 
-MARK_VERY_RECENT = " **"               # Changed very recently
-MARK_RECENT = " *"                     # Changed recently
-DT_VERY_RECENT = 24*3600               # 24 hours
-DT_RECENT = 7*24*3600                  # 7 days
+MARK_VERY_RECENT = " **"                # Changed very recently
+MARK_RECENT = " *"                      # Changed recently
+DT_VERY_RECENT = 24*3600                # 24 hours
+DT_RECENT = 7*24*3600                   # 7 days
 
 EXPLAIN_MARKS = """
 <P>(Entries marked with ** were changed within the last 24 hours;
@@ -49,18 +49,18 @@ entries marked with * were changed within the last 7 days.)
 
 # Version -- don't change unless you edit faqwiz.py
 
-WIZVERSION = "1.0.4"                   # FAQ Wizard version
+WIZVERSION = "1.0.4"                    # FAQ Wizard version
 
 import os, sys
 if os.name in ['nt',]:
     # On NT we'll probably be running python from a batch file,
     # so sys.argv[0] is not helpful
-    FAQCGI = 'faq.bat'                 # Relative URL of the FAQ cgi script
+    FAQCGI = 'faq.bat'                  # Relative URL of the FAQ cgi script
     # LOGNAME is not typically set on NT
     os.environ[ 'LOGNAME' ] = "FAQWizard"
 else:
     # This parameter is normally overwritten with a dynamic value
-    FAQCGI = 'faqw.py'                 # Relative URL of the FAQ cgi script
+    FAQCGI = 'faqw.py'                  # Relative URL of the FAQ cgi script
     FAQCGI = os.path.basename(sys.argv[0]) or FAQCGI
 del os, sys
 
@@ -84,8 +84,8 @@ except ImportError:
 
 # Calculated parameter names
 
-COOKIE_NAME = SHORTNAME + "-FAQ-Wizard"        # Name used for Netscape cookie
-FAQNAME = SHORTNAME + " FAQ"           # Name of the FAQ
+COOKIE_NAME = SHORTNAME + "-FAQ-Wizard" # Name used for Netscape cookie
+FAQNAME = SHORTNAME + " FAQ"            # Name of the FAQ
 
 # ----------------------------------------------------------------------
 
@@ -175,22 +175,22 @@ HOME = """
     <INPUT TYPE=submit VALUE="Search"><BR>
     <INPUT TYPE=radio NAME=querytype VALUE=simple CHECKED>
         Simple string
-       /
+        /
     <INPUT TYPE=radio NAME=querytype VALUE=regex>
         Regular expression
-       /<BR>
+        /<BR>
     <INPUT TYPE=radio NAME=querytype VALUE=anykeywords>
         Keywords (any)
-       /
+        /
     <INPUT TYPE=radio NAME=querytype VALUE=allkeywords>
         Keywords (all)
-       <BR>
+        <BR>
     <INPUT TYPE=radio NAME=casefold VALUE=yes CHECKED>
         Fold case
-       /
+        /
     <INPUT TYPE=radio NAME=casefold VALUE=no>
         Case sensitive
-       <BR>
+        <BR>
     <INPUT TYPE=hidden NAME=req VALUE=search>
 </FORM>
 
@@ -362,14 +362,14 @@ Log message (reason for the change):<BR>
 Please provide the following information for logging purposes:
 <TABLE FRAME=none COLS=2>
     <TR>
-       <TD>Name:
-       <TD><INPUT TYPE=text SIZE=40 NAME=author VALUE="%(author)s">
+        <TD>Name:
+        <TD><INPUT TYPE=text SIZE=40 NAME=author VALUE="%(author)s">
     <TR>
-       <TD>Email:
-       <TD><INPUT TYPE=text SIZE=40 NAME=email VALUE="%(email)s">
+        <TD>Email:
+        <TD><INPUT TYPE=text SIZE=40 NAME=email VALUE="%(email)s">
     <TR>
-       <TD>Password:
-       <TD><INPUT TYPE=password SIZE=20 NAME=password VALUE="%(password)s">
+        <TD>Password:
+        <TD><INPUT TYPE=password SIZE=20 NAME=password VALUE="%(password)s">
 </TABLE>
 
 <INPUT TYPE=submit NAME=review VALUE="Preview Edit">
index 70e2591841a174ec169d74638f26f72d0cd6dc05..8d16204822dc79fdfe57600229941572294c82f4 100644 (file)
@@ -19,14 +19,14 @@ methoddef_start = """\
 static struct PyMethodDef %(MethodDefName)s[] = {"""
 
 methoddef_def = """\
-       {"%(PythonName)s", (PyCFunction)%(CName)s, %(MethType)s},"""
+        {"%(PythonName)s", (PyCFunction)%(CName)s, %(MethType)s},"""
         
 methoddef_def_doc = """\
-       {"%(PythonName)s", (PyCFunction)%(CName)s, %(MethType)s,
+        {"%(PythonName)s", (PyCFunction)%(CName)s, %(MethType)s,
          %(DocstringVar)s},"""
         
 methoddef_end = """\
-       {NULL, NULL}
+        {NULL, NULL}
 };
 """
 
@@ -43,7 +43,7 @@ memberdef_def = """\
         {"%(PythonName)s", %(Type)s, OFF(%(CName)s), %(Flags)s},"""
 
 memberdef_end = """\
-       {NULL}
+        {NULL}
 };
 
 #undef OFF
index d4b254ae8cd23514478523dc0fdfa0a80a0e4342..b36a5a761c8cfe89378a76cb82cb1435b44d76c8 100644 (file)
@@ -34,7 +34,7 @@ o3.name = 'over-the-top object'
 o3.abbrev = 'ot'
 o3.methodlist = ['method1', 'method2']
 o3.funclist = ['new', 'tp_dealloc', 'tp_print', 'tp_getattr', 'tp_setattr',
-           'tp_compare', 'tp_repr', 'tp_hash']
+            'tp_compare', 'tp_repr', 'tp_hash']
 o3.typelist = ['tp_as_sequence', 'structure']
 
 #
index 89686ef3515d76d9649f3cd10249423c0b1d1ad5..8bb5738f1d23b6099c1c9f16f92ea493119067cf 100644 (file)
@@ -14,24 +14,24 @@ from Tkinter import *
 from Tkinter import _cnfmerge
 
 class ScrolledListbox(Listbox):
-       def __init__(self, master=None, cnf={}):
-               cnf = _cnfmerge(cnf)
-               fcnf = {}
-               vcnf = {'name': 'vbar',
-                       Pack: {'side': 'right', 'fill': 'y'},}
-               for k in cnf.keys():
-                       if type(k) == ClassType or k == 'name':
-                               fcnf[k] = cnf[k]
-                               del cnf[k]
-               self.frame = Frame(master, fcnf)
-               self.vbar = Scrollbar(self.frame, vcnf)
-               cnf[Pack] = {'side': 'left', 'fill': 'both', 'expand': 'yes'}
-               cnf['name'] = 'list'
-               Listbox.__init__(self, self.frame, cnf)
-               self['yscrollcommand'] = (self.vbar, 'set')
-               self.vbar['command'] = (self, 'yview')
+    def __init__(self, master=None, cnf={}):
+        cnf = _cnfmerge(cnf)
+        fcnf = {}
+        vcnf = {'name': 'vbar',
+            Pack: {'side': 'right', 'fill': 'y'},}
+        for k in cnf.keys():
+            if type(k) == ClassType or k == 'name':
+                fcnf[k] = cnf[k]
+                del cnf[k]
+        self.frame = Frame(master, fcnf)
+        self.vbar = Scrollbar(self.frame, vcnf)
+        cnf[Pack] = {'side': 'left', 'fill': 'both', 'expand': 'yes'}
+        cnf['name'] = 'list'
+        Listbox.__init__(self, self.frame, cnf)
+        self['yscrollcommand'] = (self.vbar, 'set')
+        self.vbar['command'] = (self, 'yview')
 
-               # Copy Pack methods of self.frame -- hack!
-               for m in Pack.__dict__.keys():
-                       if m[0] != '_' and m != 'config':
-                               setattr(self, m, getattr(self.frame, m))
+        # Copy Pack methods of self.frame -- hack!
+        for m in Pack.__dict__.keys():
+            if m[0] != '_' and m != 'config':
+                setattr(self, m, getattr(self.frame, m))
index 855007861c2c5c27f8bb283cf679b81fe74f665c..fcfe7ce6c1f3bbbd0984b055031dd90c29b5ae73 100644 (file)
@@ -75,7 +75,7 @@ class PyncheWidget:
         # Help menu
         #
         helpmenu = Menu(menubar, name='help', tearoff=0)
-       helpmenu.add_command(label='About Pynche...',
+        helpmenu.add_command(label='About Pynche...',
                              command=self.__popup_about,
                              underline=0)
         helpmenu.add_command(label='Help...',
index b190482a05514b8bb76a6038a12515e14b0517f6..429cc784366585eedf11d1da7ea78dd0d18f613b 100644 (file)
@@ -35,7 +35,7 @@ proc setcolor {canv colors} {
     set i 1
     foreach c $colors {
         $canv itemconfigure $i -fill $c -outline $c
-       incr i
+        incr i
     }
 }
 '''
@@ -54,9 +54,9 @@ def constant(numchips):
     start = 0.0
     seq = []
     while numchips > 0:
-       seq.append(int(start))
-       start = start + step
-       numchips = numchips - 1
+        seq.append(int(start))
+        start = start + step
+        numchips = numchips - 1
     return seq
 
 # red variations, green+blue = cyan constant
@@ -99,61 +99,61 @@ class LeftArrow:
     _TAG = ('leftarrow',)
 
     def __init__(self, canvas, x):
-       self._canvas = canvas
-       self.__arrow, self.__text = self._create(x)
-       self.move_to(x)
+        self._canvas = canvas
+        self.__arrow, self.__text = self._create(x)
+        self.move_to(x)
 
     def _create(self, x):
-       arrow = self._canvas.create_line(
-           x, self._ARROWHEIGHT + self._YOFFSET,
-           x, self._YOFFSET,
-           x + self._ARROWWIDTH, self._YOFFSET,
-           arrow='first',
-           width=3.0,
-           tags=self._TAG)
-       text = self._canvas.create_text(
-           x + self._ARROWWIDTH + 13,
-           self._ARROWHEIGHT - self._TEXTYOFFSET,
-           tags=self._TAG,
-           text='128')
-       return arrow, text
+        arrow = self._canvas.create_line(
+            x, self._ARROWHEIGHT + self._YOFFSET,
+            x, self._YOFFSET,
+            x + self._ARROWWIDTH, self._YOFFSET,
+            arrow='first',
+            width=3.0,
+            tags=self._TAG)
+        text = self._canvas.create_text(
+            x + self._ARROWWIDTH + 13,
+            self._ARROWHEIGHT - self._TEXTYOFFSET,
+            tags=self._TAG,
+            text='128')
+        return arrow, text
 
     def _x(self):
-       coords = self._canvas.coords(self._TAG)
-       assert coords
-       return coords[0]
+        coords = self._canvas.coords(self._TAG)
+        assert coords
+        return coords[0]
 
     def move_to(self, x):
-       deltax = x - self._x()
-       self._canvas.move(self._TAG, deltax, 0)
+        deltax = x - self._x()
+        self._canvas.move(self._TAG, deltax, 0)
 
     def set_text(self, text):
-       self._canvas.itemconfigure(self.__text, text=text)
+        self._canvas.itemconfigure(self.__text, text=text)
 
 
 class RightArrow(LeftArrow):
     _TAG = ('rightarrow',)
 
     def _create(self, x):
-       arrow = self._canvas.create_line(
-           x, self._YOFFSET,
-           x + self._ARROWWIDTH, self._YOFFSET,
-           x + self._ARROWWIDTH, self._ARROWHEIGHT + self._YOFFSET,
-           arrow='last',
-           width=3.0,
-           tags=self._TAG)
-       text = self._canvas.create_text(
-           x - self._ARROWWIDTH + 15,            # BAW: kludge
-           self._ARROWHEIGHT - self._TEXTYOFFSET,
+        arrow = self._canvas.create_line(
+            x, self._YOFFSET,
+            x + self._ARROWWIDTH, self._YOFFSET,
+            x + self._ARROWWIDTH, self._ARROWHEIGHT + self._YOFFSET,
+            arrow='last',
+            width=3.0,
+            tags=self._TAG)
+        text = self._canvas.create_text(
+            x - self._ARROWWIDTH + 15,            # BAW: kludge
+            self._ARROWHEIGHT - self._TEXTYOFFSET,
             justify=RIGHT,
-           text='128',
-           tags=self._TAG)
-       return arrow, text
+            text='128',
+            tags=self._TAG)
+        return arrow, text
 
     def _x(self):
-       coords = self._canvas.bbox(self._TAG)
-       assert coords
-       return coords[2] - 6                      # BAW: kludge
+        coords = self._canvas.bbox(self._TAG)
+        assert coords
+        return coords[2] - 6                      # BAW: kludge
 
 
 \f
@@ -173,68 +173,68 @@ class StripWidget:
                  uwdvar     = None,
                  hexvar     = None):
         # instance variables
-       self.__generator = generator
-       self.__axis = axis
+        self.__generator = generator
+        self.__axis = axis
         self.__numchips = numchips
-       assert self.__axis in (0, 1, 2)
-       self.__uwd = uwdvar
+        assert self.__axis in (0, 1, 2)
+        self.__uwd = uwdvar
         self.__hexp = hexvar
         # the last chip selected
         self.__lastchip = None
         self.__sb = switchboard
         
-       canvaswidth = numchips * (chipwidth + 1)
-       canvasheight = chipheight + 43            # BAW: Kludge
+        canvaswidth = numchips * (chipwidth + 1)
+        canvasheight = chipheight + 43            # BAW: Kludge
 
-       # create the canvas and pack it
-       canvas = self.__canvas = Canvas(master,
+        # create the canvas and pack it
+        canvas = self.__canvas = Canvas(master,
                                         width=canvaswidth,
                                         height=canvasheight,
 ##                                        borderwidth=2,
 ##                                        relief=GROOVE
                                         )
 
-       canvas.pack()
-       canvas.bind('<ButtonPress-1>', self.__select_chip)
-       canvas.bind('<ButtonRelease-1>', self.__select_chip)
-       canvas.bind('<B1-Motion>', self.__select_chip)
-
-       # Load a proc into the Tcl interpreter.  This is used in the
-       # set_color() method to speed up setting the chip colors.
-       canvas.tk.eval(TCLPROC)
-
-       # create the color strip
-       chips = self.__chips = []
-       x = 1
-       y = 30
-       tags = ('chip',)
-       for c in range(self.__numchips):
-           color = 'grey'
-           canvas.create_rectangle(
-               x, y, x+chipwidth, y+chipheight,
-               fill=color, outline=color,
-               tags=tags)
-           x = x + chipwidth + 1                 # for outline
-           chips.append(color)
-
-       # create the strip label
-       self.__label = canvas.create_text(
-           3, y + chipheight + 8,
-           text=label,
-           anchor=W)
-
-       # create the arrow and text item
-       chipx = self.__arrow_x(0)
-       self.__leftarrow = LeftArrow(canvas, chipx)
-
-       chipx = self.__arrow_x(len(chips) - 1)
-       self.__rightarrow = RightArrow(canvas, chipx)
+        canvas.pack()
+        canvas.bind('<ButtonPress-1>', self.__select_chip)
+        canvas.bind('<ButtonRelease-1>', self.__select_chip)
+        canvas.bind('<B1-Motion>', self.__select_chip)
+
+        # Load a proc into the Tcl interpreter.  This is used in the
+        # set_color() method to speed up setting the chip colors.
+        canvas.tk.eval(TCLPROC)
+
+        # create the color strip
+        chips = self.__chips = []
+        x = 1
+        y = 30
+        tags = ('chip',)
+        for c in range(self.__numchips):
+            color = 'grey'
+            canvas.create_rectangle(
+                x, y, x+chipwidth, y+chipheight,
+                fill=color, outline=color,
+                tags=tags)
+            x = x + chipwidth + 1                 # for outline
+            chips.append(color)
+
+        # create the strip label
+        self.__label = canvas.create_text(
+            3, y + chipheight + 8,
+            text=label,
+            anchor=W)
+
+        # create the arrow and text item
+        chipx = self.__arrow_x(0)
+        self.__leftarrow = LeftArrow(canvas, chipx)
+
+        chipx = self.__arrow_x(len(chips) - 1)
+        self.__rightarrow = RightArrow(canvas, chipx)
 
     def __arrow_x(self, chipnum):
-       coords = self.__canvas.coords(chipnum+1)
-       assert coords
-       x0, y0, x1, y1 = coords
-       return (x1 + x0) / 2.0
+        coords = self.__canvas.coords(chipnum+1)
+        assert coords
+        x0, y0, x1, y1 = coords
+        return (x1 + x0) / 2.0
 
     # Invoked when one of the chips is clicked.  This should just tell the
     # switchboard to set the color on all the output components
@@ -260,40 +260,40 @@ class StripWidget:
             color = self.__canvas.itemcget(self.__lastchip, 'fill')
             self.__canvas.itemconfigure(self.__lastchip, outline=color)
         self.__lastchip = chip
-       # get the arrow's text
-       coloraxis = rgbtuple[self.__axis]
+        # get the arrow's text
+        coloraxis = rgbtuple[self.__axis]
         if self.__hexp.get():
             # hex
             text = hex(coloraxis)
         else:
             # decimal
             text = repr(coloraxis)
-       # move the arrow, and set it's text
-       if coloraxis <= 128:
-           # use the left arrow
-           self.__leftarrow.set_text(text)
-           self.__leftarrow.move_to(self.__arrow_x(chip-1))
-           self.__rightarrow.move_to(-100)
-       else:
-           # use the right arrow
-           self.__rightarrow.set_text(text)
-           self.__rightarrow.move_to(self.__arrow_x(chip-1))
-           self.__leftarrow.move_to(-100)
-       # and set the chip's outline
+        # move the arrow, and set it's text
+        if coloraxis <= 128:
+            # use the left arrow
+            self.__leftarrow.set_text(text)
+            self.__leftarrow.move_to(self.__arrow_x(chip-1))
+            self.__rightarrow.move_to(-100)
+        else:
+            # use the right arrow
+            self.__rightarrow.set_text(text)
+            self.__rightarrow.move_to(self.__arrow_x(chip-1))
+            self.__leftarrow.move_to(-100)
+        # and set the chip's outline
         brightness = ColorDB.triplet_to_brightness(rgbtuple)
-       if brightness <= 128:
-           outline = 'white'
-       else:
-           outline = 'black'
-       self.__canvas.itemconfigure(chip, outline=outline)
+        if brightness <= 128:
+            outline = 'white'
+        else:
+            outline = 'black'
+        self.__canvas.itemconfigure(chip, outline=outline)
 
 
     def update_yourself(self, red, green, blue):
-       assert self.__generator
-       i = 1
-       chip = 0
-       chips = self.__chips = []
-       tk = self.__canvas.tk
+        assert self.__generator
+        i = 1
+        chip = 0
+        chips = self.__chips = []
+        tk = self.__canvas.tk
         # get the red, green, and blue components for all chips
         for t in self.__generator(self.__numchips, red, green, blue):
             rrggbb = ColorDB.triplet_to_rrggbb(t)
index a103bf99ee4ea978f7cac081e8ff1c97e6a90075..7b3bb5082d15fea6e0df9f9192dc8e5b9eff2e20 100644 (file)
@@ -9,8 +9,8 @@ _VERSION="1.0"
 _URL="http://www.cwi.nl/~jack/versioncheck/curversion.txt"
 
 try:
-       _myverbose=VERBOSE
+    _myverbose=VERBOSE
 except NameError:
-       _myverbose=1
-       
+    _myverbose=1
+
 pyversioncheck.versioncheck(_PACKAGE, _URL, _VERSION, verbose=_myverbose)
index dcc56d32589904a050eb268c441c1cfa34593e52..956f553990b85c409a4674526cad0df7dcd5adb6 100644 (file)
@@ -23,32 +23,32 @@ Values for verboselevel:
 3 - Check every URL for packages with multiple locations"""
 
 def check1dir(dummy, dir, files):
-       if CHECKNAME in files:
-               fullname = os.path.join(dir, CHECKNAME)
-               try:
-                       execfile(fullname)
-               except:
-                       print '** Exception in', fullname
-                       
+    if CHECKNAME in files:
+        fullname = os.path.join(dir, CHECKNAME)
+        try:
+            execfile(fullname)
+        except:
+            print '** Exception in', fullname
+            
 def walk1tree(tree):
-       os.path.walk(tree, check1dir, None)
-       
+    os.path.walk(tree, check1dir, None)
+
 def main():
-       global VERBOSE
-       try:
-               options, arguments = getopt.getopt(sys.argv[1:], 'v:')
-       except getopt.error:
-               print USAGE
-               sys.exit(1)
-       for o, a in options:
-               if o == '-v':
-                       VERBOSE = int(a)
-       if not arguments:
-               arguments = [sys.prefix]
-       for dir in arguments:
-               walk1tree(dir)
-               
+    global VERBOSE
+    try:
+        options, arguments = getopt.getopt(sys.argv[1:], 'v:')
+    except getopt.error:
+        print USAGE
+        sys.exit(1)
+    for o, a in options:
+        if o == '-v':
+            VERBOSE = int(a)
+    if not arguments:
+        arguments = [sys.prefix]
+    for dir in arguments:
+        walk1tree(dir)
+
 if __name__ == '__main__':
-       main()
-               
-       
+    main()
+
+
index 51bdd689fa406f9cb37ff19ef4fd7ca6ef7767b8..6ac34c892a3726d176dafef586805820a393d4bd 100644 (file)
@@ -5,10 +5,10 @@ import urllib
 import sys
 
 # Verbose options
-VERBOSE_SILENT=0       # Single-line reports per package
-VERBOSE_NORMAL=1       # Single-line reports per package, more info if outdated
-VERBOSE_EACHFILE=2     # Report on each URL checked
-VERBOSE_CHECKALL=3     # Check each URL for each package
+VERBOSE_SILENT=0        # Single-line reports per package
+VERBOSE_NORMAL=1        # Single-line reports per package, more info if outdated
+VERBOSE_EACHFILE=2      # Report on each URL checked
+VERBOSE_CHECKALL=3      # Check each URL for each package
 
 # Test directory
 ## urllib bug: _TESTDIR="ftp://ftp.cwi.nl/pub/jack/python/versiontestdir/"
@@ -96,5 +96,4 @@ def _test():
 
 if __name__ == '__main__':
     _test()
-       
-    
+