Archived

This topic is now archived and is closed to further replies.

Floating

Anyone experience with embedding Python??

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites