Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK and the Python-ness?

Author
Message
FlexiCat
13
Years of Service
User Offline
Joined: 15th Jun 2010
Location:
Posted: 3rd Jul 2011 17:00
Hello, I am working on a project in VC++ 2010 and I have been looking at ways to integrate python into my programming. I want to be able to use python code within my C++ program so that I can do all of my graphical/engine commands in C++, really close to DarkGDK, with all of my little code (ie, NPC movements and other little scriptable things etc.) to be done in python.

What I want, if anyone is familiar with it, is something akin to what CCP have setup for EVE online. On that front i have been looking at things like Boost.Python/Py++, SWIG, pyBinGen and stackless python.

My problem is that all of the python->c++ things I look at all talk about puting C++ libraries/code into python for use from there, however I want my "host language" if you will to be c++ and just take in some python from there... is this possible or, with DarkGDK, would it be better to do it the suggested way?

So what I am asking is if it is possible to put python code into C++ to control an engine I make around DarkGDK, or should it be the other way around. also wich way would be best then i guess...

Sorry if i am a little muddled in my thoughts guys but thank you,
FlexiCat

I swear to the programmers bible that I shall not harm the FPS.
Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 4th Jul 2011 20:25 Edited at: 4th Jul 2011 20:28
I haven't a clue about Python, but with some searching I found this article for you.

http://www.linuxjournal.com/article/8497

P.S. This is from a Linux journal, I hope it applies to a Windows environment as well.
FlexiCat
13
Years of Service
User Offline
Joined: 15th Jun 2010
Location:
Posted: 4th Jul 2011 23:56
it was a good start on the right track, article that has helped me most though is below, incase others end up looking for something similar in the future:

http://docs.python.org/extending/embedding.html

Thanks

I swear to the programmers bible that I shall not harm the FPS.

Login to post a reply

Server time is: 2024-04-26 07:45:29
Your offset time is: 2024-04-26 07:45:29