marylandgis

Importing modules - but variable still not defined

Discussion created by marylandgis on May 9, 2012
Latest reply on May 9, 2012 by marylandgis
Can someone help me figure out cross-referencing between modules?

I'm trying to move all of the data and html/css variables out of my main python script.  So I created two new modules:

data_params.py
html_css.py

When I move the data parameters out to data_params.py and import that module, my script still works fine.

But then I also move the html and css vars out to the second module, html_css.py.  That module references some vars in the data_params module.  When I run the main script, the python shell highlights the reference in html_css.py and says the var is undefined.

Can you tell what's wrong with this?

Thanks,

Outcomes