[C++-sig] Re: Retiring the Python/C++-sig mailing list

2025-06-02 Thread Stefan Seefeld
, Jim Bosch via Cplusplus-sig >> wrote: >> >> >> On Wed, May 28, 2025 at 9:23 AM Stefan Seefeld >> wrote: >> >> I agree, but leave it to the list maintainer(s) to take any final >> decision. I'll answer questions here should any be raised. &

[C++-sig] Re: Retiring the Python/C++-sig mailing list

2025-05-28 Thread Stefan Seefeld
I agree, but leave it to the list maintainer(s) to take any final decision. I'll answer questions here should any be raised. On Wed, May 28, 2025 at 9:17 AM Jim Bosch via Cplusplus-sig < cplusplus-sig@python.org> wrote: > This email list has seen almost no real traffic over the past few > years,

Re: [C++-sig] wrap union types with boost.python

2022-01-17 Thread Stefan Seefeld
On 2022-01-16 12:29, Malte Dreschert wrote: Hi Stefan, thanks for answering and a greetings from northern Germany to Berlin :) the struct is meant to hold color values (three floats) but the color space can be different. It contains three of these unions and one enum value that contains the

Re: [C++-sig] wrap union types with boost.python

2022-01-16 Thread Stefan Seefeld
On 2022-01-16 12:29, Malte Dreschert wrote: Hi Stefan, thanks for answering and a greetings from northern Germany to Berlin :) the struct is meant to hold color values (three floats) but the color space can be different. It contains three of these unions and one enum value that contains the

Re: [C++-sig] wrap union types with boost.python

2022-01-16 Thread Stefan Seefeld
this in a pythonic way. So, can you rephrase your question by describing `someStruct` in terms of behaviour rather than structure, i.e. in an "object-oriented" way ? Stefan -- ...ich hab' noch einen Koffer in Berlin... null__

Re: [C++-sig] Boost Python Wrong Python Version macOS

2020-09-11 Thread stefan
Hi Mortimer, let me forward your message to the Boost.Build list, where I hope someone will take appropriate action. Thanks, On 2020-09-10 9:24 p.m., Mortimer Hemmit wrote: Hi Stefan, Thanks for the advice and the link; they were really helpful. Just by itself, the line "using python

Re: [C++-sig] Boost Python Wrong Python Version macOS

2020-09-07 Thread Stefan Seefeld
Hi Mortimer, On 2020-09-06 12:54 p.m., Mortimer Hemmit wrote: Hi Stefan, Apologies for breaking the reply chain; I wasn't subscribed to the list earlier, so this is the only message I could reply to. Now I should be able to reply to other messages. Thanks for your email. I don't

Re: [C++-sig] Boost Python Wrong Python Version macOS

2020-09-05 Thread Stefan Seefeld
have, but I assume you can leave them out there, as that merely builds the `b2` tool itself.) Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailma

Re: [C++-sig] [boost python] : how to pass a tuple of lists from python to C++

