On Apr 7, 2007, at 1:13 PM, Eric Price wrote:

> Hi;
> How do I pass a variable to a python script? Something like this  
> (which
> doesn't work):
>
> ./test.py?var=hello_world

The easiest thing would be to drop the '?var=':

./test.py hello_world

Then in your script, use sys.argv to gather the argument (hello_world).

hth,
Michael


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

Reply via email to