Key Wait: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
<source lang="python">
<source lang="python">
#use "spawn spawn_demo.py, local" to invoke this python script from
#use "spawn spawn_demo.py, local" to invoke this
within pymol
#python script from within PyMOL
 
wait=""
wait=""
i=0
i=0

Latest revision as of 16:29, 15 August 2013

#use "spawn spawn_demo.py, local" to invoke this
#python script from within PyMOL

wait=""
i=0
while i < 12 and wait!="x":
  cmd.turn("y", 30)
  print "Press enter key to continue or x + enter to terminate"
  wait=raw_input()
  i=i+1
print "Done"

Note: this approach only works when you have a console window open.