There was an error while loading. Please reload this page.
1 parent c51ac50 commit 952e854Copy full SHA for 952e854
python-tuts/0-beginner/8-Modules_Packages_Namespaces/example1/main.py renamed to python-tuts/0-beginner/8-Modules_Packages_Namespaces/Eg.1/main.py
python-tuts/0-beginner/8-Modules_Packages_Namespaces/example1/module1.py renamed to python-tuts/0-beginner/8-Modules_Packages_Namespaces/Eg.1/module1.py
python-tuts/0-beginner/8-Modules_Packages_Namespaces/Eg.2/main.py
@@ -0,0 +1,13 @@
1
+# main.py
2
+import module1
3
+
4
+# even though test was added to sys.modules
5
+# in module1, we can still access it from here
6
+import test
7
8
+print(test())
9
10
+# don't do this! It's a bad hack to illustrate how import looks
11
+# in sys.modules for the symbol we are importing
12
13
0 commit comments