[mod_python] attribute snacks

Mike Partin fuzzy at camisade.net
Fri Sep 10 11:21:14 EDT 2004


Fortunately the problem was resolved yesterday. Sadly I have no idea
why. I recompiled apache+mod_python to take advantage of threading. And
while I see this as a possible fault on apache for not being able to
spawn threads for python, it's *HIGHLY* unlikely. I wasn't using any
threaded code so this is just wierd. But in any case it's working now.
Thanks to all of you for the feedback.

Mike "Fuzzy" Partin

On Fri, 2004-09-10 at 03:09, Brian Bird wrote:
> 'Fraid I've no idea what's causing your problem, but FYI when I try a
> similar thing with my own objects I get the same list of methods and
> attributes both from the command line and from within modpython. I'm also
> using Apache 2.0.50, modpython3.1.3 and python2.3.3 (On Suse 9.1 linux)
> 
> Only thing I can think of is to try removing any .pyc files and restart
> apache.
> 
> Brian
> 
> -----Original Message-----
> From: mod_python-bounces at modpython.org
> [mailto:mod_python-bounces at modpython.org] On Behalf Of Mike Partin
> Sent: 09 September 2004 19:02
> To: mod_python user mailing list
> Subject: Re: [mod_python] attribute snacks
> 
> 
> Allow me to expand a bit on this as my first message was a bit....obtuse.
> 
> On gentoo, in current up to date (as of this writing) state. Running Apache
> 2.0.50, mod_python 3.1.3, and python 2.3.3, I have the following issue.
> 
> On the commandline I get this by doing a dir() on a class instance from a
> custom module. ['__doc__', '__init__', '__module__', 'conn', 'curs',
> 'dbname', 'host', 'insert', 'select', 'user']
> 
> doing this from mod_python however gets me these results. ['__doc__',
> '__init__', '__module__', 'insert', 'select']
> 
> the insert, and select entries, are methods, the conn,curs,dbname,host, and
> user entries are attributes, which mod_python seems to eat and then complain
> about the lack of. Any help would be greatly appreciated in this area as
> I've been scouring docs and mailing list archives trying to find any other
> instances of this problem and have thus far come up with nothing.
> 
> - Mike "Fuzzy" Partin
> 
> 
> On Thu, 2004-09-09 at 10:50, Mike Partin wrote:
> > Is there something I've missed or a more serious issue at heart here. 
> > I've imported a module, made an instance of the class therein, however 
> > I'm getting stack traces claiming an attribute is not present, despite 
> > the code working perfectly on the command line and the attribute 
> > indeed actually being there. When I decided to do a little debugging 
> > and put a
> > dir(obj) in there, I was surprised to find that the object had only
> > methods, and *no* attributes listed whatsoever. I take this isn't normal
> > behaviour, I may be wrong, but it's kind of shaking my deadlines a bit
> > here. Any help would be appreciated.
> > 
> > Mike "Fuzzy" Partin
> > 
> > _______________________________________________
> > Mod_python mailing list
> > Mod_python at modpython.org 
> > http://mailman.modpython.org/mailman/listinfo/mod_python
> > 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
> 



More information about the Mod_python mailing list