passing arguments with ampersands
O.R.Senthil Kumaran
orsenthil at users.sourceforge.net
Sat Aug 18 07:29:13 EDT 2007
> Quote:D:\ftp\Music\Mixes & Compilations\Above & Beyond - Essential
> Mix\001_Essential_Mix_2004-06-06_-_Above_and_Beyond.txt
> when i put 'print sys.argv[1:]' at the very beginning of the script, all i
> get is this:
>
> Quote:['D:\\ftp\\Music\\Mixes']
>
Can you share the portion of the code?
Are you quoting the argument that you are passing?
for e.g:
#cat 1.py
import sys
print sys.argv[1]
#python 1.py "I am able to print the spaces and & characters"
I am able to print the spaces and & characters
--
O.R.Senthil Kumaran
http://uthcode.sarovar.org
More information about the Python-list
mailing list