[C++-sig] Improved pyste

Nicodemus nicodemus at esss.com.br
Mon Jun 13 23:27:10 CEST 2005


Hi Roman,

(sorry about the late reply, I've been busy)

Roman Yakovenko wrote:

>On 6/8/05, David Abrahams <dave at boost-consulting.com> wrote:
>
>> <>David Abrahams <dave at boost-consulting.com> writes:
>> ...Can you explain what your system offers, or will offer, that Pyste 
>> cannot?
>>
>> 2. Extendability: If I need a custom way to export something it could
>> not be easily done with pyste. Example: there are a lot of projects
>> that use java-doc like comments within source. Using py++ it is simple
>> to create new class that derives from one of build in classes and
>> implement logic of injection of documentation into python wrapper. An
>> other example is - programmer can define call policies within special
>> comment near function declaration and then to read it during code
>> creation process
>

Yes, that is a weakness of Pyste. It wasn't designed to be extensible by 
the user.

>> <>3. Flexibility: May be I wrong but there is no easy way in Pyste to
>> exclude functions
>> that takes as argument some specific type. For example: I have classes
>> that has functions that deals with XML using xercesc library. I want
>> to exclude all those functions.
>

Yes, not right now. One of the planned implementation is to make the 
objects returned by the various Class, Function, etc, be the actual 
*declaration* objects. This way you could easily do that kind of 
manipulation.

>> <>4. py++ could be extended to generate python code. Consider next 
>> situation:
>>
>> namespace top{
>> namepsace x1{...}
>> namepsace x2{...}
>> }
>>
>> In my opinion the resulting could should be package top that has to
>> modules or sub packages x1 and x2. py++ has all data in order to
>> implement this.
>>
>> I think there is no easy way to do it in Pyste. Am I wrong?
>

No, you're right. One would have to do it by hand after the code was 
generated.

>> <>5. There is full separation between next things:
>> 1. what should be exported and in what order
>> 2. how it should be exported
>> 3. where and how to write code in files
>>
>> 6. As I mentioned in my previous post: there are a few projects that
>> use similar way to expose C++ to different languages. One of them is
>> yours: langbinding. I think it will be pretty easy to support code
>> generation for this library too. ( This statement still should be
>> checked by reality )
>

Cool!

>> <>
>> Before starting to write code for py++, I checked what could be
>> improved in current Pyste. The first obvious thing was parsing GCC-XML
>> generated file. I created new python package called pygccxml. After
>> this, I checked how pygccxml could be integrated with Pyste. It was
>> too difficult. So I dropped this idea. Also I do had small coversation
>> with Nicodemus. And in one mail he told me that is going to be next
>> version of Pyste. It was 6 months ago. Nothing happen till now. So I
>> decided to write next version of Pyste.
>

Yes, I plan to eventually drop my code regarding parsing GCCXML in favor 
of pygccxml, but really have not found the time to do it yet.

>> <>That's all. I hope in 2 or 4 month I will have first version, that
>> could be released.
>

Cool. But I think the community would benefit better if we joined our 
efforts somehow. Perhaps we could merge the strengths of both tools into 
one project?

Regards,
Nicodemus.



More information about the Cplusplus-sig mailing list