Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread troy d. straszheim
Matthew Scouten (TT) wrote: Yeah. Find the guy who wrote a function with over 25 arguments. Bring a baseball bat. Persuade him of his error. +1. "Clue-by-four" time. -Original Message- From: cplusplus-sig-bounces+matthew.scouten=tradingtechnologies@python.org [mailto:cplusplus-si

Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread Matthew Scouten (TT)
Yeah. Find the guy who wrote a function with over 25 arguments. Bring a baseball bat. Persuade him of his error. -Original Message- From: cplusplus-sig-bounces+matthew.scouten=tradingtechnologies@python.org [mailto:cplusplus-sig-bounces+matthew.scouten=tradingtechnologies@python.

[C++-sig] RuntimeError on import from use of bases<>

2009-10-26 Thread Craig S. Bosma
Hi, I'm having a difficult time debugging an issue with boost.python bindings under OS X 10.6 -- the same bindings have been working fine under windows. On import of my module, I get an exception caught by python: > RuntimeError: unidentifiable C++ exception which I've traced down as far

Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread Eilif Mueller
Hi, Thanks! -DBOOST_PYTHON_MAX_ARITY=34 did indeed help ... for simple functions it did the trick, and it did increase my limit for member functions, but only to 25. For over 25 args for a member functions of an exposed class I get the following compiler error: /usr/include/boost/python/deta

Re: [C++-sig] Python converters for raw pointers: request for help

2009-10-26 Thread Randolph Fritz
I think what you want is here: and here: Take a look at that--see if it helps. -- Randolph Fritz

Re: [C++-sig] How to install extensions using bjam(?)

2009-10-26 Thread Anthony Foglia
Amos Anderson wrote: Well, what I had in mind was getting bjam to implement my solution #1. So bjam would scan my .profile to see if it had ever modified the file previously, and if so modify previously set variables, otherwise add new environmental variables, etc. But what if the user isn't us

Re: [C++-sig] How to install extensions using bjam(?)

2009-10-26 Thread Amos Anderson
On Mon, Oct 26, 2009 at 7:08 AM, Anthony Foglia wrote: > Amos Anderson wrote: >> >> I'm working on a project which is mixed C++/Python, and we use Boost >> functionality in our C++, and we've set up bjam to compile our project >> (on OSX). Everything seems to be working quite well. >> >> To use ou

Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread William Ladwig
There is a config macro BOOST_PYTHON_MAX_ARITY which may work for you. I'm not sure how high you can increase this number though. Refer to: http://www.boost.org/doc/libs/1_40_0/libs/python/doc/v2/configuration.html -Original Message- From: cplusplus-sig-bounces+wladwig=wdtinc@pyt

Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread Renato Araujo
Hi, Try use this flag in your compilation, -DBOOST_PYTHON_MAX_ARITY=XX The default value is 15, the I think thi can solve your problem. BR Renato Araujo Oliveira Filho On Mon, Oct 26, 2009 at 2:01 PM, Eilif Mueller wrote: > Hi, > > Wrapping a function f with 16 arguments: > > int f(int x1,

Re: [C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread troy d. straszheim
Eilif Mueller wrote: Hi, Wrapping a function f with 16 arguments: int f(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, int x10, int x11, int x12, int x13, int x14, int x15, int x16) { return x1; } BOOST_PYTHON_MODULE(test) { def("f",f); } yi

[C++-sig] function with >15 args yields get_signature error

2009-10-26 Thread Eilif Mueller
Hi, Wrapping a function f with 16 arguments: int f(int x1, int x2, int x3, int x4, int x5, int x6, int x7, int x8, int x9, int x10, int x11, int x12, int x13, int x14, int x15, int x16) { return x1; } BOOST_PYTHON_MODULE(test) { def("f",f); } yields /usr/include/boos

[C++-sig] How to call reshape((M,N),order='F') ?

2009-10-26 Thread Michele De Stefano
Hello to everyone. I have this problem. Assume I'm building a to-Python converter for a 3x2 matrix type, FORTRAN storage (these are not the real dimensions of my problem, but I give these numbers only to simplify the discussion). Into the "convert" C++ method, first, I build a list with all the

Re: [C++-sig] How to install extensions using bjam(?)

2009-10-26 Thread Anthony Foglia
Amos Anderson wrote: I'm working on a project which is mixed C++/Python, and we use Boost functionality in our C++, and we've set up bjam to compile our project (on OSX). Everything seems to be working quite well. To use our libraries from python scripts right now, we have to run this first: #!

Re: [C++-sig] Python converters for raw pointers: request for help

2009-10-26 Thread Michele De Stefano
I was forgetting to give an example of the Python code I would like to write: >>> from petsc4py import PETSc ... now some uninteresting code for building a PETSc.Mat python object ... ... the result will be a PETSc.Mat m object ... once created, if I write "m" and press RETURN, this is the o

Re: [C++-sig] Python converters for raw pointers: request for help

2009-10-26 Thread Michele De Stefano
Ok. Let me clarify (I looked at the link you suggested, but I've not found the answers I was looking for). There exist a "petsc4py" package, which can be extended using its C API. This package, already exposes PETSc types (and also the Mat type). petsc4py is not programmed using Boost Python. Now