We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57541f3 commit f1934a4Copy full SHA for f1934a4
examples/A21_import_system/import_absolute.py
@@ -0,0 +1,16 @@
1
+# Shows how to enforce and use absolute imports.
2
+# ------------------------------------------------------------------------------
3
+# Example script demonstrating absolute imports.
4
+from __future__ import absolute_import
5
+# Using absolute imports
6
+import asyncio
7
+
8
+# Absolute imports
9
+from foo.api.submodule1 import func1
10
+from foo.core.submodule2 import func2
11
+from foo.gui.submodule3 import func3
12
13
+# Call all functions
14
+func1()
15
+func2()
16
+func3()
0 commit comments