Any algorithm to preserve whitespaces?
Santosh Kumar
sntshkmr60 at gmail.com
Wed Jan 23 09:56:55 EST 2013
Yes, Peter got it right.
Now, how can I replace:
script, givenfile = argv
with something better that takes argv[1] as input file as well as
reads input from stdin.
By input from stdin, I mean that currently when I do `cat foo.txt |
capitalizr` it throws a ValueError error:
Traceback (most recent call last):
File "/home/santosh/bin/capitalizr", line 16, in <module>
script, givenfile = argv
ValueError: need more than 1 value to unpack
I want both input methods.
More information about the Python-list
mailing list