|
From: <tim...@en...> - 2007-05-07 21:59:30
|
Ethan Merritt wrote: > On Monday 07 May 2007 13:43, Mojca Miklavec wrote: > >>> Here's one example where it looks like they are working on an aqua >>> port in addition to the X11-OSX "hybrid" version we are currently using >>> http://pymol.sourceforge.net/obtaining.html >>> >> I don't know the dirty details, but I use pymol without X11 from the >> beginning (MacPyMOL probably). It seems to be a pure aqua port without >> traces of X11. >> > > OK, so then PyMOL is an example application that uses both command line > and GUI-driver input. Perhaps it would be useful to look and see how > it does so? Or does the "pure aqua" version not let you type commands > into a scripting window? > I have given a quick look... I don't know much about python, apart from the fact that it's an interpreted language, with its command line & parser. The python files have mutex locks all over the place: 93 # these locks are to be shared by all PyMOL instances within a 94 # single Python interpeter 95 96 _pymol.lock_api = threading.RLock() # mutex for API 97 _pymol.lock_api_c = threading.RLock() # mutex for C management of python threads 98 _pymol.lock_api_status = threading.RLock() # mutex for PyMOL status info 99 _pymol.lock_api_glut = threading.RLock() # mutex for avoiding GLUT In __init__.py, there's also: 76 # standard input reading thread 77 78 _pymol._stdin_reader_thread = None So it looks like it's multithreaded, with a thread dedicated to waiting for the input. Timothée |