A startup puzzle
Stephen Horne
$$$$$$$$$$$$$$$$$ at $$$$$$$$$$$$$$$$$$$$.co.uk
Mon Sep 29 14:24:12 EDT 2003
On Mon, 29 Sep 2003 11:31:05 -0500, "Edward K. Ream"
<edreamleo at charter.net> wrote:
>Any ideas for a clean solution? Thanks.
I am not sure that I understand what you are saying, but I'll make a
quick suggestion...
Perhaps 'app' can be a global variable within 'leoGlobals', but
assigned the value 'None' when the module is imported. Your
initialisation code can then reassign the variable at the appropriate
time.
If you refer to 'app.whatever' while 'app' is still 'None' you should
get an exception.
That's not what most people mean by 'singleton' of course, but if you
can be sure of your initialisation sequence it can probably do the
job.
--
Steve Horne
steve at ninereeds dot fsnet dot co dot uk
More information about the Python-list
mailing list