Re: MUD Game Programmming - Python Modules in C++

2009-10-14 Thread Gabriel Genellina
En Wed, 14 Oct 2009 05:19:06 -0300, Ulrich Eckhardt escribió: Gabriel Genellina wrote: #ifdef _DEBUG #undef _DEBUG #include #define _DEBUG #else #include #endif [...to keep Python from linking against non-existant debug libraries.] No, don't do that. Just compile your application in relea

Re: MUD Game Programmming - Python Modules in C++

2009-10-14 Thread Ulrich Eckhardt
Gabriel Genellina wrote: >> #ifdef _DEBUG >> #undef _DEBUG >> #include >> #define _DEBUG >> #else >> #include >> #endif [...to keep Python from linking against non-existant debug libraries.] > > No, don't do that. Just compile your application in release mode. Why not, does it break anything?

Re: MUD Game Programmming - Python Modules in C++

2009-10-14 Thread Ulrich Eckhardt
Christopher Lloyd wrote: > I'm a relatively inexperienced programmer, and have been learning some > basic C++ and working through the demos in Ron Penton's "MUD Game > Programming" book. In it, Python modules are run from inside a C++ > program. [...] > If I try to compile this in MS Visual C++ 200

Re: MUD Game Programmming - Python Modules in C++

2009-10-14 Thread Ulrich Eckhardt
Irmen de Jong wrote: > [...] is there any reason why you would go the route of embedding python > in C++ ? Why not just stick to (pure) Python? Embedding C or C++ stuff > as extension modules in Python (if you really need to do this) is easier > than the other way around, in my experience. If you

Re: MUD Game Programmming - Python Modules in C++

2009-10-13 Thread Gabriel Genellina
En Tue, 13 Oct 2009 18:08:53 -0300, Christopher Lloyd escribió: #include #include #include "Python.h" int main() { std::cout << "Starting Python Demo Test" << std::endl; Py_Initialize();// initialize python std::string str; std::getline( std::cin, str );

Re: MUD Game Programmming - Python Modules in C++

2009-10-13 Thread Gabriel Genellina
En Tue, 13 Oct 2009 18:08:53 -0300, Christopher Lloyd escribió: #include #include #include "Python.h" int main() { std::cout << "Starting Python Demo Test" << std::endl; Py_Initialize();// initialize python std::string str; std::getline( std::cin, str );

Re: MUD Game Programmming - Python Modules in C++

2009-10-13 Thread Irmen de Jong
Christopher Lloyd wrote: Hello all, I'm new to Python and new to this list, although I've done some digging in the archives and already read up on the problem I'm about to describe. I'm a relatively inexperienced programmer, and have been learning some basic C++ and working through the demos

MUD Game Programmming - Python Modules in C++

2009-10-13 Thread Christopher Lloyd
Hello all, I'm new to Python and new to this list, although I've done some digging in the archives and already read up on the problem I'm about to describe. I'm a relatively inexperienced programmer, and have been learning some basic C++ and working through the demos in Ron Penton's "MUD Game P