CGIHTTPServer threading problems

2006-03-31 Thread Alvin A. Delagon
I'm a simple python webserver based on CGIHTTPServer module: import CGIHTTPServer import BaseHTTPServer import SocketServer import sys import SQL,network from config import * class ThreadingServer(SocketServer.ThreadingMixIn,BaseHTTPServer.HTTPServer): pass cfg = params() print XBOX Server

Obtaining the remote ip address

2006-03-27 Thread Alvin A. Delagon
One quick question: I have a python cgi script running behind a CGI server which is also built using python using CGIHTTPServer module. How can my cgi script obtain the remote ip address? -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining the remote ip address

2006-03-27 Thread Alvin A. Delagon
Thanks a lot Justin! ^_^ -- http://mail.python.org/mailman/listinfo/python-list

Threading.Lock() question

2006-03-09 Thread Alvin A. Delagon
I have a multithreaded application that spawns threads which query a database server. During stress test I encountered some threads failing due lost connection errors and sometimes the actual script itself dies due to a Segmentation Fault. I realized that it might be a deadlock situation so I

Re: Threading.Lock() question

2006-03-09 Thread Alvin A. Delagon
I think I just found out my problem. How stupid of me, I should've created an instance of lock in the class Process instead of class Send. Good Heaven's python's threading rocks! I stress tested the server script having two clients sending requests on a while 1 loop without even a time.sleep()

Re: Threading.Lock() question

2006-03-09 Thread Alvin A. Delagon
@ Dennis Thanks for the quick heads up! You're right! I noticed the bug on my script just after sending out my question. Yes, I'm using MySQLdb but I did a wrapper for it to further simplify my script that why the sample script I wrote is a little bit different. Thanks again! Python rules!!!

Fetching the Return results of a spawned Thread

2006-02-28 Thread Alvin A. Delagon
Is there any way to fetch the Return results of spawned threads within the parent script? I would like to do that because I'm having problems with Threads that do queries to a database, I often encounter Threads failing due to MySQL connection failures. As much as possible I plan to make the

Re: Fetching the Return results of a spawned Thread

2006-02-28 Thread Alvin A. Delagon
Thanks a lot for the links that you gave me. I will look into that today! :-) -- http://mail.python.org/mailman/listinfo/python-list

Multi-Threading Practices

2006-02-26 Thread Alvin A. Delagon
Greetings, I was the last time who asked your opinion about Infinite Loops and crontab. I settled with crontab where in the python program selects a number of records from a mysql database and then releases Threads (which is actually CORBA clients) that report to a CORBA server, wait a

Re: Is inifinite loop not a good practice?

2006-02-20 Thread Alvin A. Delagon
Thanks for the quick heads up! The comparison between implementing an infinite loop and cron is great. I'm beginning to see cron as the better solution between the two specially during crash instances. I'll try to code the script using the two solutions and do some stress testing to determine

Is inifinite loop not a good practice?

2006-02-19 Thread Alvin A. Delagon
Greetings, I have to write a python script that would continously monitor and process a queue database. Once the script sees an unprocessed record it will create a thread to process it otherwise it will do nothing. I've been planning to do an infinite loop within the script to do this but

SMPP implementation in python

2006-01-17 Thread Alvin A. Delagon
Greetings! Does anyone know a good reference on how to implement SMPP in python. I can't find any besides NET::SMPP in perl and I don't want to get my hands for that. Thanks in advance! -- http://mail.python.org/mailman/listinfo/python-list

Any wing2.0 users here?

2006-01-02 Thread Alvin A. Delagon
emacs has been my long time companion for php, perl, and python. My boss recommended to me Wing2.0, I find it hard to adjust though. What can you say about this IDE? He say's if I think it could improve my productivity he's willing to buy it for me. Suggestions for better python IDE's are

Re: Any wing2.0 users here?

2006-01-02 Thread Alvin A. Delagon
Thanks for all the recommendations! I took a look on wingide2.0 on my linux box and it seems pretty good and has a lot of nifty features (which is pretty daunting to use since I've been programming with no IDE at all) and it debugger work pretty well but for a price tag of $179 I think it not

getting the status codes from the ftplib module

2005-12-28 Thread Alvin A. Delagon
I'm writing a simple python code that will upload files onto a ftp server. Everything's fine and working great except that the script I wrote don't know is an upload is successful or not. Is there a way to obtain the ftp status codes with this module? Thanks in advance! --

Re: getting the status codes from the ftplib module

2005-12-28 Thread Alvin A. Delagon
ION] - E04 - Leadership! Google, Guido van Rossum, PSF (Martin P. Hellwig) 9. getting the status codes from the ftplib module (Alvin A. Delagon) 10. Re: getting the status codes from the ftplib module (Fredrik Lundh) Subject: Re:

urllib http status codes

2005-12-28 Thread Alvin A. Delagon
Greetings! Is there any way I can obtain the HTTP status codes when using the urllib module? As of now I can only think of doing a regex on the result of the read(). Thanks in advance! ^_^ -- http://mail.python.org/mailman/listinfo/python-list

Re: getting the status codes from the ftplib module

2005-12-28 Thread Alvin A. Delagon
I'm very sorry, newbie here! @_@ I'm still getting the hang of Thunderbird. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib http status codes

2005-12-28 Thread Alvin A. Delagon
Thanks! Will try httplib! ^_^ -- http://mail.python.org/mailman/listinfo/python-list

SOAPpy module

2005-10-27 Thread Alvin A. Delagon
Hello fellow pythonista's! I would like to ask if there's any good people who had experience in using the SOAPpy module. I'm currently rewriting a SOAP client that is written in PERL which uses the SOAP::Lite module. I managed to fetch the XML response from the server but I'm getting XML

Any SOAPpy users here?

2005-10-20 Thread Alvin A. Delagon
Hello python programmers! I would like to add myself to the ever increasing number of python users. Here's my first question. I've written two SOAP clients using PERL and a PHP. I tried to wirte a new SOAP client using python but I'm having problems. First, I can't seem to find a good

Writing python SOAP client

2005-10-19 Thread Alvin A. Delagon
Hello python programmers! I would like to add myself to the ever increasing number of python users. Here's my first question. I've written two SOAP clients using PERL and a PHP. I tried to wirte a new SOAP client using python but I'm having problems. First, I can't seem to find a good