Re: ImportError while Embedding python in C

2008-03-15 Thread kaush
On Mar 15, 2:10 am, kaush <[EMAIL PROTECTED]> wrote: > Hi All, > > I have a simple python script saved to "test.py" as > > import os > import base64 > > def Testfunction(): > print "Hello World" > return > > Testfunction() >

ImportError while Embedding python in C

2008-03-15 Thread kaush
Hi All, I have a simple python script saved to "test.py" as import os import base64 def Testfunction(): print "Hello World" return Testfunction() I am trying to invoke this from a C program as follows int main(int argc, char* argv[]) { Py_Initialize(); PyObject* main_

urlsafe_b64decoding of xml node text

2008-03-03 Thread kaush
Hi All, I am running Apache with mod_python. A post message to my server contains an xml of the form (some base64 ur-safe-encoded data) I use minidom to parse the xml posted, and now try to decode the data using the following import minidom import base64 decData = base64.urlsafe_b64decode

Re: mod_python Unable to create file

2008-03-02 Thread kaush
On Mar 1, 11:24 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 01 Mar 2008 22:47:02 -0800, kaush wrote: > > I am using Apache and mod_python to service POST/GET requests on MAC > > OS. My script tries to create a file > > > file = open(f

mod_python Unable to create file

2008-03-01 Thread kaush
Hi, I am using Apache and mod_python to service POST/GET requests on MAC OS. My script tries to create a file file = open(file_path, 'w') This fails with the following error EACCES Permission denied What is missing? Thanks, Kaushik -- http://mail.python.org/mailman/listinfo/python-list