Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python import

#  import modules/files/functions
import MODULE_NAME/PATH_TO_FILE #  just import the module
import MODULE_NAME/PATH_TO_FILE as ... #  imports the module "under some name"
from MODULE_NAME/PATH_TO_FILE import FILE/FUNCTION #  imports just one file/function of the module
from MODULE_NAME/PATH_TO_FILE import FILE/FUNCTION as ...
from MODULE_NAME/PATH_TO_FILE import * #  imports all functions/files from one module/file
 
PREVIOUS NEXT
Tagged: #python #import
ADD COMMENT
Topic
Name
5+3 =