bryan rasmussen schrieb:
> Hi,
> 
> Basically I want to get sys.argv[1: ] but the problem is that actually
> the argument should maintain whitespace. Thus if the arguments are
> something something with only one space between them, or something
> something with three spaces between them I should be able to maintain
> the exact whitespace between arguments.


That has nothing to do with python - it's a question of your shell. 
Because the shell is responsible for parsing the arguments, possibly 
instantiating variables or even executing subcalls. The resulting 
argument list is then passed to the C-main of python.

So to pass arguments containing whitespace to python, do

python myscript.py "an argument with whitespac in it" "another one"

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to