]> granicus.if.org Git - python/commitdiff
Whitespace normalization, via reindent.py.
authorTim Peters <tim.peters@gmail.com>
Sun, 18 Jul 2004 06:25:50 +0000 (06:25 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 18 Jul 2004 06:25:50 +0000 (06:25 +0000)
13 files changed:
Doc/ext/setup.py
Doc/ext/test.py
Doc/lib/caseless.py
Doc/lib/email-dir.py
Doc/lib/minidom-example.py
Doc/lib/required_1.py
Doc/ref/reswords.py
Doc/tools/custlib.py
Doc/tools/keywords.py
Doc/tools/prechm.py
Doc/tools/sgmlconv/latex2esis.py
PC/testpy.py
PCbuild/build_ssl.py

index 1805b177a246d48178ae4dc2fe32556a15865fe9..b853d23b170985a0058a184ebc2db262747e9215 100644 (file)
@@ -6,4 +6,3 @@ setup(name="noddy", version="1.0",
          Extension("noddy3", ["noddy3.c"]),
          Extension("noddy4", ["noddy4.c"]),
          ])
-
index 10549d685b0420a76496b95eb62eacd0067ec8dc..7ebf46afd1ee3c3ed793024cf961c90428229d55 100644 (file)
@@ -211,4 +211,3 @@ sys.path.append(src)
 if __name__ == "__main__":
     import doctest, __main__
     doctest.testmod(__main__)
-
index b1282193375f6412c6f5ba410dc9784d1afb638e..cae94be911f87889079b308bb69a1bf0975fe392 100755 (executable)
@@ -45,7 +45,7 @@ if __name__ == "__main__":
         print "ok: got OptionConflictError for -H"
     else:
         print "not ok: no conflict between -h and -H"
-    
+
     parser.add_option("-f", "--file", dest="file")
     #print repr(parser.get_option("-f"))
     #print repr(parser.get_option("-F"))
@@ -58,5 +58,3 @@ if __name__ == "__main__":
     (options, args) = parser.parse_args(["-F", "bar"])
     assert options.file == "bar", options.file
     print "ok: case insensitive short options work"
-    
-    
index bc26b3c98c5ae95855e88dd11b20c19a719a9efe..2d89a2fb7e535099a37cc4a86bad993e2eab7398 100644 (file)
@@ -66,7 +66,7 @@ def main():
 
     sender = args[0]
     recips = args[1:]
-    
+
     # Create the enclosing (outer) message
     outer = MIMEMultipart()
     outer['Subject'] = 'Contents of directory %s' % os.path.abspath(dir)
index 3fa15dd458755abc573e22807c4216b992a3e2fd..c30c4e08a9425b930c9d98a6edbd868245e2f4d6 100644 (file)
@@ -35,7 +35,7 @@ def handleSlideshow(slideshow):
 
 def handleSlides(slides):
     for slide in slides:
-       handleSlide(slide)
+        handleSlide(slide)
 
 def handleSlide(slide):
     handleSlideTitle(slide.getElementsByTagName("title")[0])
index 44d5b300aac91a2a377750d21a4b57d02039ac86..6be5668eee960c4d145b34872689c88b3855e69a 100755 (executable)
@@ -3,11 +3,11 @@ import optparse
 class OptionParser (optparse.OptionParser):
 
     def check_required (self, opt):
-      option = self.get_option(opt)
+        option = self.get_option(opt)
 
-      # Assumes the option's 'default' is set to None!
-      if getattr(self.values, option.dest) is None:
-          self.error("%s option not supplied" % option)
+        # Assumes the option's 'default' is set to None!
+        if getattr(self.values, option.dest) is None:
+            self.error("%s option not supplied" % option)
 
 
 parser = OptionParser()
index 29f326fe2ca805c2bd0b857a874707d0f7e7a928..68862bbcffe53d70ef191f6a9b7d568bdf616439 100644 (file)
@@ -11,13 +11,13 @@ def main():
     nwords = len(words)
     nrows = (nwords + ncols - 1) / ncols
     for irow in range(nrows):
-       for icol in range(ncols):
-           i = irow + icol * nrows
-           if 0 <= i < nwords:
-               word = words[i]
-           else:
-               word = ""
-           print "%-*s" % (colwidth, word),
-       print
+        for icol in range(ncols):
+            i = irow + icol * nrows
+            if 0 <= i < nwords:
+                word = words[i]
+            else:
+                word = ""
+            print "%-*s" % (colwidth, word),
+        print
 
 main()
index 789892812e4c7e3c47a121dadc804d5679d3e65e..15f07baf0e534ff9884ca158af30525dc0a9633d 100644 (file)
@@ -10,20 +10,20 @@ modules = {}
 
 for modname in sys.builtin_module_names:
     modules[modname] = modname
-    
+
 for dir in sys.path:
     # Look for *.py files
     filelist = glob.glob(os.path.join(dir, '*.py'))
-    for file in filelist: 
+    for file in filelist:
         path, file = os.path.split(file)
         base, ext = os.path.splitext(file)
         modules[base.lower()] = base
 
     # Look for shared library files