2020-02-11 Thread stefan
he broadcasting. (Note: I haven't actually tried that; it just seems the natural fix to the issue ;-) ) Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.py

Re: [C++-sig] [boost python] : how to pass a tuple of lists from python to C++

2020-02-08 Thread Stefan Seefeld
() in your module, i.e. insert   `np::initialize();` at the top of your `dummy` module definition. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/lis

Re: [C++-sig] [boost python] : how to pass a tuple of lists from python to C++

2020-02-07 Thread stefan
() to see whether it's actually valid. See https://www.boost.org/doc/libs/1_72_0/libs/python/doc/html/reference/to_from_python_type_conversion.html#to_from_python_type_conversion.boost_python_extract_hpp.class_template_extract for details. Stefan -- ...ich hab' noch einen K

Re: [C++-sig] With boost python tuple, how to loop over tuple items?

2020-01-30 Thread stefan
ct(bpl::str(t[0])); and print that. Hope this helps, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Getting the same python instance back in boost::python?

2019-06-28 Thread Stefan Ring
On Fri, Jun 28, 2019 at 2:16 PM Nicholas Devenish wrote: > > I want to get the same python instance back for subsequent calls to > the C++ function e.g. I want this to work for the C++ structure below: > > import ident_ext > o = ident_ext.Owner() > assert o.get() is o.get() > > How can

Re: [C++-sig] Getting simple boost.python extension to work outside the test scripts - HELP!

2019-05-22 Thread stefan
shared library dependencies. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Getting simple boost.python extension to work outside the test scripts - HELP!

2019-05-22 Thread stefan
o the Boost.Build mailing list, since that's the best (only ?) place where you'll get an answer to this question. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org htt

Re: [C++-sig] Getting simple boost.python extension to work outside the test scripts - HELP!

2019-05-22 Thread stefan
not a Mac user, so all of this is second-hand information. Best, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Python support in boost::python (what version)

2019-05-20 Thread Stefan Seefeld
icense.html) clearly states that it is provided "...without warranty of any kind...". So make of it what you want.) Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Python support in boost::python (what version)

2019-05-16 Thread stefan
es building and running against a particular Python version, please file a bug report, and I'll try to help as quickly as possible. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@p

Re: [C++-sig] Linking issues with Boost.Python 1.69.0, Python 2.7, MSVC 14.0

2019-03-27 Thread Stefan Ring
On Tue, Mar 26, 2019 at 3:27 PM Sarah Rust wrote: > > Hello! > > I have been trying to build and link the latest Boost.Python to work with > Python 2.7 and my Visual Studio 2015 project (MSVC 14.0) with x64 > configuration. I've added the Boost library and Boost include directory to my > projec

Re: [C++-sig] GSOC

2019-03-21 Thread stefan
. So, should that include all the set methods of Python? Yes. Also, is there any discussion channel where I can communicate with you? I'd suggest https://gitter.im/boostorg/python Stefan -- ...ich hab' noch einen K

Re: [C++-sig] Fail to build Boost Python Tutorial: LNK1120: 55 unresolved externals

2019-03-19 Thread Stefan Ring
On Tue, Mar 19, 2019 at 3:52 PM Markus Johann Schmidt wrote: > A complete output of my command prompt is attached as well. > > May my problem be > > wrong import of python library? I try to use a wildcard in lib boost_python > instead of `boost_python36-vc140-mt-x64-1_69` But the error stays the

Re: [C++-sig] Calling python function repr from C++ using boost.python (possible?)

2019-03-05 Thread Stefan Ring
On Sat, Mar 2, 2019 at 6:12 PM Jones, Torrin A (US) wrote: > > Is it possible to call repr from C++ on a C++ object that can be converted to > python? Let me explain. > > > > I have an enum that I converted to python using boost::python::enum_(). That > class already provides a good repr() to

Re: [C++-sig] [Boost-build] Fwd: Re: Boost 1.69 python3 module

2019-02-08 Thread Stefan Seefeld
it will reveal something: local py-ext-alternative = [ $(py-ext-target).select-alternatives $(property-set) debug ] ; In Christ, Steven Watanabe ___ Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build -- Stefan --

Re: [C++-sig] [Boost-build] Boost 1.69 python3 module

2019-02-06 Thread stefan
Alexander, I'm replying by re-adding some addresses, just so you don't miss Steven's reply below. Can you please try that and report back what you get ? On 2019-02-06 12:13 p.m., Steven Watanabe via Boost-build wrote: AMDG On 2/6/19 7:22 AM, stefan via Boost-build wrote: On

Re: [C++-sig] Boost 1.69 python3 module

2019-02-06 Thread stefan
ered. I don't see anything obvious either. Steve, can you help with this ? Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Boost 1.69 python3 module

2019-01-29 Thread stefan
hon appears to never be built or installed and there is no output indicating that there was an error with any stage of the build. Can you please attach the full output of your build ? (Perhaps even rerun with `-d2` to make the output more verbose ?) It looks as though all other Boost modu

