mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Microfixes
This commit is contained in:
parent
5146ea3a0a
commit
d5c57e1624
3 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
#! /ufs/guido/bin/sgi/python
|
#! /ufs/guido/bin/sgi/python
|
||||||
#! /usr/local/python
|
#! /usr/local/bin/python
|
||||||
|
|
||||||
# Fix Python source files to use the new equality test operator, i.e.,
|
# Fix Python source files to use the new equality test operator, i.e.,
|
||||||
# if x = y: ...
|
# if x = y: ...
|
||||||
|
@ -42,7 +42,7 @@ rep = sys.stdout.write
|
||||||
def main():
|
def main():
|
||||||
bad = 0
|
bad = 0
|
||||||
if not sys.argv[1:]: # No arguments
|
if not sys.argv[1:]: # No arguments
|
||||||
err('usage: ' + argv[0] + ' file-or-directory ...\n')
|
err('usage: ' + sys.argv[0] + ' file-or-directory ...\n')
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
if os.path.isdir(arg):
|
if os.path.isdir(arg):
|
||||||
|
|
|
@ -40,7 +40,7 @@ rep = sys.stdout.write
|
||||||
def main():
|
def main():
|
||||||
bad = 0
|
bad = 0
|
||||||
if not sys.argv[1:]: # No arguments
|
if not sys.argv[1:]: # No arguments
|
||||||
err('usage: ' + argv[0] + ' file-or-directory ...\n')
|
err('usage: ' + sys.argv[0] + ' file-or-directory ...\n')
|
||||||
sys.exit(2)
|
sys.exit(2)
|
||||||
for arg in sys.argv[1:]:
|
for arg in sys.argv[1:]:
|
||||||
if os.path.isdir(arg):
|
if os.path.isdir(arg):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#! /usr/local/python
|
#! /usr/local/bin/python
|
||||||
|
|
||||||
# mkreal
|
# mkreal
|
||||||
#
|
#
|
||||||
|
@ -45,6 +45,7 @@ def mkrealdir(name):
|
||||||
def main():
|
def main():
|
||||||
sys.stdout = sys.stderr
|
sys.stdout = sys.stderr
|
||||||
progname = os.path.basename(sys.argv[0])
|
progname = os.path.basename(sys.argv[0])
|
||||||
|
if progname == '-c': progname = 'mkreal'
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
if not args:
|
if not args:
|
||||||
print 'usage:', progname, 'path ...'
|
print 'usage:', progname, 'path ...'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue