← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #169457]: Call vbs from Python

 

Question #169457 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/169457

    Status: Open => Answered

RaiMan proposed the following answer:
Your problem are the backslashes.

the easiest way is, to use a raw string r'some text containing \
(backslashes) and " (apostrophes)', where you can use backslashes and
apostrophes literally without escaping:

os.system(r'"D:\vb\helloWorld.vbs"')

in this case, the inner " are not really needed. But they would be
needed, if your path would contain e.g. blanks or you want to add
parameters to the command.

so this should work too in your case:

os.system(r"D:\vb\helloWorld.vbs")

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.