Re: [C++-sig] distributing libraries built using Boost.Python

2018-10-19 Thread Stefan Seefeld
ttled, it's much easier to share binaries. If you are mainly working with Python, i.e. if your C++ code is only used in extension modules, you may consider using Anaconda, which provides some structure in its package management that could help you and your users. Cordially, Stefan --

Re: [C++-sig] Boost python undef symbols

2018-07-14 Thread Stefan Seefeld
perator new and delete), and the Python library itself (which provides all the symbols starting with `__impl_Py`), so you need to make sure those libraries are linked to in your command-line. Stefan -- ...ich hab' noch einen Koffer in Berlin... __

Re: [C++-sig] How to derive a python class from a C++ base abstract class [Boost.python]

2018-07-10 Thread Stefan Seefeld
eally appreciated. Q2: How do I implement callbacks from C++  to python i.e. my callback function is written in python. Have you read the docs (http://boostorg.github.io/python/doc/html/tutorial/tutorial/exposing.html#tutorial.exposing.class_virtual_functions) ? Stefan -- ...ich hab'

Re: [C++-sig] bjam invocation error "rule copyright unknown in module man"

2018-05-05 Thread Stefan Seefeld
load ERROR: rule "Copyright" unknown in module "man". How to fix this? Thanks. I forwarded the question to the Boost.Build maling list. Rene Rivera replied: It's using an old, probably system installed, b2 executable. You need to use the b2 from the current boos

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

2018-01-26 Thread Stefan Seefeld
ader and read > it from some init variables or something? > You don't have to pass `sys.argv` as an argument. You can inspect it from wherever you need it. Just import `sys` and inspect the elements of `sys.argv`, just as you would do in Python. Stefan -- ...ich hab

Re: [C++-sig] Boost.Python and Python limited API

2017-10-10 Thread Stefan Seefeld
ostorg/python/issues so we can discuss details. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Overloading methods in derived class

2017-08-19 Thread Stefan Ring
On Thu, Aug 17, 2017 at 12:32 AM, Jeremy Mayes wrote: > File “.../test.py”, line 11, in > b.foo(0) > Boost.Python.ArgumentError: Python argument types in > B.foo(B, int) > Did not match C++ signature: > foo(B {Value}, int, double) > > I’m not surprised by this behavior given python’s

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-23 Thread Stefan Seefeld
On 23.07.2017 03:15, Jian wrote: > > Hi Stefan, > > I still got a assertion failed at Py_Initialize(). Below is the message. > > Program: C:\Python35\python35_d.dll > File: ..\Objects\object.c > Line: 84 > Expression: (op->_ob_prev == NULL) == (op->_ob_next == NU

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-22 Thread Stefan Seefeld
27;t initialized Python correctly. A good starting point might be this example: https://github.com/boostorg/python/blob/develop/example/quickstart/embedding.cpp (I'm the Boost.Python maintainer. While I'd be happy to help you using Boost.Python, I think this is mostl

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-21 Thread Stefan Seefeld
st commenting on the approach you had taken, which was Windows-specific. > > Thanks again for your kind help. > Best Regards, > > Jian Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] How to get output from python embedded in VC++

2017-07-20 Thread Stefan Seefeld
initialize your Python session (in C++). I'm only a casual Windows user (and even less programmer), so can't comment on any Windows-specific idioms to use. HTH, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Convert OpenCV class reference return value

2017-04-04 Thread Stefan Seefeld
would be to have as_to_python_function.cpp split into > reference and copy-constructor classes to handle the appropriate > differences. Right now the same class handles both cases. > > > > Any help is appreciated. > > > > I am including a simple example: > (I'm not

Re: [C++-sig] Is there anybody has idea about access the set from python?

2017-01-20 Thread Stefan Seefeld
is nothing you can't already do using the boost::python::object interface. It's just a bit more concise to have a dedicated high-level wrapper type for 'set'.) Stefan -- ...ich hab' noch einen Koffer in Berlin... _

Re: [C++-sig] Is there anybody has idea about access the set from python?

2017-01-19 Thread Stefan Seefeld
All boost::python object types are thin wrappers around their Python counterparts, i.e. a boost::python::dict simply wraps a Python dict. See http://boostorg.github.io/python/doc/html/tutorial/tutorial/object.html#tutorial.object.derived_object_types Stefan -- ...i

Re: [C++-sig] Boost.Python NumPy extension

2016-10-09 Thread Stefan Seefeld
separate packages. (The new headers are likewise kept separate for the same reason.) Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

[C++-sig] Boost.Python NumPy extension

2016-10-08 Thread Stefan Seefeld
ould like to ask for help with integrating the new NumPy extension into the Boost.Build-based build system, such that this will also be picked up by the regular Boost infrastructure. Please refer to https://github.com/boostorg/python/issues/89 if you'd like to help with this. Many

Re: [C++-sig] Boost Python. access pandas columns in the same order as in python

2016-10-05 Thread Stefan Seefeld
bject hasing. > > > How could I get those values in the original order of pandas dataframe > from C++? > I can't reproduce that; I see the same order (['CCC', 'BBB', 'AAA']) both in Python and in C++ with your code above. FWIW, Stefan

Re: [C++-sig] Boost Python Question - Multiple Classes and Modules not appearing as attribute

2016-09-09 Thread Stefan Seefeld
.py' file in your path so your extension module isn't loaded at all after the renaming ? (Note that the exercise of putting together a minimal self-contained test case, which I've been trying to suggest (still in vain, it seems), would allow you t

Re: [C++-sig] Boost Python Question - Multiple Classes and Modules not appearing as attribute

2016-09-09 Thread Stefan Seefeld
d, etc.) so we can attempt to reproduce your observations. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Boost Python Question - Multiple Classes and Modules not appearing as attribute

2016-09-08 Thread Stefan Seefeld
Hi Jon, please remove the dependency on the "opus/*" headers, so we can compile the module ourselves and try to reproduce what you are reporting. (That's what I meant with "self-contained test".) Thanks, Stefan On 08.09.2016 17:30, Jon Lederman wrote: > H

Re: [C++-sig] Boost Python Question - Multiple Classes and Modules not appearing as attribute

2016-09-08 Thread Stefan Seefeld
se we'd have to guess. The online docs at http://boostorg.github.io/python/doc/html/index.html should contain everything you need. Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplus

Re: [C++-sig] Segmentation Fault (core dumped) on Python 3.5.2 but not Python 2.7.12

2016-08-04 Thread Stefan Seefeld
Hi Matthew, would you mind submitting an issue on https://github.com/boostorg/python/issues for this. Thanks, Stefan On 04.08.2016 13:10, Matthew Conte wrote: > So I'm trying to create a boost python module that simply creates and > returns a numpy array, > but the fu

Re: [C++-sig] Testing build of Boost.Python

2016-07-16 Thread Stefan Seefeld
b cannot be found. Any > ideas of a workaround? It sounds like you are missing a debug version of the Python library. http://stackoverflow.com/questions/35250175/i-cannot-find-python35-d-lib might be of help. Best, Stefan -- ...ich hab' noch einen Koffer in Berlin... __

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

2016-07-08 Thread Stefan Seefeld
it__(self): > > pass > You need to initialize the base class. For example: def __init__(self): super(MyPySmoothFunction, self).__init__() Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cp

Re: [C++-sig] building boost with custom python 3.5 installation

2016-07-06 Thread Stefan Seefeld
me for the next release. HTH, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Stand-alone Boost.Python

2016-06-20 Thread Stefan Seefeld
On 20.06.2016 04:35, Giuseppe Corbelli wrote: > On Sat, 18 Jun 2016 00:25:08 -0400 Stefan Seefeld > wrote: >> Hello, >> I have started working on a new SCons-based build infrastructure for >> Boost.Python that allows the Boost.Python code to be compiled >> stand

Re: [C++-sig] Getting Boost.Python to explain itself better?

2016-06-18 Thread Stefan Seefeld
p://boostorg.github.io/python/doc/html/reference/topics/indexing_support.html#topics.indexing_support.class_map_indexing_suite), but even with that you do need to explicitly specify the types to map. HTH, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-

[C++-sig] Stand-alone Boost.Python

2016-06-17 Thread Stefan Seefeld
placing the official bjam-based build system. But once the new one has proven to be stable enough, I expect to actually build stand-alone releases for Boost.Python.) Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin...

Re: [C++-sig] enhancement: Py_DECREF / Py_XDECREF assertion

2016-04-27 Thread Stefan Seefeld
stion is indeed a good idea. In that case, would you mind submitting a patch / PR (against the 'devel' branch) ? (And seeing you using 'nullptr' above reminds me: please make sure the code is backward compatible with pre-C++-11). Please include a test case to demonstrate the fa

Re: [C++-sig] Multiple registration safety and unit testing

2016-04-21 Thread Stefan Seefeld
Hi David, I'm just reviewing Boost.Python PRs, and looking at https://github.com/boostorg/python/pull/55 I was reminded of this little exchange. Sorry for having dropped the ball here... On 01.02.2016 17:36, David Sankel wrote: > On Sat, Jan 30, 2016 at 7:30 AM, Stefan Seefeld <

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

2016-03-09 Thread Stefan Seefeld
with the current version of Python? > I'm unfortunately unable to answer your question, as the question seems more about the build system than Boost.Python itself. Therefore I'm including the Boost mailing list in my reply, hoping that some Boost.Build expert may be able to help. Rega

Re: [C++-sig] Problem with and fix for automatic pointer registration in Boost.Python 1.60

2016-03-06 Thread Stefan Seefeld
gt; > If someone on this list could take a look at this change, I'd > appreciate it. Let me know if you have any questions. I have merged the PR, and will try to get it into master for the 1.61 release. Sorry this took so long. Stefan > > Thanks, > Greg Falcon > > >

Re: [C++-sig] calling python object's method from c++

2016-02-20 Thread Stefan Seefeld
e not. You are assigning the variables to themselves. (The compiler may even chose to optimize away these as no-ops !) I don't know swig, but for rich mapping between Python and C++ I would suggest you consider Boost.Python, which is way more powerful. Stefan -- ...ich hab&#

Re: [C++-sig] Multiple registration safety and unit testing

2016-01-30 Thread Stefan Seefeld
has not already been registered. > > > to: > > The behavior is undefined unless the specified 'type_info' object > has not already been registered with a semantically different > converter > > Any objections? Yes. Can you describe your use-case ? And what

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

2016-01-29 Thread Stefan Seefeld
--- > > > > I would like to have another constructor method in python that takes a > ‘None’ and returns the same as the no arg constructor ‘NullableDouble()’ > Just create a 'factory' function that takes a Python object (and which you th

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Stefan Seefeld
ike an interesting idea. Fine, I just mentioned it to illustrate the idea. There are other APIs to achieve the same. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-12 Thread Stefan Seefeld
On 12.01.2016 12:52, Tony Cappellini wrote: > > Stefan, > > > To: cplusplus-sig@python.org <mailto:cplusplus-sig@python.org> > Subject: Re: [C++-sig] Passing memory allocated in C++ to Python > Message-ID: <56945036.8080...@seefeld.name > <mailto:56945036.8

Re: [C++-sig] Passing memory allocated in C++ to Python

2016-01-11 Thread Stefan Seefeld
data and methods, such as: class something { public: something() : buffer_(allocate_memory()) {} void call_ioctl() { /*...*/} private: char *buffer_; }; if you expose the above class together with the constructor and the 'call_ioctl()' member f

Re: [C++-sig] Beginner - PyObject_CallObject fails because imported module is not recognized

2016-01-06 Thread Stefan Seefeld
ot;None" there, which has the same effect. In any case, I'd recommend you rewrite your code using the Boost.Python bindings; it will become much more compact and readable, and will look very much like the Python code above. :-) Regards, Stefan -- ...ich hab' noch ei

Re: [C++-sig] pybind11 -- alternative to Boost.Python

2015-10-19 Thread Stefan Seefeld
e alluding to that lead to incompatibilities. Such a document may ultimately also be important for potential users when they consider the alternatives. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailin

Re: [C++-sig] Magic boost conversion unicorn hook?

2015-09-25 Thread Stefan Seefeld
ython does, as explicit type conversion is rarely necessary, in particular from the Python side. Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] formatting str of exposed type

2015-09-18 Thread Stefan Seefeld
epending on how flexible you want this to be, you could hard-code the formatting spec into your wrapper class, or add a 'format' attribute that's being used, and which could then be customized from within Python. The possibilities are endless... Stefan -- ...ich hab&#x

Re: [C++-sig] register c++ std::pair and std::pair

2015-08-28 Thread Stefan Seefeld
On 28/08/15 11:41 AM, MM wrote: > On 28 August 2015 at 16:05, Stefan Seefeld <mailto:ste...@seefeld.name>> wrote: > > On 28/08/15 10:15 AM, MM wrote: > > > > Load 1 then 2 it should trigger the warning. > > Apologies for missing the includes.

Re: [C++-sig] register c++ std::pair and std::pair

2015-08-28 Thread Stefan Seefeld
I can compile without any modifications ? Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] register c++ std::pair and std::pair

