Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierian-Data committed Feb 26, 2018
1 parent 1cef96f commit 72797a6
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 37 deletions.
Empty file.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def sub_report():
print("Hey Im a function inside mysubscript")
Empty file.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def report_main():
print("Hey I am in some_main_script in main package.")
7 changes: 2 additions & 5 deletions 06-Modules and Packages/00-Modules_and_Packages/mymodule.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
# This is the module we will be importing from!
# Great resource: https://docs.python.org/3/tutorial/modules.html

def func_in_mymodule():
print("I am a function inside of the mymodule.py file!")
def my_func():
print("Hey I am in mymodule.py")
36 changes: 4 additions & 32 deletions 06-Modules and Packages/00-Modules_and_Packages/myprogram.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,6 @@
################
# Example Three:
################
# Uncomment this and comment everything else to run!
from MyMainPackage.some_main_script import report_main
from MyMainPackage.SubPackage import mysubscript

# import mymodule
# mymodule.func_in_mymodule()
report_main()

################
# Example Two:
################
# Uncomment this and comment everything else to run!

# import mymodule as mm
# mm.func_in_mymodule()

################
# Example Three:
################
# Uncomment this and comment everything else to run!

# from mymodule import func_in_mymodule
# func_in_mymodule()

################
# Example Four:
################
# Uncomment this and comment everything else to run!

# This is posisble but frowned upon, often causes poorly readable code because
# you don't know what functions come from mymodule

# from mymodule import *
# func_in_mymodule()
mysubscript.sub_report()

0 comments on commit 72797a6

Please sign in to comment.