Hi Marco,
Could you try if the attached patch does the trick for you?
(I've tested it with Python 2.7.)
Ralf



----- Original Message ----
From: "mbias...@bluewin.ch" <mbias...@bluewin.ch>
To: cplusplus-sig@python.org
Sent: Fri, September 10, 2010 2:44:22 AM
Subject: [C++-sig] __module__ of boost.python functions?

Hi everyone,

I'm trying to overload the python help function and hook it up to an external 
documentation system. I'm 

using the  qualified name of the object to perform a lookup in a documentation 
database. So far I've got it working for 

almost everything defined in Python (classes, functions, etc.), but have 
difficulties doing the same for boost python 

objects. If I do

MyCFunc.__module__

I get: AttributeError: 'Boost.Python.function' object has no attribute 
'__module__', 

even though I can see that __module__ is defined when I do a dir(MyCFunc). Is 
there a technical reason 

why functions and properties exported with boost python don't have the 
__module__ property defined? What is the 

recommended way of getting the qualified name for those? 

Thanks you very much for any hints! 

Best,
Marco

Attachment: bp_func_module_patch
Description: Binary data

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to