Re: [Tutor] 'module' object has no attribute (setting aclass attribute)

2010-10-16 Thread Alan Gauld
"Tim Johnson" wrote conventions and named your class with a leading uppercase. ... I didn't know there was such a convention. Its not universally observed but it is common, not just in Python but in most OOP languages. It goes back at least as far as SmallTalk80, and maybe even to Simul

Re: [Tutor] 'module' object has no attribute (setting a class attribute)

2010-10-16 Thread Emile van Sebille
On 10/16/2010 8:35 AM Tim Johnson said... * Dave Angel [101016 03:45]: 1) The code is correct. But it'd be much clearer if you followed conventions and named your class with a leading uppercase. So the module would be called tmpl, and the class would be called Tmpl. I didn't know there

Re: [Tutor] 'module' object has no attribute (setting a class attribute)

2010-10-16 Thread Tim Johnson
* Dave Angel [101016 03:45]: > > 1) The code is correct. But it'd be much clearer if you followed > conventions and named your class with a leading uppercase. So the > module would be called tmpl, and the class would be called Tmpl. I didn't know there was such a convention. Serves me righ

Re: [Tutor] 'module' object has no attribute (setting a class attribute)

2010-10-16 Thread Dave Angel
On 2:59 PM, Tim Johnson wrote: My intention is to set a class attribute so that any number of instantiations will have this value. the module is tmpl.py. the class is tmpl. if from the script I do this: import tmpl tmpl.tmpl.templatepath = kbLib.templatepath I get error message: 'module' obje

Re: [Tutor] Moving my C++ code to Python?

2010-10-16 Thread David Hutto
On Fri, Oct 15, 2010 at 6:39 PM, Paul wrote: > On Fri, Oct 15, 2010 at 3:07 PM, David Hutto wrote: >> This isn't an answer to your question, but I'm doing about the same in >> reverse(it sounds like) as you're doing. More directly just processing >> data for 2-d/3d graphs using matplotlib and wxp

Re: [Tutor] Moving my C++ code to Python?

2010-10-16 Thread Stefan Behnel
Paul, 15.10.2010 23:29: I have a software written in C/C++ but considering porting most of it to python, as it seems like it's a better choice for decision making portion of the code. Write a wrapper first. I'm also thinking about having a 'matlab' like interface for reading, processing, and

Re: [Tutor] Statistic-Program Problems! Please Help Quickly!

2010-10-16 Thread Steven D'Aprano
On Fri, 15 Oct 2010 05:22:45 pm Vince Spicer wrote: [trim nearly 200 lines of quoted text] > You might want to look that returning data > http://docs.python.org/library/functions.html Vince, would you mind trimming your responses in future? There's no need to quote the entire conversation just t