[check] run() seems to only accept [0-9a-zA-Z/-_] and special chars are quoted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
In Progress
|
Medium
|
RaiMan |
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
tags: | added: 0.9.9 api |
Changed in sikuli: | |
status: | New → In Progress |
importance: | Undecided → Medium |
assignee: | nobody → RaiMan (raimund-hocke) |
tags: |
added: fkt-run removed: 0.9.9 api |
Changed in sikuli: | |
importance: | Medium → High |
milestone: | none → x1.1 |
tags: | added: testit |
Changed in sikuli: | |
importance: | High → Medium |
milestone: | 1.1.0 → 2.0.0 |
Changed in sikuli: | |
importance: | Medium → Low |
importance: | Low → Medium |
milestone: | 2.0.0 → 2.1.0 |
summary: |
- run() seems to only accept [0-9a-zA-Z/-_] and special chars are quoted + [check] run() seems to only accept [0-9a-zA-Z/-_] and special chars are + quoted |