Advertisement
furas

Python - import

Feb 25th, 2017
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. #   example1
  2. #   ├── main.py
  3. #   └── dir2
  4. #       ├── __init__.py
  5. #       ├── converters.py
  6. #       └── other.py
  7.  
  8. ### main.py ###
  9.  
  10. #from dir2.converters import Uppercase
  11. from dir2.other import Uppercase
  12.  
  13. print('run main.py')
  14. Uppercase()
  15.  
  16. ### converters.py ###
  17.  
  18. def Uppercase():
  19.     print('execute Uppercase()')
  20.  
  21. #### other.py ###
  22.  
  23. from .converters import Uppercase
  24.  
  25. print('run other.py')
  26. Uppercase()
  27.  
  28. ### __init__.py ###
  29.  
  30. # empty
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement