Re: embedded python example: PyString_FromString doesnt work?

2005-03-25 Thread David Harris
On Fri, 25 Mar 2005 11:09:35 +0300, Denis S. Otkidach wrote: > DH> Calling the program gives an error; > DH> "[EMAIL PROTECTED]:~/source/python> ./test_String script1.py multiply 4 > DH> 5 import went bang... > DH> ImportError: No module named script1.py" > DH> script1.py exists and it is in the

Re: embedded python example: PyString_FromString doesnt work?

2005-03-24 Thread David Harris
On Thu, 24 Mar 2005 06:39:47 -0800, Brano Zarnovican wrote: > Hi David ! > > I cannot see anything wrong on your code. So, I'm posting my working > example. > > Hint: try to determine, why it is returning NULL (the PyErr_Print() > call) > > BranoZ > OK your example works fine. I inserted it i

embedded python example: PyString_FromString doesnt work?

2005-03-23 Thread David Harris
I'm trying the embedded python example here: http://www.python.org/doc/2.3.2/ext/pure-embedding.html int main(int argc, char *argv[]) { PyObject *pName, *pModule, *pDict, *pFunc; PyObject *pArgs, *pValue; int i; if (argc < 3) { fprintf(stderr,"Usage: call pythonfile funcna