← Back to team overview

sikuli-driver team mailing list archive

[Bug 528453] Re: run() seems to only accept [0-9a-zA-Z/-_] and special chars are quoted

 

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => Medium

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Tags removed: 0.9.9 api
** Tags added: fkt-run

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

Title:
  run() seems to only accept [0-9a-zA-Z/-_] and special chars are quoted

Status in Sikuli:
  In Progress

Bug description:
  Sik099, OS X 10.6

  The new run() command does not work as expected. seems to only accept
  [0-9a-zA-Z/-_.].

  Interpreting the example at the end, it seems that you quote any
  sequence of non-[0-9a-zA-Z/-_.] characters. This leads to a very
  limited usability of run().

  Using following script:
  cmd = "" # an input for the command line
  print "++++++++ run()"
  print run(cmd)

  print "\n++++++++ os.popen()"
  import os
  aus = os.popen(cmd)
  for z in aus:
     print z.strip()

  case: cmd = "ls -l Aperture.app"
  --- same result for both commands

  case: cmd = "ls -l Aperture.ap*"
  --- run() empty, popen() OK

  case cmd = "ps -A | grep Sikuli"
  --- run() empty, popen() OK

  The following 2 examples are interesting, as they accept non-[0-9a-zA-Z/-_] characters, but the handling is not as expected:
  (the applescript test.scpt returns hello + the first command line parameter )

  case: cmd = "osascript test.scpt \"*|#\""
  ++++++++ run()
  hello "*|#"     seems the " are double quoted
  ++++++++ os.popen()
  hello *|#

  
  case: cmd = "osascript test.scpt *|#"
  ++++++++ run() 
  hello *|#    can only run correctly when *|# is getting quoted by run()
  ++++++++ os.popen()
  <empty> which is correct, since this command must fail with a syntax error

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/528453/+subscriptions