Don’t. The problem from the begging is found a proper way to execute a external python module (call a external software).
And the estrange fact still that the method the works in the OS terminal doesn’t on KiCad console (at least on my 2 computer with same Ubuntu distro).
I think that next steps is test on other distro / OS and if still doesn’t contact the KiCad developers.
I don’t need to read the stdout. These were just different test that I tried.
My end goal is execute kicost passing the XML file name. This will be enough to the existent GUI works. So:
This is all that I need. The test with stdout was to test if was some graphical load but, since kicost --version doesn’t load the graphics and return the version in the stdout.
Just launching kicost without passing --guide file.xml works for me from pcbnew, do you see the gui?
If you can get that far passing in other params should be trivial.
If you don’t see the GUI but get a Popen object as a result of Popen() call you can inspect what happened to it using returncode and stdout/stderr properties. Frankly python2 docs suck in this instance and I would not be surprised if some of the stuff that is described there simply doesn’t work on windows. https://docs.python.org/2/library/subprocess.html#popen-objects
@qu1ck, I just use some time to create and configure a virtual machine (all commands worked).
It really a KiCad issue on Ubuntu 16. I am reporting it now.