Dave Angel wrote:
Brandon
Keown wrote:
On Oct 27, 7:48 pm, "Gabriel Genellina"
wrote:
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 Gene
O...K...
--
http://mail.python.org/mailman/listinfo/python-list
Brandon Keown wrote:
On Oct 27, 7:48 pm, "Gabriel Genellina"
wrote:
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 Genellina
I'm not
On Oct 27, 7:48 pm, "Gabriel Genellina"
wrote:
> En Tue, 27 Oct 2009 06:36:18 -0300, Brandon Keown
> escribió:
>
> > On Oct 27, 2:47 am, "Gabriel Genellina"
> > wrote:
>
> >> You didn't test for the fopen result; are you sure "test.py" exists in
> >> the current directory at the time you run i
En Tue, 27 Oct 2009 06:36:18 -0300, Brandon Keown
escribió:
On Oct 27, 2:47 am, "Gabriel Genellina"
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 the file, if supplied without a path, would
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
int main(int argc, char* argv[])
{
PyObject* PyFileObject;
On Oct 27, 2:47 am, "Gabriel Genellina"
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?
>
> --
> Gabriel Gene
En Tue, 27 Oct 2009 03:25:54 -0300, Brandon Keown
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
could I be doing wrong?
#i
> 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).
> -L"C:\Python24\Lib"
I think you want to say -L"C:\Python24\Libs" instead. 'libs' contains
mmf wrote:
> 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
> int
> main(int argc, char *argv[])
> {
> Py_Initialize();
> PyRun_SimpleString("print 'Hallo World!'\n");
> Py_Finalize
10 matches
Mail list logo