Re: Python-list Digest, Vol 17, Issue 54

2005-02-03 Thread Andrew James
exist in mod_python? If the approach above isn't possible, what would your recommendations be for a solution to this issue? Many thanks for your time, Andrew James Subject: Re: ModPython: passing variables between ha

ModPython: passing variables between handlers?

2005-02-03 Thread Andrew James
uring the life of the request *from anywhere in my application* and which gets cleaned up for me automatically afterwards. Does something like this exist in mod_python? If the approach above isn't possible, what would your recommendations be for a solution to this issue? Many thanks

Re: Creating Fixed Length Records

2004-12-09 Thread Andrew James
then I > could create the format string once, then pass it a tuple with the > values for that record. Just a thought. > > So, gurus, what are your suggestions to tame this record? Are there > easier ways that I'm just not seeing? > > Thanks, > --greg -- Andrew James <[EMAIL PROTECTED]> -- http://mail.python.org/mailman/listinfo/python-list

Re: Loading a file only once into an object and being able to access it from other modules

2004-12-07 Thread Andrew James
You're looking for the Singleton pattern to ensure that only one instance of your class is instantiated at a time. There's a particularly useful discussion about this at: http://c2.com/cgi/wiki?PythonSingleton I suggest you try the different methods out and pick the one best suited to your situ

Error in previous post - Import behaviour

2004-12-04 Thread Andrew James
All, The example given in the previous e-mail I sent was wrong (and makes the question look stupid). In the attribute instantiation example, the __main__ declaration should read: > if __name__ == 'main': > y = myY() I meant it to show that even if I never instantiate X, its attributes still

Import Semantics, or 'What's the scope of an import?', and class attribute instantiation

2004-12-04 Thread Andrew James
n-specific advanced features I can use (things like closures, lambda forms, map(), etc. etc.). Could anyone point me towards some good resources? I would much appreciate some assistance in finding some answers to these questions, as the research I've done seems to be inconclusive, if not downr

Drawing Cogwheels and Combinatoric diagrams

2004-12-01 Thread Andrew James
Gentlemen, I'm looking for a graphing or drawing python package that will allow me to draw complex geometric shapes. I need to be able to create shapes like cogwheels and Venn diagrams: http://encyclopedia.thefreedictionary.com/Venn The library must support alpha blending and the ability to retu