Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python can a imported module get variables from main module

import shared_stuff
import module1
shared_stuff.a = 3
module1.f()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #imported #module #variables #main #module
ADD COMMENT
Topic
Name
4+3 =