[C++-sig] BoostPython: C++ function with "non-const double reference" argument issue. Python looks for float causing argument mismatch.

2014-01-14 Thread Liam Herron
Here is my example: --- CPP Code: --- #include using namespace boost::python; void updateDoubleReference(double& x) {

Re: [C++-sig] How to wrap class enums

2014-03-11 Thread Liam Herron
Here is an example: // c++ code class A { public: enum ATypes { ONE, TWO, THREE }; }; // boost python code object obj_A = class_ ("A", "A simple A object", init<>() ) ; { scope in_A(obj_A); enum_ ("ATypes") .value("ONE", A::ONE)

Re: [C++-sig] Expose a C++ function with an argument of template vector to Python: Boost.Python.ArgumentError

2015-11-04 Thread Liam Herron
What happens if you do: print canupo.read_msc_header(mscfile, scales, float(ptnparams)) ? From: Cplusplus-sig [mailto:cplusplus-sig-bounces+herron=ellington@python.org] On Behalf Of Zhan Li Sent: Tuesday, November 03, 2015 5:13 PM To: cplusplus-sig@python.org Subject: [C++-sig] Expose a C+

[C++-sig] passing NoneType as argument to constructor

2016-01-29 Thread Liam Herron
For the following code: --- #include using namespace boost::python; namespace // unnamed { class NullableDouble { public: Nullabl

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread Liam Herron
You should open a cmd shell tool that comes with VS : e.g. "VS2010 x86 Native Tools Command Prompt" or "VS2010 x64 Native Tools Command Prompt" And then in this shell, run your: b2 toolset=msvc-10.0 --with-python link=shared It looks like your python version is 64-bit python (Is that

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread Liam Herron
X86' So it seems to be picking up python34.lib in preference to python27.lib Do you think this just depends on the path order? David From: Cplusplus-sig [mailto:cplusplus-sig-bounces+david.aldrich=emea.nec@python.org] On Behalf Of Liam Herron Sent: 09 March 2016 14:40 To: Devel

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-09 Thread Liam Herron
: Re: [C++-sig] Trouble building boost with Visual Studio 2010 Ok, thanks. The console defaults to 3.5, which is the problem. I'll see what I can do. From: Cplusplus-sig [mailto:cplusplus-sig-bounces+david.aldrich=emea.nec@python.org] On Behalf Of Liam Herron Sent: 09 March 2016 16:

Re: [C++-sig] Trouble building boost with Visual Studio 2010

2016-03-10 Thread Liam Herron
please why it's still choosing Python 3.4 instead of 2.7 please? Best regards David From: Cplusplus-sig [mailto:cplusplus-sig-bounces+david.aldrich=emea.nec....@python.org] On Behalf Of Liam Herron Sent: 09 March 2016 17:03 To: Development of Python/C++ integration Subject: Re: [C++-sig]

[C++-sig] Issue Overriding C++ virtual methods in boost python for use in other C++ functions

2016-07-08 Thread Liam Herron
I followed the test examples that I found on the web, and I am able to replicate the examples. My issue occurs when I: 1) Write a C++ base class 2) Wrap this C++ base class in C++ 3) Inherit from this wrapped C++ class in python 4) Then try to use this python inherited cla

[C++-sig] How can I get access to "argv/argc" command line in a boost python c++ extension?

2018-01-26 Thread Liam Herron
So I have a boost python extension C++ library. I would like to access the "python commandline" in C++ without having to pass in the "sys.argv" into my C++ extension. Is there a way to do this? Include some boost python header and read it from some init variables or something? e.g. python s

[C++-sig] What is the best way to have a C++ function return a python datetime.date object or a python datetime.datetime object?

2020-07-06 Thread Liam Herron
trying to avoid additional python wrappers around my boost python library. Can this be done without additional python? What is the best/cleanest way to do this? Regards, Liam Herron = Email transmissio