2015-08-28 Thread Stefan Seefeld
On 28/08/15 10:15 AM, MM wrote: > > > On 28 August 2015 at 15:01, Stefan Seefeld <mailto:ste...@seefeld.name>> wrote: > > On 28/08/15 09:26 AM, MM wrote: > > This is in too separate modules. > > The converter is registered in module1, and the c

Re: [C++-sig] register c++ std::pair and std::pair

2015-08-28 Thread Stefan Seefeld
lieve this should work as there is no reason the two types should be confused. (It obviously depends on your "Converter" type, which you haven't shown.) Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___

Re: [C++-sig] register c++ std::pair and std::pair

2015-08-28 Thread Stefan Seefeld
t; > |/usr/lib64/python3.4/importlib/_bootstrap.py:321:RuntimeWarning:to-Pythonconverter > forstd::pairalready > registered;second conversion method ignored.| > > Is there a way to avoid this warning? > Why do you need the explicit converter if you also define a class_ ?

Re: [C++-sig] Extracting base object reference of arbitrary Python object

2015-08-18 Thread Stefan Seefeld
you will ask fundamentally different questions, which I'll gladly try to answer. :-) Regards, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] virtual functions with default implementation

2015-08-17 Thread Stefan Seefeld
Hi Alex, On 17/08/15 02:54 PM, Alex Mohr wrote: > On 8/17/2015 11:39 AM, Stefan Seefeld wrote: >> For the case with default implementation, the tutorial gives this >> wrapper: >> >>struct BaseWrap : Base, bpl::wrapper >>{ >> virtual std::str

Re: [C++-sig] virtual functions with default implementation

2015-08-17 Thread Stefan Seefeld
to implement the "default" case directly in the "else" branch above, rather than add it to the "def()" call. Stefan > > On Mon, Aug 17, 2015 at 8:03 AM, Stefan Seefeld <mailto:ste...@seefeld.name>> wrote: > > Hi, > > I'

[C++-sig] virtual functions with default implementation

2015-08-17 Thread Stefan Seefeld
ow why this is needed, and could perhaps even provide a little test case ? Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] [Boost.Python] Treating boost::variant like a reference?

2015-08-15 Thread Stefan Ring
On Mon, Aug 10, 2015 at 5:00 PM, Mario Lang wrote: > Hi. > > I am trying (off and on, because it would be useful, but I am not quite > there yet) to find a way to make Boost.Python cooperate with > Boost.Variant. I sort of managed to make a variant behave like a > value. However, things like mod

Re: [C++-sig] express pointer ownership

2015-08-13 Thread Stefan Seefeld
to it. I want to tell python to > let c++ manage it. Sounds like you want to use the "return_internal_reference" call policy (see http://boostorg.github.io/python/doc/html/tutorial/tutorial/functions.html#tutorial.functions.call_policies). Stefan -- ...ich hab' noch einen

[C++-sig] Boost.Python docs update

2015-08-05 Thread Stefan Seefeld
Hi all, I have updated the Boost.Python documentation. The new docs are available at http://boostorg.github.io/python. (For any issues you notice please submit a bug report at https://github.com/boostorg/python/issues. Thanks, Stefan -- ...ich hab' noch einen Koff

Re: [C++-sig] Member overloads signature not matching C++ signature

2015-07-31 Thread Stefan Seefeld
lue}) > stroke(path {lvalue}, context {lvalue}, bool) > > I am really confused as the signatures appear to match. I suspect I've > broken the converters with my wrapper class but I am unsure how to fix > it. I suspect the problem is that you "context" argumen

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-02 Thread Stefan Seefeld
On 02/06/15 10:36 AM, Christoff Kok wrote: > Hi Stefan, > > Thank you very much. That makes sense and my tests prove it. The code > runs as expected when I reserve enough space for the vector. > > I do not quite get it why it works in C++ and not python. I know too > lit

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-02 Thread Stefan Seefeld
finitely not a solution to your problem, which still is that you reference objects beyond their lifetime. HTH, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] Boost.Python C++ object reference in Python: unexpected behaviour.

