gagsl-py at yahoo.com.ar
Tue Oct 3 00:25:27 CEST 2006
At Monday 2/10/2006 10:47, Bryan Leber wrote:
>Sorry to bother you again, but I just wanted to give you an update
>since you have generously helped me. I have it working kind of. I
>had to fudge it a little bit lol. For some reason if it reads a text
>file, it will pull out the information and print it to the
>appropriate file, but if it reads straight from the sys.argv to
>the pullerList, that's where it has issues, so now I am just writing
>what is in sys.argv to a text file, then going back and reading
>it into the pullerList and it seems to be working fine.:) Now onto
>some polishing up of it. Thanks a lot!
Ah, I guess you are using readlines() to read the file?
From the command line you'll get "line one\nline two\nline three" so
you'll have to split it:
lines = received_argument.split('\n')
lines = received_argument.split('\\n')
(I'm not sure if all involved parties interpret \n the same way...)
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
More information about the Python-list