Tim Roberts wrote:
> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>> Suppose I have a dos format text file. The following python code will
>> print ^M at the end. I'm wondering how to print it in unix format.
>>
>> fh = open(options.filename)
>> for line in fh.readlines()
>> print line,
>
> Are
[EMAIL PROTECTED] wrote:
> Suppose I have a dos format text file. The following python code will
> print ^M at the end. I'm wondering how to print it in unix format.
>
> fh = open(options.filename)
> for line in fh.readlines()
> print line,
>
> Thanks,
> Peng
Python ships with two utility script
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
>Suppose I have a dos format text file. The following python code will
>print ^M at the end. I'm wondering how to print it in unix format.
>
>fh = open(options.filename)
>for line in fh.readlines()
> print line,
Are you running this on Unix or on D
[EMAIL PROTECTED] wrote:
> Suppose I have a dos format text file. The following python code will
> print ^M at the end. I'm wondering how to print it in unix format.
>
> fh = open(options.filename)
> for line in fh.readlines()
> print line,
>
> Thanks,
> Peng
>
open(outfile, "wb").write(open(i
Suppose I have a dos format text file. The following python code will
print ^M at the end. I'm wondering how to print it in unix format.
fh = open(options.filename)
for line in fh.readlines()
print line,
Thanks,
Peng
--
http://mail.python.org/mailman/listinfo/python-list