How to call another wxPython executable from current running exec?

19 views
Skip to first unread message

WxPyKT

unread,
May 26, 2015, 2:01:55 PM5/26/15
to wxpytho...@googlegroups.com
Hi, 

I have two wxPython executables T1 and T2. T1 has a button for starting T2. I built both T1 and T2 using pyinstaller in the same bin directory as follows:

bin/dist/T1/...
bin/dist/T2/...

I'm able to launch T1 and T2 successfully by clicking on their respective executables. But, when I try to start T2 from T1, I get an error:

Traceback (most recent call last):  
  File "<string>", line 15, in <module>  
  File "c:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
    mod = _self_doimport(nm, ctx, fqname)  
  File "c:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
    exec co in mod.__dict__  
  File "bin\build\pyi.win32\jobmanager\out00-PYZ.pyz\wx", line 45, in <module>  
  File "c:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 386, in importHook
    mod = _self_doimport(nm, ctx, fqname)  
  File "c:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 480, in doimport
    exec co in mod.__dict__  
  File "bin\build\pyi.win32\jobmanager\out00-PYZ.pyz\wx._core", line 4, in <modu
le>  
  File "c:\pyinstaller-2.0\PyInstaller\loader\iu.py", line 409, in importHook
    raise ImportError("No module named %s" % fqname)  
ImportError: No module named _core_  

T2 is launched from T1 as below:

output = subprocess.check_output("../T2/T2.exe",stderr=subprocess.STDOUT)

I'm not sure what the issue is. What's the correct way to launch T2 from T1 or do I need to change anything on the build? Copying T2.exe to dist/T1 and launching as subprocess.check_output("T2.exe",...) does not help too. 


Thanks

Reply all
Reply to author
Forward
0 new messages