mirror of
https://github.com/python/cpython.git
synced 2025-07-15 15:25:29 +00:00
Convert print statements to function calls in Tools/.
This commit is contained in:
parent
e5d0e8431f
commit
6afaeb757a
66 changed files with 777 additions and 779 deletions
|
@ -6,15 +6,15 @@ import sys, os
|
|||
def main():
|
||||
for filename in sys.argv[1:]:
|
||||
if os.path.isdir(filename):
|
||||
print filename, "Directory!"
|
||||
print(filename, "Directory!")
|
||||
continue
|
||||
data = open(filename, "rb").read()
|
||||
if '\0' in data:
|
||||
print filename, "Binary!"
|
||||
print(filename, "Binary!")
|
||||
continue
|
||||
newdata = data.replace("\r\n", "\n")
|
||||
if newdata != data:
|
||||
print filename
|
||||
print(filename)
|
||||
f = open(filename, "wb")
|
||||
f.write(newdata)
|
||||
f.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue