Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Roman Yakovenko
On Thu, Oct 23, 2008 at 9:20 AM, Matthieu Brucher
[EMAIL PROTECTED] wrote:
 Hi,

 I'm trying to use your package, but the gccxml installer is not
 available from your website anymore. Is it possible for you to upload
 it again ?

No :-(. It caused too much damage and didn't work reliably.

I suggest you to follow GCCXML install instructions (
http://gccxml.org/HTML/Install.html ) and you will have it in less
than 20 minutes.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
--
http://mail.python.org/mailman/listinfo/python-list


Re: [ANN]pygccxml - 1.0

2008-10-23 Thread Roman Yakovenko
On Thu, Oct 23, 2008 at 7:08 PM, Matthieu Brucher
[EMAIL PROTECTED] wrote:
 Works for me:

 https://sourceforge.net/project/showfiles.php?group_id=118209package_id=146545release_id=634581

 Still does not ;) Only the pygccxml zip is available.

It is possible, that the old gccxml installer is available somewhere.
I suggest, not to use it:
* the gccxml version used is pretty old and was based on GCC 3.X.
possibly on 3.6. I don't remember the exact number. The new version is
based on GCC 4.2, which has much better C++ parser.
* the gccxml installer, it is just a Python script, I wrote, that
contains bug - it deletes directories. So you need to be very very
careful with it.

The bottom line - don't use it. It takes only 20 minutes to install
it, once you have its source code and cmake.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
--
http://mail.python.org/mailman/listinfo/python-list


[ANN]pygccxml - 1.0

2008-10-20 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 1.0 release of pygccxml.

What is pygccxml?
===

...The purpose of the GCC-XML extension is to generate an XML description of a
C++ program from GCC's internal representation. 

-- Introduction to GCC-XML

The purpose of pygccxml is to read a generated file and provide a simple
framework to navigate C++ declarations, using Python classes.

Where is pygccxml?


Site: http://language-binding.net/pygccxml/pygccxml.html

Download: http://language-binding.net/pygccxml/download.html

What's new?
===

Features
-

* Support for ellipsis was added.

* New experimental back-end, based on ``.pdb`` (progam database file),
was added.

* New high-level API wrapper for ``.bsc`` (browse source code file) was added.


Bug fixes
-

* Search algorithm, for template instantiated classes, was improved.


For a more complete list, please see the news:
http://language-binding.net/pygccxml/history/history.html


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
--
http://mail.python.org/mailman/listinfo/python-list


[ANN] Py++ - 1.0

2008-10-20 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 1.0 release of Py++.

What is Py++?
=

Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.

Where is Py++?
==

Site: http://language-binding.net/pyplusplus/pyplusplus.html

Download: http://language-binding.net/pyplusplus/download.html

What's new?


Features


* Algorightm, which defines what virtual functions should be redefined
was improved.

* Exposing C code became easier - Py++ is able to generate
``ctypes`` friendly code.

* Support for ``boost::python::make_constructor`` functionality was added.

* Support for unions and unnamed classes was added.

Bug fixes
-

* Indexing Suite V2 - few bugs were fixed.


Contributors:

* Julian Scheid
* Oliver Schweitzer


For a more complete list, with links to documentation, please see the news:
http://language-binding.net/pyplusplus/history/history.html


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
--
http://mail.python.org/mailman/listinfo/python-list


Re: opensg or openscenegraph

2008-01-11 Thread Roman Yakovenko
On Jan 11, 2008 10:01 PM,  [EMAIL PROTECTED] wrote:
 On Jan 4, 3:08pm, yomgui [EMAIL PROTECTED] wrote:
  Hi,
 
  I need to use a scengraph for my python/opengl application
  but I have trouble finding out which one I should use.
 
  opensg or openscenegraph (OSG) ?
 
  I suppose the quality of the python bindings will make the decision.
 
  any advice ?
 
  thanks
 
  yomgui

 Hi yomgui,

 I am considering either of these as well for writing a simulation
 game.
 The Python Bindings I have found to date are:

 For OpenSG:
 https://realityforge.vrsource.org/trac/pyopensg

 For OSG (there seems to be several variations of these):
 http://code.astraw.com/projects/pyosg

 I suppose you could also use something like Py++ to create your own.

PyOpenSG uses Py++ too :-)


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Embedded Boost.Python Enum

2007-10-18 Thread Roman Yakovenko
On 10/18/07, Cory [EMAIL PROTECTED] wrote:

 Hi,

 I have a hopefully quick question about how to use Boost.Python to
 export an Enum.
 I am embedding python in C++ and am currently exporting my classes in
 the following way:

 nameSpace[OBJECT] = class_OBJECT(OBJECT)
 .def(getType, OBJECT::getType)
 .def(setSprite, OBJECT::setSprite);

 So following this, I assumed that when exporting an enum the following
 should work:

 nameSpace[OBJECT_TYPE] = enum_OBJECT_TYPE(OBJECT_TYPE)
 .value(GENERIC_OBJECT,GENERIC_OBJECT)
 .value(MAP_OBJECT,MAP_OBJECT)
 .value(TOTAL_OBJECT_TYPES,TOTAL_OBJECT_TYPES)
 .export_values();

 while the above compiles, it causes the following run time exception:

 AttributeError: 'NoneType' object has no attribute 'OBJECT_TYPE'

 I took a look at the documentation and the only explanation I found
 for enum appeared to be for extending python with modules. using the
 following form:

 BOOST_PYTHON_MODULE(enums)
 {
 enum_color(color)
 .value(red, red)
 .value(green, green)
 .export_values()
 .value(blue, blue)
 ;

 }


I think you should read next documentation:

http://boost.org/libs/python/doc/v2/scope.html

I COULD do the above, I would prefer the first method if possible. I
 however do not know how to import the module if it is statically
 linked because doing a simple import does not work and I am not
 familiar enough with the boost.python library, Python C API, or Python
 itself to know how to set it up. So My question is this:

 How can I either make the first method of adding an enum work and not
 throw the exception, OR once I create the BOOST_PYTHON_MODULE in an
 embedded python c++ program how to I then import that module into my
 embedded python?


http://boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html
Embedding example:
http://svn.boost.org/trac/boost/browser/trunk/libs/python/test/import_.cpp

HTH

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Any python Module for generating DocBook?

2007-08-26 Thread Roman Yakovenko
On 8/25/07, Tommy Nordgren [EMAIL PROTECTED] wrote:
 Do anyone on this list know of a Python module for generating DocBook
 programlisting elements for programming language source code
 merked with special comments.
 I want to write a programming book, and want to mark significant
 lines in the
 source code for reference. My DocBook processing software xmlint,
 xsltproc, and fop,
 don't support numbering lines, when including source files via
 xi:include parse=text ...

