Re: [PyMOL] Testing if a .pml script is run in command line mode

2016-02-02 Thread Folmer Fredslund
Dear list, Seems like I was able to find it myself by searching for "scene" in the code on github. The magic name is "get_scene_list", which perhaps was not such a strange name afterall So, now I have put together a small script, to take all scenes in a pml script and render them by running PyM

Re: [PyMOL] Testing if a .pml script is run in command line mode

2016-02-01 Thread Folmer Fredslund
Dear list, Moving a bit further with this, I have been trying to find an easy way to iterate through the list of scene names. Or to get them somehow. I don't seem to be able to find any information about this and thought someone probably already knew. Thanks in advance! Folmer 2016-01-27 14:07

Re: [PyMOL] Testing if a .pml script is run in command line mode

2016-01-27 Thread Folmer Fredslund
Dear Tsjerk, Thanks! simply including if '-c' in invocation._argv in the script works fine for me, Best, Folmer 2016-01-27 12:43 GMT+01:00 Tsjerk Wassenaar : > Hey Folmer, > > You can check if '-c' not in invocation._argv > Of course, you'd also need to check combinations, so it would be matchi

Re: [PyMOL] Testing if a .pml script is run in command line mode

2016-01-27 Thread Tsjerk Wassenaar
Hey Folmer, You can check if '-c' not in invocation._argv Of course, you'd also need to check combinations, so it would be matching -.*c.* on the elements in _argv. There probably is a way to check for the GUI directly though. Hope it helps, Tsjerk On Wed, Jan 27, 2016 at 11:49 AM, Folmer Fred

[PyMOL] Testing if a .pml script is run in command line mode

2016-01-27 Thread Folmer Fredslund
Hi there, I was wondering if there is a way to check if a .pml is being run in command line mode (pymol -c), i.e. without the GUI. The reason I'm asking, is because I am making some scripts for figures, and save the representations as scenes. It would be nice to both be able to view them (running