2015-06-02 Thread Stefan Seefeld
tead of 'is'. Yes, it would be nice if the same Python (wrapper) object would be returned. I'm not sure how to do that, though. I'll think about it some more... HTH, Stefan -- ...ich hab' noch einen Koffer in Berlin... _

Re: [C++-sig] C++ copy construction and Python object copies

2015-05-29 Thread Stefan Seefeld
On 29/05/15 06:48 PM, Alex Mohr wrote: > On 5/29/2015 7:28 AM, Stefan Seefeld wrote: >> Python's copy module allows for objects to be copied. The protocol for >> this will look up special method __copy__. It seems to me that this >> would trivially work for C++ objects pr

[C++-sig] C++ copy construction and Python object copies

2015-05-29 Thread Stefan Seefeld
hile I can certainly add that in user-code, I wonder why this isn't done by Boost.Python itself. Does anyone know the reasons for this ? Would it seem useful to add that feature ? Stefan -- ...ich hab' noch ei

Re: [C++-sig] shared_ptr and GIL crash in boost::python (patch)

2015-05-09 Thread Stefan Ring
On Wed, May 6, 2015 at 7:27 AM, Václav Šmilauer wrote: > I would like to ask someone to look at the patch if it is safe to be > applied, and do so. It's been first identified 2 years ago. If I can do > something on my part, or other reporters, I am willing to do whatever is > necessary to expedite

Re: [C++-sig] subprocess fork() sometimes hangs when called from within boost::python::exec_file

2015-05-07 Thread Stefan Ring
On Tue, May 5, 2015 at 4:00 PM, Stefan Ring wrote: > See also <http://caml.inria.fr/mantis/view.php?id=5893>. Maybe > RedHat's bugfix never made it into mainline, or the problem > reappeared. Completely unrelated to boost::python, but I guess you could just block the S

Re: [C++-sig] subprocess fork() sometimes hangs when called from within boost::python::exec_file

2015-05-05 Thread Stefan Ring
See also . Maybe RedHat's bugfix never made it into mainline, or the problem reappeared. ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] subprocess fork() sometimes hangs when called from within boost::python::exec_file

2015-05-05 Thread Stefan Ring
On Tue, May 5, 2015 at 3:48 PM, Stefan Ring wrote: > On Mon, May 4, 2015 at 8:45 AM, Peter Schüller wrote: >> Could you suggest a way to get more useful debugging information to >> track down the problem? > > I'd try to find out if there is a signal handler for signal

Re: [C++-sig] subprocess fork() sometimes hangs when called from within boost::python::exec_file

2015-05-05 Thread Stefan Ring
On Mon, May 4, 2015 at 8:45 AM, Peter Schüller wrote: > Could you suggest a way to get more useful debugging information to > track down the problem? I'd try to find out if there is a signal handler for signal 56 (I'm guessing that's the signal number) and where it's coming from.

