Command line arguments question (Windows XP)

E

ezd

Hi,
I run simple script

# u.py
import sys
print 'args',sys.argv

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

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

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

# Cases (2L) & (2D):
C:\tmp> C:\Python24\python u.py a b c
args ['u.py', '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).

Eugene
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top