[mod_python] attribute snacks

Mike Partin fuzzy at camisade.net
Thu Sep 9 14:01:49 EDT 2004


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
> 



More information about the Mod_python mailing list