taking qoutes in arguments

Lee Caine kano.priv at gmail.com
Mon May 15 10:48:39 EDT 2006


hi all,

Im new to python and am in need of a little help....

Im attempting to write a program that finds and replaces text in all files
in a given directory.

example of running the program with arguments

>python far.py /home/lee/Documents/ find replace

I have managed to get it all working apart from one thing, if the find or
replace arguments contain quotes e.g( content="somat" ),  it doesnt work, so
I print the string and it shows as content=somat, without the quotes.

So i tryed this...

>python far.py /home/lee/Documents content=\"somat\" content=\"somat else\"

and this works, but I would like a way of not having to do this when i run
the program

any help would be greatly appreciated.

thanks Lee.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060515/c074904e/attachment.html>


More information about the Python-list mailing list