-    filelist = (glob.glob(os.path.join(dir, '*.so')) + 
+    filelist = (glob.glob(os.path.join(dir, '*.so')) +
                 glob.glob(os.path.join(dir, '*.sl')) +
                 glob.glob(os.path.join(dir, '*.o')) )
-    for file in filelist: 
+    for file in filelist:
         path, file = os.path.split(file)
         base, ext = os.path.splitext(file)
         if base[-6:] == 'module':
@@ -54,7 +54,7 @@ modules = mlist
 # Phase III: write custlib.tex
 
 # Write the boilerplate
-# XXX should be fancied up.  
+# XXX should be fancied up.
 print """\documentstyle[twoside,11pt,myformat]{report}
 \\title{Python Library Reference}
 \\input{boilerplate}
@@ -69,10 +69,10 @@ print """\documentstyle[twoside,11pt,myformat]{report}
 \\pagebreak
 {\\parskip = 0mm \\tableofcontents}
 \\pagebreak\\pagenumbering{arabic}"""
-    
-for modname in mlist: 
+
+for modname in mlist:
     print "\\input{lib%s}" % (modname,)
-    
+
 # Write the end
 print """\\input{custlib.ind}                   % Index
 \\end{document}"""
index 876987de7c025756d62c4247f1da959e226c1474..9f32056db21a81eea7157a1835937c72cba7c4bf 100644 (file)
@@ -4,16 +4,16 @@
 
 l = []
 try:
-       while 1:
-               l = l + raw_input().split()
+    while 1:
+        l = l + raw_input().split()
 except EOFError:
-       pass
+    pass
 l.sort()
 for x in l[:]:
-       while l.count(x) > 1: l.remove(x)
+    while l.count(x) > 1: l.remove(x)
 ncols = 5
 nrows = (len(l)+ncols-1)/ncols
 for i in range(nrows):
-       for j in range(i, len(l), nrows):
-               print l[j].ljust(10),
-       print
+    for j in range(i, len(l), nrows):
+        print l[j].ljust(10),
+    print
index 09c2c439df5ee1df4e50aa72eee36e0f8d96694a..7b2f3936cecf89c98a01157847e4dedbb1c99baf 100644 (file)
@@ -438,8 +438,8 @@ def openfile(file):
     return p
 
 def usage():
-        print usage_mode
-        sys.exit(0)
+    print usage_mode
+    sys.exit(0)
 
 def do_it(args = None):
     if not args:
index b30aaa5631673fa15c77ca9bf0751a9f9c4bb8cf..643ef2ca302e4c1825b55816d5c4d51fb9fadd02 100755 (executable)
@@ -11,7 +11,7 @@ passed to the convert() function; changing this table can allow this
 tool to support additional LaTeX markups.
 
 The format of the table is largely undocumented; see the commented
-headers where the table is specified in main().  There is no provision 
+headers where the table is specified in main().  There is no provision
 to load an alternate table from an external file.
 """
 
index ef8ba7aef449a36f189dae9f0ba9977c1b5c8717..fd1b1e42f89b730a5918cc73e416e2cdd47efa2c 100644 (file)
@@ -5,28 +5,28 @@ import sys
 # change this module too.\r
 \r
 try:\r
-  import string\r
+    import string\r
 except:\r
-  print """Could not import the standard "string" module.\r
-Please check your PYTHONPATH environment variable."""\r
-  sys.exit(1)\r
+    print """Could not import the standard "string" module.\r
+  Please check your PYTHONPATH environment variable."""\r
+    sys.exit(1)\r
 \r
 try:\r
-  import regex_syntax\r
+    import regex_syntax\r
 except:\r
-  print """Could not import the standard "regex_syntax" module.  If this is\r
-a PC, you should add the dos_8x3 directory to your PYTHONPATH."""\r
-  sys.exit(1)\r
+    print """Could not import the standard "regex_syntax" module.  If this is\r
+  a PC, you should add the dos_8x3 directory to your PYTHONPATH."""\r
+    sys.exit(1)\r
 \r
 import os\r
 \r
 for dir in sys.path:\r
-  file = os.path.join(dir, "string.py")\r
-  if os.path.isfile(file):\r
-    test = os.path.join(dir, "test")\r
-    if os.path.isdir(test):\r
-      # Add the "test" directory to PYTHONPATH.\r
-      sys.path = sys.path + [test]\r
+    file = os.path.join(dir, "string.py")\r
+    if os.path.isfile(file):\r
+        test = os.path.join(dir, "test")\r
+        if os.path.isdir(test):\r
+            # Add the "test" directory to PYTHONPATH.\r
+            sys.path = sys.path + [test]\r
 \r
-import regrtest        # Standard Python tester.\r
+import regrtest # Standard Python tester.\r
 regrtest.main()\r
index a369a64ed77f0f96ac72808a3bf17f7a51fe2aed..8f485a258097c5bff1860fbfc2d5b276126c93aa 100644 (file)
@@ -118,7 +118,7 @@ def main():
             # all outputs (debug/nondebug/dll/lib).  So we filter the file
             # to exclude any "nmake" commands and then execute.
             tempname = "ms\\32all_py.bat"
-            
+
             in_bat  = open("ms\\32all.bat")
             temp_bat = open(tempname,"w")
             while 1: