Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Douglass-MacBook-Pro:test doug$ cat file1.py
- VAR = 1
- Douglass-MacBook-Pro:test doug$ cat file2.py
- print VAR1
- Douglass-MacBook-Pro:test doug$ cat test.py
- from file1 import *
- print VAR
- from file2 import *
- Douglass-MacBook-Pro:test doug$ python test.py
- 1
- Traceback (most recent call last):
- File "test.py", line 3, in <module>
- from file2 import *
- File "/Users/doug/test/file2.py", line 1, in <module>
- print VAR1
- NameError: name 'VAR1' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement