Skip to content

Instantly share code, notes, and snippets.

@masci
Created April 20, 2015 18:24
Show Gist options
  • Save masci/8efe6706f39887dc52aa to your computer and use it in GitHub Desktop.
Save masci/8efe6706f39887dc52aa to your computer and use it in GitHub Desktop.
# subcommunities.py
import sys
sys.modules['__main__'].__dict__.update({
'PyCon': type('PyCon', (object,), {}),
'numpy': type('numpy', (object,), {'infty': 'foo'}),
'pythonistas': type('Foo', (object,), {'enjoy': lambda x: x, 'fun': 'foo'})
})
sys.modules['subcommunities'] = list()
sys.modules['numpy.nifty'] = 'foo'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment