← Back to team overview

sikuli-driver team mailing list archive

[Bug 1083013] Re: output not printing to console

 

If you want to run Sikuli scripts from other scripts, you should have a look  at the docs:
http://doc.sikuli.org/globals.html#importing-other-sikuli-scripts-reuse-code-and-images

and pack the things into def()'s, that you are using in the main workflow from these imported scripts.
This works easiest, when all scripts are in the same folder.

Another possibility is using exec file, but then you have to handle the
path's somehow and take care, that Sikuli finds the images.

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

Title:
  output not printing to console

Status in Sikuli:
  Invalid

Bug description:
  I am using Sikuli x-1.0rc3 On Osx Lion 64 bit

  I run my unit test framework through the command line.

  I have a script that will turn off the wifi and turn it back on for the purposes of testing.  Within this script I use print to output debugging information, however when it won't print when used in the framework.  When I call it normallly from the command line it will work just fine.  using 
  $ sikuli-ide.sh -r [path to my script]/turnWifiOn.sikuli

  However when I call it from the other script, and capture the output, I only get the "[info]" and "[log]" lines which sikuli writes.
  Here is the code for that:

             cmd = "sikuli-ide.sh -r [path to my script]/turnWifiOn.sikuli"
              # Execute that command
              output = os.popen(cmd).read()

  Here output only contains those lines.  Is there a way to either write
  to the "[info]" and "[log]" lines? Or am I doing something weird?  One
  more piece. I can:

               print output

  and get it in the bash output.

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


References