Re: [C++-sig] subprocess fork() sometimes hangs when called from within boost::python::exec_file

2015-05-02 Thread Stefan Ring
On Thu, Apr 2, 2015 at 9:12 PM, Peter Schüller wrote: > Dear all, > > In the hexhex project on github [1] we execute a python program using > boost::python::exec_file, the respective code is in > src/PythonPlugin.cpp in the function PythonPlugin::runPythonMain(...). > > In this python program I us

Re: [C++-sig] Boost.Python As Engine's Scripting Language

2015-04-28 Thread Stefan Seefeld
look for types that are derived classes of "MagicEngine.BaseBehavior". Once you have those you may instantiate objects of those types and operate on them in your main application's runtime. In that sense the python script really becomes a configuration file rather than an executable

Re: [C++-sig] Compile C++ to python extension

2015-04-24 Thread Stefan Seefeld
ticular, please always use the version of the documentation corresponding to your version of the library. Then report any discrepancies you find. (For issues with the build system I recommend the Boost mailing list, where many more people hang around that are able to help with Boost.Build issues.) Th

Re: [C++-sig] Boost.Python "contains" compile fix

2015-03-30 Thread Stefan Seefeld
On 30/03/15 04:37 PM, Huebl, Axel wrote: > On 30.03.2015 17:42, Stefan Seefeld wrote: >> On 30/03/15 11:16 AM, Huebl, Axel wrote: >>> Hi, >>> >>> >>> adding more Python 3 features, the "contains" method was added (in 1.55.0?) >>>

