Public bug reported:

Python libraries, such as optparse rely on the behavior that sys.argv[0]
is the script name - http://docs.python.org/library/sys.html#sys.argv
Sikuli omits script name and its sys.argv[0] is the first parameter.

from optparse import OptionParser
import sys
print sys.argv
(options, args) =  OptionParser().parse_args()
print options, args

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/788005

Title:
  X-1.0rc2: sys.argv doesn't contains script name as a first argument

Status in Sikuli:
  New

Bug description:
  Python libraries, such as optparse rely on the behavior that
  sys.argv[0] is the script name -
  http://docs.python.org/library/sys.html#sys.argv  Sikuli omits script
  name and its sys.argv[0] is the first parameter.

  from optparse import OptionParser
  import sys
  print sys.argv
  (options, args) =  OptionParser().parse_args()
  print options, args

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to