Skip to content

Instantly share code, notes, and snippets.

@jaimergp
Created June 2, 2016 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaimergp/8c2efd34fb2c7eba8054eeec791bf768 to your computer and use it in GitHub Desktop.
Save jaimergp/8c2efd34fb2c7eba8054eeec791bf768 to your computer and use it in GitHub Desktop.
Clear recent files in UCSF Chimera Rapid Access panel
#!/usr/bin/env python
import os
from shutil import copy
from pprint import pprint
path = os.path.expanduser("~/.chimera/preferences")
copy(path, path + ".bak") # just in case
with open(path) as f:
data = f.read()
pydata = eval(data)
pydata['Rapid Access']['data history'] = []
with open(path, 'w') as f:
pprint(pydata, stream=f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment