PROBLEM with MOD_PYTHON

2006-10-28 Thread dan84
I don't understand this error , in the (Apache) errorlog I read this
message :

[Sat Oct 28 14:04:03 2006] [error] make_obcallback: could not import
mod_python.apache.\n
[Sat Oct 28 14:04:03 2006] [error] make_obcallback: Python path being
used "['C:Python24python24.zip', '.DLLs', '.lib',
'.libplat-win', '.liblib-tk',
'C:ProgrammiApache GroupApache2bin']".
[Sat Oct 28 14:04:03 2006] [error] python_handler: no interpreter
callback found.
[Sat Oct 28 14:04:03 2006] [error] [client 127.0.0.1] python_handler:
Can't get/create interpreter.

I have Apache/2.0.59 (Win32) mod_python/3.2.10 Python/2.4.3
I have read all the manuals, but I don't understand where I am wrong.

thanks so much
   Marco.

-- 
http://mail.python.org/mailman/listinfo/python-list


PYTHON + EXCEL

2006-11-14 Thread dan84
I write my code :
#inizializzazioni varie che tralascio


#mi connetto al mio db mysql e recupero i dati che volgio inserire
nel file excel
conn = MySQLdb.connect(host = "XXX", port = XXX, user = "XXX",
passwd = "XXX", db= "XXX")
cursor = conn.cursor()
cursor.execute("SELECT * FROM XXX")
allFields = cursor.description
allRecords = cursor.fetchall()
cursor.close()
conn.close()


#inizializzo gli strumenti per lavorare in python con excel
xlApp = Dispatch("Excel.Application")
#xlApp.Visible = 1
xlApp.Workbooks.Add()


#specifico che file utilizzare
xlbook = xlApp.Workbooks.Open('C:/view.xls')
i = 1
j = 1


#popolo il mio file excel
for field in allFields :
xlApp.ActiveSheet.Cells(i, j).Value = field[0]
j = j + 1
for records in allRecords :
i = i + 1
j = 1
for item in records :
xlApp.ActiveSheet.Cells(i, j).Value = item
j = j + 1
#salvo le modifiche effettuate
xlbook.SaveAs('C:/view.xls')


#scrivo le istruzioni che mi permettereanno di aprirlo in una
pagina html
size = os.path.getsize('C:/view.xls')
of = open("C:/view.xls","rb")
content = of.read()
of.close()


print"Content-Type:application7vnd.ms-excel"
print"content-disposition:inline;filename=view.xls"
print"Content-length:%d \r\n"%size
print content







I want open an excel document in an apache page.
I want write in excel document the information of a database mySQL and
after open the excel documen in a broswer page
Where is the problem?
Sorry for my english but I'm not speak english very well, I write in
this group because I think that in this forum there are very very good
programmer

-- 
http://mail.python.org/mailman/listinfo/python-list