Skip to content

Commit ae1f160

Browse files
add Name and Main examples
1 parent 778fc8c commit ae1f160

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

one.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
def func():
2+
print("func() in one.py")
3+
4+
5+
print("TOP LEVEL ONE.PY")
6+
7+
if __name__ == '__main__':
8+
print("one.py is being run directly")
9+
else:
10+
print("one.py has been imported")

two.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import one
2+
print("TOP LEVEL TWO.PY")
3+
one.func()
4+
5+
if __name__ == '__main__':
6+
print("Two.py being run directly")
7+
else:
8+
print("two is being imported")

0 commit comments

Comments
 (0)