Python argv issue

Discussion in 'Windows Virtual Machine' started by HenriG, Sep 29, 2011.

  1. HenriG

    HenriG Bit poster

    Messages:
    3
    I run Windows XP (family) on Parallels v7.0 on my MacBook pro.
    A Python program that used to work properly is now failing.
    The sys.argv function returns only the script name, and is missing the parameters.
    The python script is launched from a .bat file : .\Make-Genea.py Chaumont all

    the python code :

    print ('Starting now : ', stamp)
    basename = 'Empty'
    print ("Argv :", sys.argv)

    the resulting messages :

    Starting now : 2011-09-29 16:33:06
    Argv : ['Z:\\Users\\Henri\\Desktop\\Genea\\Livres\\Make-Genea.py']

    Any idea?

    Thanks
    Henri
     
  2. HenriG

    HenriG Bit poster

    Messages:
    3
    Found a solution

    In the .bat file, I have replaced the line
    .\Make-Genea.py Chaumont all
    by
    Python Make-Genea.py Chaumont all

    and it seems to work fine again!!
    Found this solution in a Python forum : http://bugs.python.org/issue7936

    Cheers,
    Henri
     

Share This Page