May be you should evaluate quickbook  boostbook (
http://boost-consulting.com/boost/tools/quickbook/doc/html/index.html
)
It is not exactly what you want but still worse to try.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Boost python : get the shape of a numpy ndarray in C++ code.

2007-05-09 Thread Roman Yakovenko
On 9 May 2007 08:08:46 -0700, TG [EMAIL PROTECTED] wrote:
 Hi there.

 I'm strugling here with some boost python code (damn I hate C++) :

 All I want to do is to initialize the content of an array with a numpy
 ndarray parameter. I have this, which actually works. But I want to
 add some kind of data check such as :

 * is array two dimensional ?

This question has nothing to do with Boost.Python

 * are the dimensions corresponding to map's width / height ?

Same as above

 * is array field with floats or ints ?

Read extract documentation http://boost.org/libs/python/doc/v2/extract.html

 void
 Layer::set_potentials (numeric::array array)
 {
   for (int h=0; hmap-height; h++){
 for (int w=0; wmap-width; w++){
   units[w+h*map-width]-potential =
 extractfloat(array[make_tuple(w,h)]);
 }
   }
 }


 Some help is very welcome here ... thanks.

 --
 http://mail.python.org/mailman/listinfo/python-list



-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN]pygccxml-0.9.0

2007-05-07 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 0.9.0 release of pygccxml.

What is pygccxml?
=

...The purpose of the GCC-XML extension is to generate an XML description of a
C++ program from GCC's internal representation. 

-- Introduction to GCC-XML

The purpose of pygccxml is to read a generated file and provide a simple
framework to navigate C++ declarations, using Python classes.

Where is pygccxml?
==

Site: http://language-binding.net/pygccxml/pygccxml.html

Download: http://language-binding.net/pygccxml/download.html

What's new?
===

Performance
---

Performance was improved. pygccxml is now 30-50% faster. The improvement was
achieved by using cElementTree package, iterparse functionality, instead of
standard XML SAX API.


Small features
--

* Class calldef_t has new property - does_throw. It describes whether the
  function throws any exception or not.

* is_base_and_derived function arguments were changed. The second
argument could be
   a tuple, which contains classes. The function returns ``True`` if
at least one
   class derives from the base one.


Bug fixes
-

* C++ does not define implicit conversion between an integral type and
``void*``.
  declarations.is_convertible type traits was fixed.

* Small bug was fixed in functionality that corrects GCC-XML reported function
  default arguments. Reference to enum declaration extracted properly.


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN]Py++ 0.9.0

2007-05-07 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 0.9.0 release of Py++.

What is Py++?
=

Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.

Where is Py++?
==

Site: http://language-binding.net/pyplusplus/pyplusplus.html

Download: http://language-binding.net/pyplusplus/download.html

What's new?
===

Features


* Added exposing of copy constructor, ``operator=`` and ``operator``.
   * ``operator=`` is exposed under assign name
   * ``operator`` is exposed under __str__ name

* Added new call policies:
* as_tuple
* custom_call_policies
* return_range

* Added an initial support for multi-module development. Now you can mark your
  declarations as ``already_exposed`` and `Py++`_ will do the rest.

* `input_c_buffer`_ - new functions transformation, which allows to
pass a Python
  sequence to C++ function, instead of pair of arguments: pointer to
buffer and size.

* Added ability to control generated include directives. Now you can ask Py++
  to include a header file, when it generates code for some declaration.

* Code generation improvements: system header files (Boost.Python or
Py++ defined)
  will be included from the generated files only in case the generated code
  depends on them.

* Performance: Py++ runs 1.5 - 2 times faster.

* Py++ will generate documentation for automatically constructed properties.

* Added iteration functionality to Boost.Python Indexing Suite V2 ``std::map``
  and ``std::multimap`` containers.

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Boost.Python create extra functions not in wrapped object

2007-04-19 Thread Roman Yakovenko

On 19 Apr 2007 00:37:36 -0700, Stou Sandalski [EMAIL PROTECTED]
wrote:


Hi,

I have a python library created by wrapping the C++ library using
Boost.Python, the problem is that the wrappers are not very
pythonic so I want to add some methods that do not exist in the C+
+ implementation, that would create a better Python interface.

For example to initialize the data in an object in the library one
must iterate through every point, setting a value for each
individually.  That's the way it works in C++ but in python it would
be nice to instead just have one call that can receive a numpy array
or a tuple. I want to add a call like: setData(array) to the python
object, a call that does not exist in the C++ implementation and then
in the C++ wrappers actually use setData to iterate through the array
and set the values using the normal C++ method, say setValue(index,
value).

Something along the lines of this (initData is not in the constructor
on purpose) C++ object:

class Foo
{
public:
 void initData(int size)
 {
data = new float[size];
 }; // Create the data array
 void setValue(int index, float value) // Set given value
 {
 data[index] = value;
 }
private:
 float *data;
};


In python however I want to do this:

obj = foo()
ar = array([1,2,3,4,5], dtype=float)

foo.setData(ar)

Or even better:

ar = array([1,2,3,4,5], dtype=float)
obj = foo(ar)

And have it somehow call initData() and setValue() iteration inside
the C++ code of the wrapper.  I've only used SWIG and don't really
know much about Boost, I am not even sure how to label what I am
trying to do.

Can this be done with Boost, without changing the C++ library?



Take a look on next link:
http://boost.org/libs/python/doc/tutorial/doc/html/python/techniques.html#python.extending_wrapped_objects_in_python

Regards,


Stou

--
http://mail.python.org/mailman/listinfo/python-list





--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Boost.Python create extra functions not in wrapped object

2007-04-19 Thread Roman Yakovenko

On 4/19/07, Stou Sandalski [EMAIL PROTECTED] wrote:


Thanks for the reply,

