From eldlistmailingz at tropicsoft.com Sat Aug 2 05:24:34 2014 From: eldlistmailingz at tropicsoft.com (Edward Diener) Date: Fri, 01 Aug 2014 23:24:34 -0400 Subject: [C++-sig] Building Boost.Python in modular boost Message-ID: What is the procedure for building Boost.Python in modular boost ? From olivier.zheng at sekoia.fr Mon Aug 11 10:10:05 2014 From: olivier.zheng at sekoia.fr (Olivier Zheng) Date: Mon, 11 Aug 2014 10:10:05 +0200 Subject: [C++-sig] Boost Python on Windows Message-ID: I would like to know if it is possible to use Boost-compiled pyd on Windows that do not have Boost Python installed. If so, how can I do it ? Thank you for your help, Olivier Zheng -------------- next part -------------- An HTML attachment was scrubbed... URL: From raghavendra.jain at gmail.com Tue Aug 12 20:51:39 2014 From: raghavendra.jain at gmail.com (Raghvendra Jain) Date: Wed, 13 Aug 2014 03:51:39 +0900 Subject: [C++-sig] Boost Python on Windows In-Reply-To: References: Message-ID: Hi Olivier, Please follow the tutorial page I have written about that here http://goo.gl/uEjpCi This tutorial shows how can a python interpreter be embedded inside Visual Studio C++ code using Boost python interface. An example is shown in which a python script is run as well... feel free to ask for some help. Cheers, Raghav On Mon, Aug 11, 2014 at 5:10 PM, Olivier Zheng wrote: > I would like to know if it is possible to use Boost-compiled pyd on > Windows that do not have Boost Python installed. > If so, how can I do it ? > > Thank you for your help, > Olivier Zheng > > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig at python.org > https://mail.python.org/mailman/listinfo/cplusplus-sig > -------------- next part -------------- An HTML attachment was scrubbed... URL: From micdestefano at gmail.com Fri Aug 15 21:38:54 2014 From: micdestefano at gmail.com (Michele De Stefano) Date: Fri, 15 Aug 2014 21:38:54 +0200 Subject: [C++-sig] mds-utils 2.0.0 released Message-ID: I am pleased to announce the release of mds-utils 2.0.0 . MDS-UTILS provides: 1. a tool for detecting machine endianity. 2. utilities for the Boost uBLAS library. Amongst them, some type traits for detecting different uBLAS matrix types. 3. some useful classes that allow to treat the old C FILE pointer as a C++ stream. 4. C++ wrappers of the main Python objects, independent of those in Boost Python. 5. C++ classes that help on treating Python file objects as C++ streams. 6. a review and refactor of the indexing support in Python extensions. Now access in write mode is supported too. 7. new C++ *to-Python* and *from-Python* converters for some *Boost uBlas* objects and for standard Python objects. These converters do not depend on Boost Python. 8. a new sequence iterator that is able to wrap Python sequences and allows also to modify them. This feature does not depend on Boost.Python. 9. the NDArrayIterator class, that wraps the Numpy C-API iterator and allows easy management of conversions to/from Numpy arrays. 10. some SWIG interface files, for easy integration with SWIG extensions for Python. The easiest way to learn to use this library is to browse the modules section and look at the usage examples. Each class is a well-documented, small, easy to use tool and it should never be too difficult to learn to use it. A large percentage of this library makes a heavy usage of the Boost C++ libraries : so, they must be installed on the system. It is assumed that the user is familiar with them. With respect to the previous releases, this one has been completely rewritten in order to be independent of Boost Python. The recommended usage for Python extensions development is now through SWIG. -- Michele De Stefano Web Site Linked In mds-utils: a general purpose Open Source library -------------- next part -------------- An HTML attachment was scrubbed... URL: From brian.m.bruggeman at gmail.com Fri Aug 29 00:19:07 2014 From: brian.m.bruggeman at gmail.com (Brian Bruggeman) Date: Thu, 28 Aug 2014 17:19:07 -0500 Subject: [C++-sig] Boost python extract on Mac OS Mavericks - seg fault Message-ID: <67DFD8DE-AF5F-4F17-AD71-093EEA66C3CD@gmail.com> Hi all, I am having trouble with a really simple example, and I am hoping someone on this list can help me. I have created a github repo for code in question: git clone git at github.com:brianbruggeman/boost_python_hello_world.git I have also created a stack overflow question: http://stackoverflow.com/q/25533329/631199 The basic problem is as follows: Currently, I am able to compile cleanly, but when executing the code, I receive a segmentation fault. I've narrowed the seg-fault down to the line which actually uses boost::python::extract. Code: #include #include namespace bp = boost::python; // Embedding python int main(int argc, char** argv) { int data = 0; Py_Initialize(); PyRun_SimpleString("data = 1"); bp::object module(bp::handle<>(bp::borrowed(PyImport_AddModule("__main__")))); bp::object dictionary = module.attr("__dict__"); bp::object data_obj = dictionary["data"]; // Error: The following line has the segmentation fault... data = bp::extract(data_obj); std::cout << "data = " << data << std::endl; Py_Finalize(); return 0; } CMakeLists.txt: project(hello) cmake_minimum_required(VERSION 2.8) FIND_PACKAGE(PythonInterp) FIND_PACKAGE(PythonLibs) FIND_PACKAGE(Boost COMPONENTS python) include_directories(${PYTHON_INCLUDE_DIRS} ${Boost_INCLUD_DIRS}) link_directories(${PYTHON_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) add_executable(hello say_hello.cpp) target_link_libraries(hello ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) Also for completeness? I installed Python and Boost::Python using the following? brew install python brew install boost ?with-python Thanks so much in advance! Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: From stefan at seefeld.name Sat Aug 30 15:38:06 2014 From: stefan at seefeld.name (Stefan Seefeld) Date: Sat, 30 Aug 2014 09:38:06 -0400 Subject: [C++-sig] Boost python extract on Mac OS Mavericks - seg fault In-Reply-To: <67DFD8DE-AF5F-4F17-AD71-093EEA66C3CD@gmail.com> References: <67DFD8DE-AF5F-4F17-AD71-093EEA66C3CD@gmail.com> Message-ID: <5401D3BE.9030700@seefeld.name> On 08/28/2014 06:19 PM, Brian Bruggeman wrote: > Hi all, > > I am having trouble with a really simple example, and I am hoping > someone on this list can help me. > > I have created a github repo for code in question: > > git clone git at github.com:brianbruggeman/boost_python_hello_world.git > > I have also created a stack overflow question: > > http://stackoverflow.com/q/25533329/631199 > > The basic problem is as follows: > > Currently, I am able to compile cleanly, but when executing the code, > I receive a segmentation fault. I've narrowed the seg-fault down to > the line which actually uses boost::python::extract. As a first step I suggest wrapping the code in a try-block, to catch Python exceptions. You may also try extract::check() to verify whether the object can in fact be converted to the specified type. (In your version a conversion failure would result in an exception.) I would also rewrite the code to use more of the Boost.Python API (import, exec, etc.) All that being said, the code compiles and runs fine for me (Fedora 20), and I don't see anything wrong. Regards, Stefan > > Code: > > #include > #include > > namespace bp = boost::python; > > // Embedding python > int main(int argc, char** argv) { > int data = 0; > Py_Initialize(); > PyRun_SimpleString("data = 1"); > bp::object > module(bp::handle<>(bp::borrowed(PyImport_AddModule("__main__")))); > bp::object dictionary = module.attr("__dict__"); > bp::object data_obj = dictionary["data"]; > // Error: The following line has the segmentation fault... > data = bp::extract(data_obj); > std::cout << "data = " << data << std::endl; > Py_Finalize(); > return 0; > } > > CMakeLists.txt: > > project(hello) > cmake_minimum_required(VERSION 2.8) > > FIND_PACKAGE(PythonInterp) > FIND_PACKAGE(PythonLibs) > FIND_PACKAGE(Boost COMPONENTS python) > > include_directories(${PYTHON_INCLUDE_DIRS} ${Boost_INCLUD_DIRS}) > link_directories(${PYTHON_LIBRARY_DIRS} ${Boost_LIBRARY_DIRS}) > > add_executable(hello say_hello.cpp) > target_link_libraries(hello > ${Boost_LIBRARIES} > ${PYTHON_LIBRARIES}) > > Also for completeness? > > I installed Python and Boost::Python using the following? > > brew install python > brew install boost ?with-python > > Thanks so much in advance! > > Brian > > > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig at python.org > https://mail.python.org/mailman/listinfo/cplusplus-sig -- ...ich hab' noch einen Koffer in Berlin...