[mod_python] attribute snacks

Brian Bird brian.bird at securetrading.com
Fri Sep 10 10:09:18 EDT 2004

'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


-----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

More information about the Mod_python mailing list