Thread overview
Python/D
Apr 09, 2004
Deja Augustine
Apr 09, 2004
Walter
Apr 09, 2004
Deja Augustine
Apr 09, 2004
Ben Hinkle
Apr 09, 2004
Ilya Minkov
Apr 09, 2004
Deja Augustine
Re: Python/D (Major Bug Fixed)
Apr 09, 2004
Deja Augustine
April 09, 2004
Well, I've managed to port over 90% of the Python/C API to D so now you can extend or embed python using D (the other 10% are threads, some unicode stuff and several macros, but those'll be put in shortly).

Check it out at http://www.scratch-ware.net/D/


April 09, 2004
Since D and Python appeal to the same kinds of programmers, this is great!


"Deja Augustine" <Deja_member@pathlink.com> wrote in message news:c556d1$i2a$1@digitaldaemon.com...
> Well, I've managed to port over 90% of the Python/C API to D so now you
can
> extend or embed python using D (the other 10% are threads, some unicode
stuff
> and several macros, but those'll be put in shortly).
>
> Check it out at http://www.scratch-ware.net/D/
>
>


April 09, 2004
Well, I've gotten Python/D about as far as I'm going to take it. Threads, Unicode, Frametrace, etc are all in there.  All it's missing are most of the macros, but the majority of them seem to be merely there for backward compatibility, so I don't feel like spending the enormous amount of time required to implement them all.

If you find that a particular macro is missing (and it does more than simply call a function already provided) or if I've missed or messed up anything, please feel free to send me an email at D@scratch-ware.net

Enjoy!

In article <c558sm$mmb$1@digitaldaemon.com>, Walter says...
>
>Since D and Python appeal to the same kinds of programmers, this is great!
>
>
>"Deja Augustine" <Deja_member@pathlink.com> wrote in message news:c556d1$i2a$1@digitaldaemon.com...
>> Well, I've managed to port over 90% of the Python/C API to D so now you
>can
>> extend or embed python using D (the other 10% are threads, some unicode
>stuff
>> and several macros, but those'll be put in shortly).
>>
>> Check it out at http://www.scratch-ware.net/D/
>>
>>
>
>


April 09, 2004
I'm curious, does there exist a C++ API to Python? I mean one that takes advantage of features in C++ that aren't in C. I wonder how seamless it can be from either D or C++.

-Ben

"Deja Augustine" <Deja_member@pathlink.com> wrote in message news:c556d1$i2a$1@digitaldaemon.com...
> Well, I've managed to port over 90% of the Python/C API to D so now you
can
> extend or embed python using D (the other 10% are threads, some unicode
stuff
> and several macros, but those'll be put in shortly).
>
> Check it out at http://www.scratch-ware.net/D/
>
>


April 09, 2004
Ben Hinkle schrieb:
> I'm curious, does there exist a C++ API to Python? I mean one that takes
> advantage of features in C++ that aren't in C. I wonder how seamless it can
> be from either D or C++.

There's one in Boost which has caused major headache to DMC and some other compilers. I can't remember exactly, i think the issues with DMC have been resolved now. I've never tried it though.

-eye
April 09, 2004
I don't imagine it would be that difficult to write a Python wrapper in D.  It's been my experience that it's frequently more beneficial to write a new version of a wrapper from scratch using D than to port it over from C++ as then you can more readily utilize the features of D that make it worth doing in the first place.

Also, as a side note, I realized that I had missed a few predefined variables (such as Py_None and the predefined exception types like PyExc_IOError) so those have been added.

Please download the latest version at http://www.scratch-ware.net/D/

In article <c56s1e$7kb$1@digitaldaemon.com>, Ilya Minkov says...
>
>Ben Hinkle schrieb:
>> I'm curious, does there exist a C++ API to Python? I mean one that takes advantage of features in C++ that aren't in C. I wonder how seamless it can be from either D or C++.
>
>There's one in Boost which has caused major headache to DMC and some other compilers. I can't remember exactly, i think the issues with DMC have been resolved now. I've never tried it though.
>
>-eye


April 09, 2004
There was an error in the object structure and the refcounting wasn't working causing the Py_Finalize() function to give an access error.

This has been fixed and Python/D works flawlessly for both embedding and extending (see the site for examples of both)

http://www.scratch-ware.net/D/