Re: Problem embedding Python.

2009-10-30 Thread Dave Angel
Dave Angel wrote: div class=moz-text-flowed style=font-family: -moz-fixedBrandon Keown wrote: On Oct 27, 7:48 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: snip Now that you've solved your problem, revise your conclusion. A file without a path *is* searched in the current working

Re: Problem embedding Python.

2009-10-29 Thread Brandon Keown
On Oct 27, 7:48 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Tue, 27 Oct 2009 06:36:18 -0300, Brandon Keown keown.bran...@gmail.com escribió: On Oct 27, 2:47 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: You didn't test for the fopen result; are you sure test.py exists in

Re: Problem embedding Python.

2009-10-29 Thread Dave Angel
Brandon Keown wrote: On Oct 27, 7:48 pm, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: snip Now that you've solved your problem, revise your conclusion. A file without a path *is* searched in the current working directory - but that directory may not be the one you think it is. -- Gabriel

Re: Problem embedding Python.

2009-10-29 Thread Brandon Keown
O...K... -- http://mail.python.org/mailman/listinfo/python-list

Re: Problem embedding Python.

2009-10-27 Thread Gabriel Genellina
En Tue, 27 Oct 2009 06:36:18 -0300, Brandon Keown keown.bran...@gmail.com escribió: On Oct 27, 2:47 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: You didn't test for the fopen result; are you sure test.py exists in the current directory at the time you run it? Ok, so I assumed that

Problem embedding Python.

2009-10-27 Thread Brandon Keown
I am going to try to embed python in an application, but in simple testing, I could not get it to work. The following code seems like it should work, but it crashes, and I have tried several things. What could I be doing wrong? #include Python.h int main(int argc, char* argv[]) { FILE*

Re: Problem embedding Python.

2009-10-27 Thread Gabriel Genellina
En Tue, 27 Oct 2009 03:25:54 -0300, Brandon Keown keown.bran...@gmail.com escribió: I am going to try to embed python in an application, but in simple testing, I could not get it to work. The following code seems like it should work, but it crashes, and I have tried several things. What

Re: Problem embedding Python.

2009-10-27 Thread Brandon Keown
On Oct 27, 2:47 am, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: Crashes, how? Try running inside a debugger to see where it crashes, or at   least put a few printf. You didn't test for the fopen result; are you sure test.py exists in the   current directory at the time you run it? --

Re: Problem embedding Python.

2009-10-27 Thread Brandon Keown
I found the problem. Evidently as posted on a few other areas of the internet, this is a common problem when trying to use compilers that may have different type definitions for (FILE*). Here is workable solution: #include Python.h int main(int argc, char* argv[]) { PyObject*

Problem Embedding Python in small Win32 App

2007-07-26 Thread Brad Johnson
I am just entering the world of Python embedding and I am running into a bug I am having a hard time fixing. Please be gentle. I am creating a small test application in Windows to test the embedding of the interpreter in order to execute arbitrary Python statements and print their results, all

Problem embedding Python...

2006-04-10 Thread Andrew McCall
Hi Folks, I have now managed to work out how to embed Python to allow me to script my application, the only problem is I am getting a compiler error when I try to compile: The error is: Compiler: Default compiler Executing g++.exe... g++.exe C:\Documents and

Re: Problem embedding Python...

2006-04-10 Thread Dave Mandelin
C:\DOCUME~1\ANDY~1.MCC\LOCALS~1\Temp/cckhbaaa.o(.text+0x2b):main.cpp: undefined reference to `_imp__Py_Initialize' These errors indicate that the linker can't find the Python library (python24.lib). -LC:\Python24\Lib I think you want to say -LC:\Python24\Libs instead. 'libs' contains the

Urgent problem: Embedding Python questions....

2005-06-23 Thread adsheehan
Hi, I am embedding Python into a multi-threaded C++ application runnig on Solaris and need urgent clarification on the embedding architecture and its correct usage (as I am experience weird behaviors). Can anyone clarify: - if Python correctly supports multiple sub-interpreters

Problem: embedding Python

2005-05-21 Thread mmf
Hallo! I tried to use Python from C like it is described in the Python Docmentation. So I wrote the following C source file: #include Python.h int main(int argc, char *argv[]) { Py_Initialize(); PyRun_SimpleString(print 'Hallo World!'\n); Py_Finalize(); return 0;