passing arguments with ampersands

Steve Holden steve at holdenweb.com
Sat Aug 18 08:09:39 EDT 2007


O.R.Senthil Kumaran wrote:
>> 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
> 
I suspect that the ampersand is being interpreted as a command 
terminator, and that the shell syntax error has been overlooked.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list