That is what I am doing now, the problem is that I need the code to be
in C/C++ inside the wrapper.  I am creating a lot of these objects and
each time I am iterating over ~1.4 million points... and in python
it's quite slow which is unpleasant especially since it's such a
trivial operation.  My calculation's in NumPy take seconds, and to
create an object for visualization I have to wait 2 minutes. =(



You can define function that first argument is a reference to the instance
of your class.
Then you can register it as usual function.
For example:
http://language-binding.net/pyplusplus/documentation/functions/transformation/built_in/input_c_buffer.html
take a look on generated source code( at the bottom of the page )


Thanks again,


Stou

On 4/19/07, Roman Yakovenko [EMAIL PROTECTED] wrote:
 On 19 Apr 2007 00:37:36 -0700, Stou Sandalski [EMAIL PROTECTED]
 wrote:
  Hi,
 
  I have a python library created by wrapping the C++ library using
  Boost.Python, the problem is that the wrappers are not very
  pythonic so I want to add some methods that do not exist in the C+
  + implementation, that would create a better Python interface.
 
  For example to initialize the data in an object in the library one
  must iterate through every point, setting a value for each
  individually.  That's the way it works in C++ but in python it would
  be nice to instead just have one call that can receive a numpy array
  or a tuple. I want to add a call like: setData(array) to the python
  object, a call that does not exist in the C++ implementation and then
  in the C++ wrappers actually use setData to iterate through the array
  and set the values using the normal C++ method, say setValue(index,
  value).
 
  Something along the lines of this (initData is not in the constructor
  on purpose) C++ object:
 
  class Foo
  {
  public:
   void initData(int size)
   {
  data = new float[size];
   }; // Create the data array
   void setValue(int index, float value) // Set given value
   {
   data[index] = value;
   }
  private:
   float *data;
  };
 
 
  In python however I want to do this:
 
  obj = foo()
  ar = array([1,2,3,4,5], dtype=float)
 
  foo.setData(ar)
 
  Or even better:
 
  ar = array([1,2,3,4,5], dtype=float)
  obj = foo(ar)
 
  And have it somehow call initData() and setValue() iteration inside
  the C++ code of the wrapper.  I've only used SWIG and don't really
  know much about Boost, I am not even sure how to label what I am
  trying to do.
 
  Can this be done with Boost, without changing the C++ library?

 Take a look on next link:

http://boost.org/libs/python/doc/tutorial/doc/html/python/techniques.html#python.extending_wrapped_objects_in_python

  Regards,
 
  Stou
 
  --
  http://mail.python.org/mailman/listinfo/python-list
 



 --
 Roman Yakovenko
  C++ Python language binding
 http://www.language-binding.net/





--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: python/C++ wrapper

2007-03-14 Thread Roman Yakovenko
On 14 Mar 2007 02:38:32 -0700, Szabolcs Nagy [EMAIL PROTECTED] wrote:
  - A c++ program receives a 2D-matrix from python as input and gives a
  2D-matrix as output back to python.

 pyogre uses swig

Well, pyogre has few problems with maintenance, and new bindings to
Ogre engine was
created using Boost.Python( http://www.ogre3d.org/wiki/index.php/PyOgre )

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python/C++ wrapper

2007-03-13 Thread Roman Yakovenko
On 13 Mar 2007 21:55:55 -0700, Frank [EMAIL PROTECTED] wrote:

 Hi,

 is there anyone here that calls C++ programs from python via swig? It
 seems that there are a lot of different ways to do that. For me it
 would be important that the original c++ code (which is available)
 does not need to be changed and the whole compilation process (swig -
 python g++etc) is as simple as possible.

 Does anyone have a running example of the following problem:

 - A c++ program receives a 2D-matrix from python as input and gives a
 2D-matrix as output back to python.

 That's all! I would expect there should be someone who actually uses
 swig for this kind of problem. If so, could you send me the code, that
 would be great!

If this is all you need, than may be you don't need to use any code
generator, but try
some other way: Boost.Python. Take a look on tutorials:
http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C++ and Python

2007-03-09 Thread Roman Yakovenko

On 8 Mar 2007 22:04:48 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi Everyone,

I'm considering about generating some Python Bindings for C++
libraries. What are considered the best tools for doing something like
this? I know that there are SWIG, SIP, Boost.Python, and GCC_XML.


If you ask me than Boost.Python and Py++(
http://language-binding.net/pyplusplus/pyplusplus.html)
is the way to go. I collected few links to articles that compare between
different tools:
http://language-binding.net/pyplusplus/comparisons/compare_to.html

Until recently there was not big library written in C++, which was exposed
to Python
using different tools. Today there are two projects, which expose same
source code
to Python. The exposed library is Ogre - a scene-oriented, flexible 3D
engine, pretty big
and complex project.

The first solution, PyOgre, uses SWIG, while the second one uses Py++.
The link I gave earlier contains links to the projects CVS's. It worse to
take a
look on them and compare.

P.S. Take all what I say with caution, because I am the author of Py++.

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Reg Google Web Toolkit and Python

2007-02-16 Thread Roman Yakovenko
On 2/16/07, Shadab Sayani [EMAIL PROTECTED] wrote:
 Hi ,
 We have a project where I need to read files store
 them in database in the backend.We have done this in
 python.Now we decided to use Ajax technique for user
 interface.For that we found that GWT is one of the
 best toolkits.Now I got a doubt can I interface GWT
 with python.

http://pyjamas.pyworks.org/ is the way to go.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Jython / Java / C / C++ interoperability

2007-02-12 Thread Roman Yakovenko
On 12 Feb 2007 09:57:48 -0800, Charity [EMAIL PROTECTED] wrote:
 Hi all,

 I have a code base primarily written in Java.  I would like to use
 Jython to use this code base.  Everything is wonderful because
 Jython calls Java easily.

 However, there may be a time when I would like to call C/C++ from
 Jython.  I can't do this directly, can I?   Would I have to wrap the C/
 C++ in Java to access from Jython?  Or call Python which will call the
 C/C++?

 What method would be the easiest and most elegant solution for gaining
 access to C/C++ functionality from Jython?  Please keep in mind that I
 have very little Jython experience.


May be you should consider JPype( http://jpype.sourceforge.net/ )

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SWIG overhead

2007-02-01 Thread Roman Yakovenko
On 1 Feb 2007 02:21:35 -0800, Bart Ogryczak [EMAIL PROTECTED] wrote:
 Hi,
 I´m looking for some benchmarks comparing SWIG generated modules with
 modules made directly with C/Python API. Just how much overhead does
 SWIG give? Doing profile of my code I see, that it spends quiet some
 time in functions like _swig_setattr_nondinamic, _swig_setattr,
 _swig_getattr.

Before you decide to go low level consider to use Boost.Python.
According to this( http://tinyurl.com/322d3p ) post it gives pretty
good performance.

P.S. The post does not contain numbers

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SWIG overhead

2007-02-01 Thread Roman Yakovenko
On 2/1/07, Chris Mellon [EMAIL PROTECTED] wrote:
 As I understand it, part of the Boost.Python internals is a C++
 wrapper over the Python C api,

That's true.

and there's no separate code generation
 phase because it uses template magic to generate the wrappers.

Well, actually it depends on the size of the project. If project is
small you can use
Boost.Python without a code generator. For big projects you have to use the code
generator. The advantage is that generated code is pretty readable.

 So
 while obviously the C API is used at some level, it's not visible to
 the wrapper author.

Boost.Python hides it pretty well :-)

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python , Boost and straight (but complex) C code

2006-12-31 Thread Roman Yakovenko
On 12/31/06, Osiris [EMAIL PROTECTED] wrote:
 In short: it's all rather confusing

 I think it must be like this:

 To use my C/C++ code with Python, add some stuff in the C/C++ source
 and compile it into a DLL, that must be combined with some boost-DLL
 to make it accessible to Python 2.4.
 Therefore I need a boost DLL from boost.org, and some headerfiles that
 belong to the boost DLL.
 (where are those boost header files )

 As you see, a lot of obfuscation
 MAybe I see too many bears on the road...

Boost project is an open source, consider to contribute your
experience, knowledge
and time to make it better.

You can download pre-built binaries for Windows platform from here:
http://www.boost-consulting.com/download.html

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: python , Boost and straight (but complex) C code

2006-12-30 Thread Roman Yakovenko
On 12/30/06, Osiris [EMAIL PROTECTED] wrote:
 Visual C++ build log at:

 http://213.10.133.192/BuildLog.htm

It is better to ask Boost.Python related questions on it mailing list:
http://mail.python.org/mailman/listinfo/c++-sig/

You should add to the link line boost_python.lib, thus you will eliminate
unresolved reference symbol errors. If you did not build Boost.Python
next page( http://boost.org/libs/python/doc/building.html ) contains pretty
good explanation how to do this.

http://boost.org/libs/python/doc/v2/scope.html - here you will find example how
to expose my_int variable to Python. my_int has type int, so C++ code will not
see changes to the variable that are done from Python. You will have to write
set_my_int( x ) function to achieve this.

If you are new to Boost.Python try to use Py++ - the code generator for
the library. The Py++ GUI( http://tinyurl.com/ycwvwo ) will help you
to start\learn Boost.Python.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] pygccxml - 0.8.5

2006-12-21 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 0.8.5 release of pygccxml.

What is pygccxml?
=

...The purpose of the GCC-XML extension is to generate an XML description of a
C++ program from GCC's internal representation. 

-- Introduction to GCC-XML

The purpose of pygccxml is to read a generated file and provide a simple
framework to navigate C++ declarations, using Python classes.

Where is pygccxml?
==

Site: http://language-binding.net/pygccxml/pygccxml.html

Download: http://language-binding.net/pygccxml/download.html

What's new?
===

Features


* Added new functionality: I depend on them. Every declaration can report
  types and declarations it depends on. This functionality helps code
generators.
  For example, Py++, the Boost.Python code generator, uses it to
verify that all
  relevant declarations were exposed.

* Declarations, read from GCC-XML generated file, could be saved in cache.

Small features
--
* New type traits have been added:

   * is_bool

* Small improvement to algorithm, which extracts value_type
  ( mapped_type ) from std containers.

* Few aliases to long method name were introduced.

Bug fixes
-

* signed char and char are two different types. This bug was fixed and
  now pygccxml treats them right. Many thanks to Gaetan Lehmann for reporting
  the bug.

* Fixing bug related to array size and cache.

For a more complete list, please see the news:
http://language-binding.net/pygccxml/history/history.html

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN] Py++ - 0.8.5

2006-12-21 Thread Roman Yakovenko
Hello!

I'm pleased to announce the 0.8.5 release of Py++.

What is Py++?
=

Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.

Where is Py++?
==

Site: http://language-binding.net/pyplusplus/pyplusplus.html

Download: http://language-binding.net/pyplusplus/download.html

What's new?
===

Features


* Added Function Transformation feature. This feature allows you to
describe function
  wrapper and Py++ will do the rest.
  Example could be found here:  http://tinyurl.com/y3ec24

* Added new functionality, which allows you to control messages and warnings.

* Adding new algorithm, which controls the registration order of the functions.

* Added new Py++ defined return_pointee_value call policy

* Opaque types are fully supported

* Py++ will check the completeness of the bindings. It will check
for you that the exposed
  declarations don't have references to unexposed ones.

Small features
--

* It is possible to configure Py++ to generate faster ( compilation time )
  code for indexing suite version 2.

* The algorithm, which finds all class properties was improved. Now it provides
  a better way to control properties creation. A property that would
hide another
  exposed declaration will not be registered\\created.

* Work around for custom smart pointer as member variable Boost.Python bug
  was introduced.

For a more complete list, please see the news:
http://language-binding.net/pyplusplus/history/history.html

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boost::python and automatic conversion for const std::string

2006-12-21 Thread Roman Yakovenko
On 21 Dec 2006 07:30:41 -0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I have a lot of functions returning const std::string. Every time I
 wrap one of those I have to do it like this:

 class_.def(name, someclass::bla,
 boost::python::return_value_policyboost::python::copy_const_reference()
 );

 Is there a way to register a return value conversion for const
 std::string so I can omit it every time I have to wrap functions
 returning const std::string ? I wan't those strings to be copied to
 python as new strings (I don't want to hold a pointer to them).

I am not sure, you'd better ask this question o Boost.Python mailing list:
http://mail.python.org/mailman/listinfo/c++-sig/
Py++, Boost.Python code generator, does it for you: http://tinyurl.com/ygwdkz


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Wrapping classes with pure virtual functions

2006-12-17 Thread Roman Yakovenko

On 14 Dec 2006 13:57:10 -0800, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

Hi,
I'm having problems wrapping a hierarchy of classes, actually having
problems wrapping the base class. I don't need to use the WrapClass
mechanism since I don't want to override classes in Python. My code
boils down to:

class Base
{
public:
virtual ~Base()
{}

virtual void f() = 0;
};

class Derived :
public Base
{
public:
virtual void f()
{}

void g()
{}
};

int main()
{
boost::python::class_Base class_base(Base);
boost::python::class_Derived class_derived(Derived);
return 0;
}



namespace bpl = boost::python;
bpl::class_Base, boost::noncopyable(Base, bpl::no_init )
   .def( f, bpl::pure_virtual( Base::f ) );

bpl::class_ Derived, bpl::bases Base  ( Derived )
   .def( f, Derived::f )
   .def( g, Derived::g );

Few comments:
1. It is better to ask Boost.Python related questions on its mailing list:
   http://mail.python.org/mailman/listinfo/c++-sig/
2. If you just start with Boost.Python, try Py++
  ( http://language-binding.net/pyplusplus/pyplusplus.html )
Boost.Pythoncode generator
  It has nice GUI ( no need to learn any API ):

http://language-binding.net/pyplusplus/documentation/tutorials/pyplusplus_gui.html


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: libboost, python, and dijkstra shortest path

2006-11-29 Thread Roman Yakovenko
On 29 Nov 2006 11:35:52 -0800, Bytter [EMAIL PROTECTED] wrote:
 Ok, found the solution here: http://www.osl.iu.edu/~dgregor/bgl-python/

 But still cannot make anything that works... Anyone who has experience
 in this area can help me with the following code:

 import boost as bgl

 graph = bgl.Graph()
 a = graph.add_vertex()
 b = graph.add_vertex()
 e = graph.add_edge(a, b)

 weights = graph.edge_property_map('integer')
 weights[e] = 5
 graph.edge_properties['weight'] = weights

 boost.dijkstra_shortest_paths(graph, a)

You'd better ask the question on boost.python or boost-users mailing lists:
http://boost.org/more/mailing_lists.htm

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boost::python embedding example running error

2006-11-12 Thread Roman Yakovenko
On 12 Nov 2006 19:10:24 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 I use boost 1.33_1, there's an example on boost::python named
 embedding.cpp. When I tried to build and run it in visual studio 2005,
 I got an error on this line:

 std::string hello() { return python::call_methodstd::string(self,
 hello); }

 It's a back ptr error.

 I don't know where to ask this question so I came to python group.

Boost.Python mailing list: http://mail.python.org/mailman/listinfo/c++-sig/

More resources: http://www.language-binding.net/pyplusplus/links.html


 --
 http://mail.python.org/mailman/listinfo/python-list



-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN]Py++-0.8.2

2006-10-20 Thread Roman Yakovenko
I'm glad to announce the new version of Py++.

Download page: http://language-binding.net/pyplusplus/download.html

What is it?
Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.

Project home page: http://language-binding.net/pyplusplus/pyplusplus.html

The new version introduces quite few improvements:

* performance, in some case x10
* fully automatic algorithm for exposing C++ get\set functions as Python
   properties.
* treatment for previously generated, but no more in use, source files
* convenience API for translating user defined exception to Python one
* generated code  - improved formatting
* better understanding of call policies:
  - default_call_policies should not be generated any more
  - return_value_policy return_opaque_pointer , Py++ will create
specialization for type_id function, as required by the library
* documentation, new chapters were written, all source code in documentation is
   highlighted using pykleur package.

Dependencies: Py++-0.8.2 depends on pygccxml-0.8.2.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python wrapper for C++ core

2006-10-19 Thread Roman Yakovenko
On 19 Oct 2006 03:10:55 -0700, Holly [EMAIL PROTECTED] wrote:

 Thanks everyone for the responses - I think I have a better
 understanding now. I can handle all the messy I/O in Python and use C
 for the number crunching. I especially like the idea of using python to
 output the results to excel.

 OK time to learn Python i think - any tips on best place to start
 (tutorials/documentation etc). I have a pretty comprehensive background
 in C/C++/Java and a bit of experience some other scripting languages so
 its really a matter of syntax/libraries rather than programming
 theory/constructs

Be sure to check Boost.Python to create Python bindings for your project(s):
http://boost.org/libs/python/doc/tutorial/doc/html/index.html

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C++ to Python?

2006-10-10 Thread Roman Yakovenko
On 10/10/06, Frank Martinez [EMAIL PROTECTED] wrote:
 Hi, Everybody!
  Does anyone know of a cpp2py type application?  Without going into details,
 I need to port a bunch of C++ code to Python.  Any such
 converter/information would be helpful.
  Thanks.

Take a look on Py++( http://language-binding.net/pyplusplus/pyplusplus.html )
You are not going to regret.
You don't have to believe: take a look on Python-Ogre project(
http://python-ogre.python-hosting.com/ ) and amount of code that is
needed
to export Ogre engine to Python: http://tinyurl.com/mjuea

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C++ to Python?

2006-10-10 Thread Roman Yakovenko
On 10/10/06, Frank Martinez [EMAIL PROTECTED] wrote:
 Hi, Roman.
  Thanks.  I seem a bit confused.  Does Py++ actually convert the C++ code to
 Python or does it just provide a wrapper to C++ code?

A second one. Now when I read your mail one more time, I think I was
wrong, because
you want to find some kind of translator

C++ code:
   std::cout  1;
translator output:
   print 1

Am I right? If so, I am pretty sure that such translator does not
exist - too complex.
I think you can try another approach: to create Python bindings to your C++ code
and than incrementaly to drop it( C++ ). This way you will not
introduce too many
bugs and you will be able to move forward.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN]pygccxml 0.8.1

2006-08-24 Thread Roman Yakovenko
I'm glad to announce the new version of pygccxml is available.

Download page: http://www.language-binding.net/pygccxml/download.html

What is it?
...The purpose of the  GCC-XML  extension is to generate an XML
description of a C++ program from GCC's internal representation. Since
XML is easy to parse, other development tools will be able to work
with C++ programs without the burden of a complicated C++ parser...

The purpose of  pygccxml  is to read GCC-XML generated file and
provide a simple framework to navigate C++ declarations using Python
classes.

Project home page: http://www.language-binding.net/pygccxml/pygccxml.html

Changes:
1. The project has been ported to Mac OS.
2. New type traits that works with STD containers were added.
3. Logging and user messages related functionality were improved.
4. Support for Java native types was added.
5. Cache classes implementation and performance were improved.

You can find the full list of changes here:
http://language-binding.net/pygccxml/history/history.html#version-0-8-1

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


[ANN]Py++ 0.8.1

2006-08-24 Thread Roman Yakovenko
I'm glad to announce the new version of Py++.

Download page: http://language-binding.net/pyplusplus/download.html

What is it?
Py++ is an object-oriented framework for creating a code generator for
Boost.Python library.

Project home page: http://language-binding.net/pyplusplus/pyplusplus.html

Changes:
1. Support for Boost.Python indexing suite version 2 was implemented. Indexing
suite 2, provides support for almost all STD containers.
2. Py++ generates stable code. If header files were not changed,
Py++ will not
change any file.
3. Support for huge classes was added. Py++ is able to split
registration code for
the class to multiple cpp files.
4. User code could be added almost anywhere, without use of low level API.
5. Py++ will provide user with feedback: warnings about exported declarations.
6. Py++ now supports generation of documentation strings.
7. A lot of bugs were fixed.
8. Documentation was written.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Boost Build Warning

2006-08-14 Thread Roman Yakovenko
On 14 Aug 2006 10:29:08 -0700, Hoop [EMAIL PROTECTED] wrote:
 Hi,
 I am trying to run the Hello World example in Boost.Python from the
 Building Hello World documentation. I believe that I have everything
 set up right but I get these three warnings,

 warning: no toolsets are configured.
 warning: you won't be able to build C++ programs.
 warning: please consult the documentation.

 Not sure how to set up the toolsets or what documentation is being
 refered to here.
 To compile I do,( from the example, for using VS2005)
 bjam -s VC80_ROOT=vc-8_0
 not totally sure if that is right so I have tried a few others like,
 bjam -sTOOLS=vc-8_0

 Any help would be appreciated.

Try to run vcvars32.bat ( if exists or something similar ) before you invoke
bjam from the same cmd. I am not sure, but this could help.

 Thanks
 Jeff


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: beginner questions on embedding/extending python with C++

2006-08-08 Thread Roman Yakovenko
On 8 Aug 2006 02:28:31 -0700, Qun Cao [EMAIL PROTECTED] wrote:
 Hi Everyone,

 I am a beginner on cross language development. My problem at hand is to
 build a python interface for a C++ application built on top of a 3D
 game engine.  The purpose of this python interface is providing a
 convenient scripting toolkit for the application.

As for me, Boost.Python is the way to go.

Fortunately you are not the first one, and I hope not the last one :-) :

http://language-binding.net/pyplusplus/quotes.html#who-is-using-pyplusplus
1. Python-OGRE
  * http://lakin.weckers.net/index_ogre_python.html
  * http://tinyurl.com/mvj8d

2. http://cgkit.sourceforge.net/ - contains Python bindings for Maya C++ SDK

3. PyOpenSG - https://realityforge.vrsource.org/view/PyOpenSG/WebHome
   The goal of PyOpenSG is to provide python bindings for the OpenSG
   scene graph.

 Since the main program is still going to be the C++ application, I
 guess we need to embedding the python scripts in the C++ code.

Boost.Python is the only tool that provides complete functionality(
extending and
  embedding ). Also I think cgkit is dealing with the problem too.

 But for this to work, the python code needs to know the Player class,
 is it right?

Right.

Does that mean I need to build a python wrapper class for
 Player and import Player in the python code?  But because this
 application is built on top of a game engine, Player class inherits
 many classes from there, I cannot possibly wrapping them all, right?

It depends on how much functionality you want to export.

 Also, some global objects are probably needed in this code of adding
 players, how can the python code access them?

Boost.Python provides the functionality you need.

 Btw, if you can point me to any source code of non-trivial projects
 utilizing SWIG/Boost.Python, that would be very helpful.  I found the
 examples on the tutorials are far too simple.

Those are tutorials, they should be simple, right :-) ?

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and Boost.

2006-07-25 Thread Roman Yakovenko
On 25 Jul 2006 08:01:30 -0700, KraftDiner [EMAIL PROTECTED] wrote:
 Hi, I'm trying to call a C++ class from python.
 I've looked around and the solution would appear to be boost.

Right!

 I'm not sure but maybe I've downloaded and installed the entire boost
 library,
 when there is probably a separate tar ball for python / C++
 integration.
 Can someone please point me to a tar ball for mac os x so that I can
 call
 my C++ class from Python?

It is not clear what you are asking for.

You can download the tar ball from boost site.
After this use bcp(http://boost.org/tools/bcp/bcp.html) utility to extract
boost.python and its dependencies.

After this you can read tutorials and to start working.

Anyway, it is better to ask Boost.Python related questions on it's mailing list:
http://boost.org/more/mailing_lists.htm#cplussig

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and C++

2006-07-25 Thread Roman Yakovenko
On 25 Jul 2006 10:51:36 -0700, KraftDiner [EMAIL PROTECTED] wrote:
 What ways can I call my C++ classes from within Python.
 I've looked at boost but it would appear that there is little
 support or knowledge on boost in the python community.

It is not true! I am sure that if you ask you questions on
boost.python mailing list
you will get the answers.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python and C++

2006-07-25 Thread Roman Yakovenko
On 7/25/06, Dave Kuhlman [EMAIL PROTECTED] wrote:
 KraftDiner wrote:

  What ways can I call my C++ classes from within Python.
  I've looked at boost but it would appear that there is little
  support or knowledge on boost in the python community.

 If you want to write Python wrappers for C++ code *by hand*, look
 here:

 http://docs.python.org/ext/ext.html
 http://docs.python.org/api/api.html

 If you want to generate wrappers for C++ code (or C code) with
 SWIG, look here:

 http://www.swig.org/

Boost.Python also has code generators: Pyste and pyplusplus(
http://language-binding.net/pyplusplus/pyplusplus.html )

The last one even has GUI, so for small project you don't have to learn
any API, just few mouse clicks and you have almost working code.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: templating languages for webdev

2006-06-23 Thread Roman Yakovenko
On 23 Jun 2006 12:28:24 -0700, a [EMAIL PROTECTED] wrote:
 cheetah vs django vs kid

  Any of you have experience using kid templates please let us know what
 you feel about it thanks

kid templates is great piece of software.
I built my site http://www.language-binding.net/ using it and Docutils.
Never regret about this.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Distutils: setup script for binary files

2006-06-06 Thread Roman Yakovenko
Hi. I want to create setup script, that will install compiled extension module
plus few binaries the extension module depends on.

For example: I have package X:

X:
__init__.py
_x_.dll ( or so )
some other dll's ( so's ) _x_.dll depends on.

I took a look on Python documentation,
http://docs.python.org/dist/describing-extensions.html, but it only
describes how to create
setup script for extension module from source files.

I think, I can treat _x_.dll as it was regular Python script. My
problem is, that on Linux
I should put some other so's in some directory, program loader can find.
How can I do this?

Any help is appreciated.

Thanks

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: pyplusplus - v0.7.2

2006-04-17 Thread Roman Yakovenko
Hi. The next version of pyplusplus is available.
Download page: http://www.language-binding.net/pyplusplus/download.html

What is it?
pyplusplus  is an object-oriented framework for creating a code
generator for  boost.python  library.

Project home page: http://www.language-binding.net/pyplusplus/pyplusplus.html

What is new?
New user friendly API has been created. You can find tutorials here:
http://www.language-binding.net/pyplusplus/tutorials/tutorials.html

Logging functionality has been added to almost all operations

Documentation has been improved a lot.

Bug fixes

Full list of changes you can find here:
http://www.language-binding.net/pyplusplus/history/history.html

Many thanks to Matthias Baas  and Allen Bierbaum. They fixed bugs, wrote
documentation, designed new user friendly API.

Enjoy

--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


ANN: pygccxml - 0.7.2

2006-04-17 Thread Roman Yakovenko
Hi. The next version of pygccxml is available.
Download page: http://www.language-binding.net/pygccxml/download.html

What is it?
...The purpose of the  GCC-XML  extension is to generate an XML
description of a C++ program from GCC's internal representation. Since
XML is easy to parse, other development tools will be able to work
with C++ programs without the burden of a complicated C++ parser...

The purpose of  pygccxml  is to read GCC-XML generated file and
provide a simple framework to navigate C++ declarations using Python
classes.

Project home page: http://www.language-binding.net/pygccxml/pygccxml.html

What is new?
   A lot of new functionality have been added:
   it is possible now to print declarations tree
   to find declaration by some criteria
   few new type_traits has been added

   Logging functionality has been added to almost all operations

   Documentation has been improved a lot.

   Bug fixes

   This version should work fine with GCC-XML CVS version

Full list of changes you can find here:
http://www.language-binding.net/pygccxml/history/history.html

Many thanks to Matthias Baas, John Pallister  and Allen Bierbaum.
They fixed bugs and wrote documentation.

Enjoy
--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Giving your C/C++ Application a Python Command Line...

2006-04-10 Thread Roman Yakovenko
On 10 Apr 2006 02:15:41 -0700, Andrew  McCall [EMAIL PROTECTED] wrote:
 Hi Folks,

 I am building an application under multiple OS's, and I wanted to give
 my application

 For example, the test application I am working on is a calculator and I
 would like to have a menu in the GUI option to open a command line
 where you can use Python commands to perfom the functions of the
 application within the Python command line.  For example, if I wanted
 to clear the display or display the about screen I would be able type
 the command in the Python coimmand line.  To do this I think I need to
 embed Python in my application, and then expose my C/C++ functions to
 Python.

 I have read the documents on embedding Python and I can give my
 application a command line, but I am having issues exposing my C/C++
 functions to Python.

 Does anyone know of any tutorials or example code that show how to do
 this?

You have few choices:

boost.python
http://boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html

PyCXX ( embedding only )
http://cxx.sourceforge.net/

 Thanks,

 Andrew McCall

 --
 http://mail.python.org/mailman/listinfo/python-list



--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: C++ and Python

2006-03-31 Thread Roman Yakovenko
On 30 Mar 2006 23:01:21 -0800, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
 I've been learning to write VST plugins in C++ and would like to switch
 back to Python.  The first step of writing the plugin is to import the
 C++ header files from the Steinberg SDK.  How can I do this in Python.
 I've tried looking at SWIG but didn't really understand what it was
 trying to do.Should I be using SWIG to create Python versions of
 the classes and then go from there or does it create glue code to talk
 to the classes.

Hi. My advice is try to use boost.python library.
http://www.boost.org/libs/python/doc/tutorial/doc/html/index.html
There are also few code generators available for it: pyplusplus and Pyste.

 --
 http://mail.python.org/mailman/listinfo/python-list



--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boost python tutorial

2006-03-23 Thread Roman Yakovenko
On 23 Mar 2006 11:17:46 -0800, MakaMaka [EMAIL PROTECTED] wrote:
 Hi,
 I'm trying to build the basic boost.python tutorial that comes with the
 distribution.  I'm using bjam and mingw.  It builds the module, but
 upon import, it gives this error:

 ImportError: dynamic module does not define init function (inithello)

 I've found other threads with this problem as a topic, but no
 solutions.  Somebody has to have solved this


 Any ideas?

Yes.

1. You can subscribe to boost.python mailing list.

2. Can you check whether you named you module as hello?
BOOST_PYTHON_MODULE(hello)

 Thanks,
 -Justin

 --
 http://mail.python.org/mailman/listinfo/python-list



--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boost python tutorial

2006-03-23 Thread Roman Yakovenko
On 23 Mar 2006 12:36:17 -0800, MakaMaka [EMAIL PROTECTED] wrote:
 I checked and it is.  I can't use news servers at work b/c of the
 firewall.  Is there another way to access this mailing list?

Yes, try to subscribe: http://www.python.org/community/sigs/. See c++-sig
If you can use your mail or gmail you can send/recieve mails from it.

 --
 http://mail.python.org/mailman/listinfo/python-list



--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: From Python to c++

2006-03-21 Thread Roman Yakovenko
On 3/21/06, Marco Aschwanden [EMAIL PROTECTED] wrote:
 Any suggestions are very welcome!


 Regards,
 Marco (Forced to code in c++ again let me estimate the simplicity of
 python)

C++ is also simple, if you have right library to do the job:

http://boost.org/doc/html/variant.html
http://boost.org/libs/any/index.html

I hope this will help


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there a python library to parse C++ code file?

2006-03-17 Thread Roman Yakovenko
On 3/17/06, Fredrik Lundh [EMAIL PROTECTED] wrote:
 [EMAIL PROTECTED] wrote:

  Is there a python library to parse C++ code file?
  If yes, can you please tell me where is it?

pygccxml.

http://www.language-binding.net/pygccxml/pygccxml.html

Very powerful package :-)! It has built-in support for type analisys,
cache and 


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Embedding Python into C/C++ applications

2006-02-04 Thread Roman Yakovenko
On 2/3/06, John Dean [EMAIL PROTECTED] wrote:
 Hi

 Could somebody, please tell me where I can find information about embedding
 Python into a C/C++ application. The example in the docs is rather simple. I
 am looking for something a bit more complex and longer

For my opinion: Boost.Python is the way to go:

http://boost.org/libs/python/doc/tutorial/doc/html/python/embedding.html

There is also an other project:

http://cxx.sourceforge.net/PyCXX.html

 --
 Best Regards
 John
 --
 http://mail.python.org/mailman/listinfo/python-list


--
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: boost.python on Debian

2006-01-16 Thread Roman Yakovenko
You'd better ask this question on

boost.python mailing list
 http://python.org/sigs/c++-sig/

or on

boost development mailing list
http://boost.org/more/mailing_lists.htm

On 16 Jan 2006 21:14:28 +, Joe bloggs [EMAIL PROTECTED] wrote:
 According to apt-get I have the latest (1.32.0-6) Debian boost libraries, and
 bjam version (3.1.10-1) correctly installed.
 --
 http://mail.python.org/mailman/listinfo/python-list


Roman Yakovenko
-- 
http://mail.python.org/mailman/listinfo/python-list


[Announce] pydsc

2005-12-21 Thread Roman Yakovenko
Hi, I would like to announce new module - pydsc.

pydsc is Python documentation spell checker. This modules checks
documentation string
and comments for spelling errors. pydsc uses PyEnchant
(http://pyenchant.sourceforge.net/)
as spell checking engine.

Example of usage:

import pydsc #all modules that will be imported from now will be checked
import readline

More complex example ( taken from pygccxml project ):

import pydsc
#test only pygccxm package for spelling errors
#package_directory defined earlier
pydsc.doc_checker.filter.append( package_directory )
pydsc.doc_checker.filter_type = pydsc.FILTER_TYPE.INCLUDE
#ignore next words
map( pydsc.doc_checker.speller.ignore_always
, [ 'org', 'http', 'bool', 'str', 'www', 'param' , 'txt',
'decl', 'decls' ] )


pydsc is released under Boost Software License(
http://boost.org/more/license_info.html )

You can download it from here:
http://sourceforge.net/project/showfiles.php?group_id=118209

Pay attention: before installing pydsc you need to install PyEnchant
(http://pyenchant.sourceforge.net/).

Ideas, comments, suggestions or help are welcomed.

Best regards,

Roman Yakovenko
-- 
http://mail.python.org/mailman/listinfo/python-list


[Announce] boost.date_time library Python bindings

2005-11-30 Thread Roman Yakovenko
Hi. I am pleased to announce a new Python package - date_time.

date_time package is a Python bindings for the boost.date_time C++ library.

boost.date_time is a cross-platform and open source C++ library which
is designed
to provide a basis for performing efficient time calculations.
The boost.date_time library has been created by Jeff Garland.

boost.date_time library has:
* good documentation
* well defined interfaces
* clear concepts
* comprehensive unit tests

The boost.date_time library home page: http://boost.org/doc/html/date_time.html.

The date_time package also has comprehensive unit tests. Documentation of
boost.date_time library can be re-used for the Python package.

date_time package available for Linux(Python 2.3) and Windows(Python 2.4).
Download:
http://tinyurl.com/cp3lo
http://sourceforge.net/project/showfiles.php?group_id=118209package_id=167694release_id=374482

The date_time package was created using boost.python library and new
code generator - pyplusplus.

The boost.python library home page:
http://www.boost.org/libs/python/doc/index.html
The pyplusplus package home page: http://www.language-binding.net/

Enjoy.

Roman Yakovenko
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Extended Language c++ in pyhton

2005-09-01 Thread Roman Yakovenko
Decide your self:

http://seal.web.cern.ch/seal/snapshot/work-packages/scripting/evaluation-report.html

My recomendation is boost.python. If you choose boost.python then
there are a few
code generator tools for it. One of them is pyplusplus 
( see http://pygccxml.sourceforge.net/pyplusplus/pyplusplus.html )

Roman

On 9/1/05, elho [EMAIL PROTECTED] wrote:
 I found serveral tool for using C++ as extended languate in python - but
 what's the best / easiest to use?
 
 With C I used wrappy - not sure if it's the wright name, it's included
 since Python 1.6 and it ist pretty ease to use. You know an example with
 this util for C++ or isn't it possible for C++.
 
 Would be nice to get your opinion. thx
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Is there a better way of doing this?

2005-05-29 Thread Roman Yakovenko
On 5/29/05, Cyril BAZIN [EMAIL PROTECTED] wrote:
 Hi,
  
  I don't know very well what you want to do, but if you want to parse c++,
 take a look at GCC-XML python (http://www.gccxml.org) and the python
 binding (http://pygccxml.sourceforge.net/). These tools
 translate c++ code to XML. Then, you can parse xml with your favorite tools
 and find the namespaces for example...

Small correction: pygccxml does not translate C++ to xml. The purpose
of pygccxml is to read file generated by GCC-XML and provide simple
framework to navigate C++ declarations using python classes.

Roman
-- 
http://mail.python.org/mailman/listinfo/python-list


Freezing python application

2005-04-13 Thread Roman Yakovenko
Hi. I would like to freeze python application on linux. There are a
few tools that make the job to be done:
freeze ( comes with python )
cx_Freeze
Gordon McMillan's installer


Is it possible to freeze python application on linux in such way that
it doesn't depends on python installed on cu
--
http://mail.python.org/mailman/listinfo/python-list


Re: Freezing python application

2005-04-13 Thread Roman Yakovenko
Sorry for previous post - hit the wrong button

Hi. I would like to freeze python application on linux. There are a
few tools that make the job to be done:
freeze ( comes with python )
cx_Freeze
Gordon McMillan's installer

I have one problem with all of them: they require python to be
installed on target machine.
May be I missed something or did not understand right the docs? Also
if I am right could you point me to freeze tool that doesn't require
python installed on customer computer?

For windows I have py2exe. What should I use for linux to get same affect?

Thanks

Roman
--
http://mail.python.org/mailman/listinfo/python-list


Re: LD_LIBRARY_PATH - how to set?

2005-03-31 Thread Roman Yakovenko
On 31 Mar 2005 00:51:21 -0800, Serge Orlov [EMAIL PROTECTED] wrote:
 Roman Yakovenko wrote:
  Hi. I have small problem. I need to load extension module that
 depends
  on shared library. Before actually importing module I tried to edit
  os.environ or to call directly to os.putenv without any success -
  shared library was not found. I tried to search the Internet for the
  answer. The only approach I saw was to set LD_LIBRARY_PATH before
  invoking python script. I don't like this solution.
 
 Looks like it's glibc linker inflexibility:
 http://hathawaymix.org/Weblog/2004-12-30
 
 There is no provision for modifying the library search path once your
 program has started.
 

Thanks, well small script around my program will make the trick. I
think I have no other choise.

 Python does update enviromental variables if you change os.environ or
 call os.putenv, but the linker ignores the changes.
   Serge.
 
 --
 http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: LD_LIBRARY_PATH - how to set?

2005-03-30 Thread Roman Yakovenko
Thanks for help. But it is not exactly solution I am looking for. I
would like to do it from python script. For example

update_env() #- this function will change LD_LIBRARY_PATH
import extension_that_depends_on_shared_library

Roman

On Mar 31, 2005 9:35 AM, John Abel [EMAIL PROTECTED] wrote:
 With Solaris 8+ you would use the command crle, with Linux
 (RedHat/SuSE/Mandrake) you need to add the relevant directories
 /etc/ld.so.conf and run ldconfig.  I've not got a Debian box to hand, so
 I can't say if it matches, but that should give you a pointer.

I think I should have permissions to do it. (more over users of my
scripts should have permissions )

 HTH
 
 J
 
 Roman Yakovenko wrote:
 
 On Mar 31, 2005 9:20 AM, John Abel [EMAIL PROTECTED] wrote:
 
 
 What OS?  Linux?  Solaris?
 
 
 
 Does it matter? If so, please explain why ( lack of knowledge )
 I am using Linux ( Debian Surge  )
 
 Thanks
 
 
 
 
 J
 
 Roman Yakovenko wrote:
 
 
 
 Hi. I have small problem. I need to load extension module that depends
 on shared library. Before actually importing module I tried to edit
 os.environ or to call directly to os.putenv without any success -
 shared library was not found. I tried to search the Internet for the
 answer. The only approach I saw was to set LD_LIBRARY_PATH before
 invoking python script. I don't like this solution.
 
 Roman
 
 
 
 
 
 
 
 
 --
 *John Abel
 Senior Unix Administrator*
 PA News Limited
 www.pa.press.net http://www.pa.press.net
 E-Mail address: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 Telephone Number : 01430 43
 Fax Number : 0870 1240192
 Mobile Number : 07971 611356
 The Bishop's Manor, Market Place, Howden, DN14 7BL
 PA News Limited, 292 Vauxhall Bridge Road, London SW1V 1AE. Registered
 in England No. 3891053.

-- 
http://mail.python.org/mailman/listinfo/python-list