python 2.7.12 on Linux behaving differently than on Windows

Gregory Ewing greg.ewing at canterbury.ac.nz
Thu Dec 8 01:26:01 EST 2016


BartC wrote:
>  println dirlist(cmdparams[2])        # Windows
>  println tail(cmdparams)              # Linux

I'm not familiar with your language, so I'll reply
in Python. If you write it like this:

    for arg in sys.argv[1:]:
       for name in glob(arg):
          print(name)

then the user will be able to invoke it the same way
on both systems.

-- 
Greg


More information about the Python-list mailing list