Re: [C++-sig] Boost.Python "contains" compile fix

2015-03-30 Thread Stefan Seefeld
p "contains" to "__contains__" to preserve the precise semantic of that call. Do you see the "incomplete type" error only with nvcc or also with other compilers (clang, notably) ? Thanks, Stefan -- ...ich hab' noch einen Koffer in Berlin... ___

Re: [C++-sig] Memory management in Boost.Python

2015-03-10 Thread Stefan Seefeld
On 10/03/15 11:24 PM, Ernie Lee wrote: > Hi Stefan, > > I updated my code so it now use 'boost::shared_ptr' class while > specifying the held-type and i got exactly the same errors (i guess > boost did recognize class even in different namespace). > > Any other

Re: [C++-sig] Memory management in Boost.Python

2015-03-10 Thread Stefan Seefeld
this urgently... :-( Stefan -- ...ich hab' noch einen Koffer in Berlin... ___ Cplusplus-sig mailing list Cplusplus-sig@python.org https://mail.python.org/mailman/listinfo/cplusplus-sig

Re: [C++-sig] passing by non-const reference?

2015-02-19 Thread Stefan Seefeld
mp;out1, int &out2); tuple pyfunc(int input) { int out1, out2; func(input, out1, out2); return make_tuple(out1, out2); } ... and then wrap pyfunc instead of func. Does this address the problem you are trying to solve ? Stefan --

Re: [C++-sig] Boost.Python: Review of Patches

2015-02-02 Thread Stefan Seefeld
I'm subscribed to both the c++-sig as well as the boost mailing lists. I think the former might be slightly better to discuss boost.python issues, if only for the higher SNR. FWIW, Stefan On 02/02/15 01:43 PM, Huebl, Axel wrote: > Hm, the language binding is dead and

  1   2   3   4   >