Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2014
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. Douglass-MacBook-Pro:test doug$ cat file1.py
  2. VAR = 1
  3. Douglass-MacBook-Pro:test doug$ cat file2.py
  4. print VAR1
  5. Douglass-MacBook-Pro:test doug$ cat test.py
  6. from file1 import *
  7. print VAR
  8. from file2 import *
  9. Douglass-MacBook-Pro:test doug$ python test.py
  10. 1
  11. Traceback (most recent call last):
  12. File "test.py", line 3, in <module>
  13. from file2 import *
  14. File "/Users/doug/test/file2.py", line 1, in <module>
  15. print VAR1
  16. NameError: name 'VAR1' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement