Guest User

Untitled

a guest
Jul 3rd, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import os
  2.  
  3. mylang = 'test'
  4. family = 'wikipedia'
  5.  
  6.  
  7. custom_path = os.path.expanduser('~/user-config.py')
  8. if os.path.exists(custom_path):
  9. with open(custom_path, 'rb') as f:
  10. exec(compile(f.read(), custom_path, 'exec'), globals())
  11.  
  12. del f
  13. # Clean up temp variables, since pwb issues a warning otherwise
  14. # to help people catch misspelt config
  15. del custom_path
  16.  
  17. # Things that should be non-easily-overridable
  18. usernames[family]['*'] = os.environ['JPY_USER']
  19.  
  20. # If OAuth integration is available, take it
  21. if 'CLIENT_ID' in os.environ:
  22. authenticate['*'] = (
  23. os.environ['CLIENT_ID'],
  24. os.environ['CLIENT_SECRET'],
  25. os.environ['ACCESS_KEY'],
  26. os.environ['ACCESS_SECRET']
  27. )
Add Comment
Please, Sign In to add comment