I understood that there is a way(mentioned here) to import all objects from module using
from testmodule import *
As using '*' causes some confusions while accessing definitions, How can I import only variables from the module?
I understood that there is a way(mentioned here) to import all objects from module using
from testmodule import *
As using '*' causes some confusions while accessing definitions, How can I import only variables from the module?
You will have to specify each variable.
from testmodule import (
DEF1, DEF2, DEF3, ...
)
you can import specific variable :
from testmodule import variable_name