sys.argv problem in Win 2k
Gerhard Haering
gh at ghaering.de
Thu Apr 24 05:37:12 EDT 2003
Anand B Pillai wrote:
> Hi pythonistas
>
> All my python scripts on Win 2k does not take command line arguments.
> i.e, len(sys.argv) is always 1. Because of this I cannot use any scripts which
> takes cmd line arguments. [...]
#v+
D:\tmp>copy con: test.py
import sys
print sys.argv
^Z
1 file(s) copied.
D:\tmp>c:\Python22\python.exe test.py bla blubs
['test.py', 'bla', 'blubs']
D:\tmp>test.py bla blubs
['D:\\tmp\\test.py', 'bla', 'blubs']
D:\tmp>
#v-
Works fine here. Can you show exactly what does not work with a test case?
-- Gerhard
More information about the Python-list
mailing list