Command line arguments question (Windows XP)

ezd eugene_druker at
Tue Mar 21 17:19:18 CET 2006

I run simple script

import sys
print 'args',sys.argv

in "Command Prompt" window, with 2 command lines on 2 PCs:

# Case (1L):
C:\tmp> a b c
args ['C:\\tmp\\']

# Case (1D):
C:\tmp> a b c
args ['C:\\tmp\\', 'a', 'b', 'c']

# Cases (2L) & (2D):
C:\tmp> C:\Python24\python a b c
args ['', 'a', 'b', 'c']

How to explain this ?  Particularly case (1L) without arguments.

Both PCs have Python 2.4.2 and Windows XP SP2. The only
difference I see is XP 'Home Edition' on Desktop (D) and
XP 'Professional' on Laptop (L).


More information about the Python-list mailing list