Many thanks for you answer Thomas!
this is possible. Example:
def foo(a, b, c):def foo_async(a, b, c):
† command = "./myprogramm arg1 arg2"
† process = subprocess.Popen(command, shell=True,
† † † stdout=subprocess.PIPE, stderr=subprocess.PIPE)
† import threading
† t = threading.Thread(target=foo, args=(a, b, c))
Hope that helps.
Mister Vanhalen wrote, On 08/28/12 17:33:--
I need to launch an external program through a plugin. When I launch my program by my button in my interface (the plugin) through this usual code :
command = †"./myprogramm arg1 arg2"
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
PyMol waits the end of the program to screen a windows with my result and load new structure and cgo in PyMol, that's normal.
Is it possible that PyMol can go on and only when my program has finished, my plugin screens the results and load new structure in PyMoL.
I would like that we can use PyMoL in the meantime that my program is running.
Is it possible? I don't know how to put the thread for that...
Thank you for your help,
MPI for Developmental Biology