Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- python
- import os
- import threading
- import time
- from pymol import cmd
- def _auto_save():
- filename = os.path.expanduser(time.strftime('~/pymol-auto-save-%s.pse'))
- while True:
- time.sleep(60) # interval in seconds
- cmd.save(filename, quiet=1)
- _auto_save = threading.Thread(target=_auto_save)
- _auto_save.setDaemon(1)
- _auto_save.start()
- python end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement