FAQ
Thanks for the help guys. Passing the variable as a class parameter
(or even function parameter) is not really a possibility due to the
structure of the actual program code. The real world problem is that
I'm defining a global variable for a base application path for my
program, which changes depending on whether the program is being run
as a script, an compiled exe, and if there are preconfigured settings
in the windows registry and/or a config file. This was previously
being done in the global space of the "main" application script. The
class that needed this info was about 5 or six steps down the import
tree.

I think my solution is going to involve taking all the logic for
finding the base path out of the main app script and putting it in
it's own module. That way anything that needs to see that variable
can just import that module and not have to worry about strange import
loops.

-Sean Levatino

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedAug 4, '03 at 2:27p
activeAug 5, '03 at 7:58p
posts6
users5
websitepython.org

People

Translate

site design / logo © 2022 Grokbase