Running executable from python

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Running executable from python

This post has NOT been accepted by the mailing list yet.
Hi everybody,

I am trying to run an executable compiled from c++ using python console in Slicer on Ubuntu. I tried os.system and os.subprocess, but I either get 0 or nothing in return when I use a precompiled version of Slicer or Slicer just exits if I use a compiled form source versio with USE_SYSTEM_PYTHON=1.

Both functions work in python in terminal.

A while ago I also had Slicer on my mac and I could run executables if I opened Slicer with sudo, but this doesn't work on Ubuntu.

Thank you