Skip to content

Instantly share code, notes, and snippets.

@rxdazn
Last active December 18, 2015 12:09
Show Gist options
  • Save rxdazn/5780497 to your computer and use it in GitHub Desktop.
Save rxdazn/5780497 to your computer and use it in GitHub Desktop.
rxdazn@yugen~/test/pypath$tree
.
├── bar
│   ├── __init__.py
│   ├── __init__.pyc
│   ├── newbar
│   │   ├── __init__.py
│   │   ├── __init__.pyc
│   │   ├── module1.py
│   │   ├── module1.pyc
│   │   ├── module2.py
│   │   └── module2.pyc
│   └── oldbar
│   ├── __init__.py
│   ├── module1.py
│   └── module2.py
└── main.py
3 directories, 12 files
rxdazn@yugen~/test/pypath$cat main.py
#!/usr/bin/python
from bar import module1
from bar import module2
def main():
module1.hello()
module2.hello()
if __name__ == '__main__':
main()
rxdazn@yugen~/test/pypath$cat bar/__init__.py
from newbar import module1
from newbar import module2
rxdazn@yugen~/test/pypath$python main.py
newbar module1
newbar module2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment