Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.37 KB | None | 0 0
  1. python
  2. import os
  3. import threading
  4. import time
  5. from pymol import cmd
  6. def _auto_save():
  7.     filename = os.path.expanduser(time.strftime('~/pymol-auto-save-%s.pse'))
  8.     while True:
  9.         time.sleep(60) # interval in seconds
  10.         cmd.save(filename, quiet=1)
  11. _auto_save = threading.Thread(target=_auto_save)
  12. _auto_save.setDaemon(1)
  13. _auto_save.start()
  14. python end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement