More specifically, I have a file
file file1.py:
if __name__ == '__main__':
a = 1
and from file file2.py, I want to do something like
import file1
print file1.a
without modifying file1.py
More specifically, I have a file
file file1.py:
if __name__ == '__main__':
a = 1
and from file file2.py, I want to do something like
import file1
print file1.a
without modifying file1.py