Re: [C++-sig] [Py++] Missing struct

2009-12-13 Thread Roman Yakovenko
On Mon, Dec 14, 2009 at 2:06 AM, Nikolaus Rath wrote: > mb = ctypes_module_builder_t( [header_file], symbols_file, gccxml_cfg ) > select_fn = lambda f: (check if f is the struct that I want) > mb.calldefs( select_fn ).include() > > But I could not figure out what kind of argument the select_fn fun

Re: [C++-sig] [Py++] Generate Python code for ctypes?

2009-12-13 Thread Nikolaus Rath
Roman Yakovenko writes: >> The generated code contains >> >> libfuse_lib = ctypes.CDLL( r"/usr/lib/libfuse.so" ) >> >> I'd rather have the library looked up dynamically, as in >> >> libfuse = CDLL(find_library("fuse")) >> >> Is there a way to accomplish this? > > The functionality you ask doesn't

Re: [C++-sig] [Py++] Missing struct

2009-12-13 Thread Nikolaus Rath
Roman Yakovenko writes: >> Why is the fuse_file_info struct not translated into ctypes code? > > This is because Py++ tries to make some intelligent guess what to > export. By default it exports all declarations found in the files in > the same directory. > > I suggest you to use include/exclude f

Re: [C++-sig] [Py++] Missing struct (was: [Py++] Generate Python code for ctypes?)

2009-12-13 Thread Roman Yakovenko
On Sun, Dec 13, 2009 at 8:36 PM, Nikolaus Rath wrote: > Roman Yakovenko writes: You can take a look on gmplib example: http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/examples/gmplib_dev/ It is fully working. > > There seems to be a problem with the generated cod

Re: [C++-sig] [Py++] Generate Python code for ctypes?

2009-12-13 Thread Roman Yakovenko
On Sun, Dec 13, 2009 at 8:24 PM, Nikolaus Rath wrote: > Roman Yakovenko writes: >> On Sun, Dec 13, 2009 at 4:54 AM, Nikolaus Rath wrote: >>> Roman Yakovenko writes: You can take a look on gmplib example: http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/examples/gmpli

[C++-sig] [Py++] Missing struct (was: [Py++] Generate Python code for ctypes?)

2009-12-13 Thread Nikolaus Rath
Roman Yakovenko writes: >>> You can take a look on gmplib example: >>> http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/examples/gmplib_dev/ >>> It is fully working. There seems to be a problem with the generated code: , | $ python | Python 2.6.4 (r264:75706, Nov 2 2009, 1

Re: [C++-sig] [Py++] Generate Python code for ctypes?

2009-12-13 Thread Nikolaus Rath
Roman Yakovenko writes: > On Sun, Dec 13, 2009 at 4:54 AM, Nikolaus Rath wrote: >> Roman Yakovenko writes: >>> You can take a look on gmplib example: >>> http://pygccxml.svn.sourceforge.net/viewvc/pygccxml/pyplusplus_dev/examples/gmplib_dev/ >>> It is fully working. >> >> Do I need the CVS versi