I am using Python 3.1.4, which is built into the scripting environment in an application (x64). So far, I have encountered many limitations with python built-in. I do not know if this is normal or if application programmers have blocked some functions.
For example, the following code does not work:
from multiprocessing import Process def f(name): print('hello', name) if __name__ == '__main__': p = Process(target=f, args=('bob',)) p.start() p.join()
sys.executable return the path to the application.
I tried this as well:
multiprocessing.forking.set_executable('C:\Python31\python.exe') multiprocessing.set_executable('C:\Python31\python.exe')
Without success.
Is a workaround possible? It is very unlikely that I will have leverage so that application developers can change something in their code.
thanks
EDIT
I got it to work by adding the following:
sys.argv = ['c:/pathToScript/scipt.py']
I also need this line:
multiprocessing.set_executable('C:/Python31/python.exe')
Otherwise, instead of running the code, another instance of the application opens.
The only problem I encountered is that I cannot use the methods that control the application itself (for example: create_project (), add_report (), ..). My main goal was to be able to call multiple methods without having to wait for the first completion to complete. But I think this is simply not possible.
F. Justin
source share