Hi, I'm generating PNG images for a webserver whose WSGI python process will stay alive. For that reason I need to be able to startup and shutdown pymol using the API so it doesn't stay running (I assume that's how the API works). I've tried every combination I could figure to start it up after calling cmd.quit() but none of this seems to work. The second round hangs on cmd.quit and never saves a PNG. At this point the pymol process and thread are probably dead. How can I properly quit and restart pymol from the API? -- Patrick
import __main__ __main__.pymol_argv = [ 'pymol', '-qc'] # Quiet and no GUI import pymol from pymol import cmd pymol.finish_launching() cmd.load("http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1ZXE") cmd.png("/tmp/test1.png") cmd.sync() cmd.quit() print "Finished round 1" pymol.start_pymol() pymol.finish_launching() cmd.reinitialize() cmd.load("http://www.pdb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1ZXE") cmd.png("/tmp/test2.png") cmd.sync() cmd.quit() print "Finished round 2" ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net