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
everything that follows as a comment.

$ ./listargs.py alpha #beta
0 ./listargs.py
1 alpha

But you can escape it:

$ ./listargs.py alpha \#beta
0 ./listargs.py
1 alpha
2 #beta

$ ./listargs.py alpha '#beta'
0 ./listargs.py
1 alpha
2 #beta

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

Reply via email to