Advertisement

Anyone experience with embedding Python??

Started by March 20, 2002 12:03 AM
2 comments, last by Floating 22 years, 8 months ago
I read a lot of documentation about embedding the Python interpreter in my application... and I am tired What I am looking for is some easy code examples, good advice, ... Anyone?
Hi!

I used embedded Python in a tool (for our 3d engine) written in Delphi and I have to say that there''s no easy code to do it! :-(

You can use some library to help you like C Boost that has a wrapper to easily embed the Python.

If I can give you my opinion, try to look at the LUA script language. It''s very easy to embed (it''s written for) in C/C++ and the exchange of data between the C/C++ environment and the LUA''s one is very easy!

I tried to embed Python and spent three days getting nothing.
Then I spent four hours on LUA and got my 3d engine to have a scripting language! :-)

http://www.lua.org

Bye Bye
F104/NA
KISS - Keep It Simple Stupid
Advertisement
Thanks for your advice F104

I had a quick look at www.lua.org and it seems like I could easily use it! But at the same time I have to be sure that LUA will be supported in future too. Python seems to be much more popular and well maintained (I mean just at looking rapidely at the home page). Do you think there will be a briliant future for LUA too??

Cheers
Yes, Python is popular, but I saw LUA is ever more used and mentioned. It has been used in some commercial game too (Baldur''s Gate).

I can''t assure you if it will be supported in the future, but I think you can ask to its developers in the LUA forum! :-)

Another difference between LUA and Python is that LUA has much more performances than Python. Speed, memory occupation...

I saw some site where there are benchmarks to show you the differences between all the scripting languages (PHP, ASP, LUA, Python...), but I don''t remember the address :-(

Bye Bye
F104/NA

KISS - Keep It Simple Stupid

This topic is closed to new replies.

Advertisement