python 将unix文件转成dos文件

#!/usr/bin/python
#-*-encoding:UTF-8-*-


import sys


if len(sys.argv) < 2:
print('Usage : python sys.argv[0] FileName')
sys.exit(1)
else:
print ('\nunix2dos.py execution successfully!\n')


File=sys.argv[1]
fileobj = open(File,'rU')
try:
allfile = fileobj.read()
finally:
fileobj.close()

你可能感兴趣的:(python,将unix文件转成dos文件)