diff options
author | Guido van Rossum <guido@python.org> | 1998-10-20 15:33:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-10-20 15:33:33 (GMT) |
commit | 8fd0f147e74138b8046ba42c083e61e24dfecad2 (patch) | |
tree | 164924142a292940372967a29a4445306e8f5bda | |
parent | fe78cc0f7ebc571c2daa9a8918e328dcd8e1b8e5 (diff) | |
download | cpython-8fd0f147e74138b8046ba42c083e61e24dfecad2.zip cpython-8fd0f147e74138b8046ba42c083e61e24dfecad2.tar.gz cpython-8fd0f147e74138b8046ba42c083e61e24dfecad2.tar.bz2 |
Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de notices:
"""
the NEWS file of Python 1.5.2a2 inspired me to look at
Tools/scripts/untabify.py. I wonder why it accepts a -t argument
but ignores it. The following patch tries to make it somewhat useful
(i.e., to override the tabsize=8 setting). Is that agreeable?
"""
-rwxr-xr-x | Tools/scripts/untabify.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Tools/scripts/untabify.py b/Tools/scripts/untabify.py index 1f74973..7be9f38 100755 --- a/Tools/scripts/untabify.py +++ b/Tools/scripts/untabify.py @@ -15,8 +15,11 @@ def main(): raise getopt.error, "At least one file argument required" except getopt.error, msg: print msg - print "usage:", sys.argv[0], "file ..." + print "usage:", sys.argv[0], "[-t tabwidth] file ..." return + for optname, optvalue in opts: + if optname == '-t': + tabsize = int(optvalue) for file in args: process(file, tabsize) |