Re: a question about the #prefix of sys.argv

2008-06-02 Thread Fossil Pan
On Jun 2, 8:50 am, Aldarion <[EMAIL PROTECTED]> wrote: > On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote: > > > Aldarion wrote: > > > for the little script > > > #egg.py > > > import sys > > > for k,v in enumerate(sys.argv): > > > print k,v > > > > it ignores the part after # on linux > >

Re: a question about the #prefix of sys.argv

2008-06-01 Thread Aldarion
On 6月2日, 上午8时05分, Peter Otten <[EMAIL PROTECTED]> wrote: > Aldarion wrote: > > for the little script > > #egg.py > > import sys > > for k,v in enumerate(sys.argv): > > print k,v > > > it ignores the part after # on linux > > below is the running output on windows and linux. no clue here. > > This

Re: a question about the #prefix of sys.argv

2008-06-01 Thread John Machin
On Jun 2, 9:54 am, Aldarion <[EMAIL PROTECTED]> wrote: > for the little script > #egg.py > import sys > for k,v in enumerate(sys.argv): > print k,v > > it ignores the part after # on linux Perhaps "it" is the linux shell ... > below is the running output on windows and linux. no clue here. >

Re: a question about the #prefix of sys.argv

2008-06-01 Thread Peter Otten
Aldarion wrote: > for the little script > #egg.py > import sys > for k,v in enumerate(sys.argv): > print k,v > > it ignores  the part after # on linux > below is the running output on windows and linux. no clue here. This has nothing to do with python, it's the shell that treats the # and everyt

a question about the #prefix of sys.argv

2008-06-01 Thread Aldarion
for the little script #egg.py import sys for k,v in enumerate(sys.argv): print k,v it ignores the part after # on linux below is the running output on windows and linux. no clue here. D:\python\note>egg.py #test 0 D:\python\note\egg.py 1 #test D:\python\note>egg.py for bar #spam egg 0 D:\pyt