mirror of
https://bitbucket.org/Mattrixwv/pytutorial.git
synced 2025-12-06 18:23:57 -05:00
Added an example of importing a user created file
This commit is contained in:
11
fileAdd.py
Normal file
11
fileAdd.py
Normal file
@@ -0,0 +1,11 @@
|
||||
#This is a simple test on how to import files and use their functions and classes in python
|
||||
|
||||
#Import the functions from the file
|
||||
#These first two import specific functions from a file
|
||||
#from testImport import testFunction
|
||||
#from testImport import testFunction2
|
||||
#This command imports every function in the file
|
||||
from testImport import *
|
||||
|
||||
print(testFunction())
|
||||
print("The output of the second function is " + str(testFunction2(3, 4)))
|
||||
Reference in New Issue
Block a user