better scheduler with correct sleep times

2008-10-18 Thread qvx
I need a scheduler which can delay execution of a function for certain period of time. My attempt was something like this: def delay(self, func, arg, delay_sec=0): fire_at = wallclock() + delay_sec self.queue.put((fire_at, func, arg)) def runner(self): while self.a

Re: I CAN connect socket to any localhost port but I shouldn't be able to

2008-07-30 Thread qvx
On Jul 30, 4:48 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 29 Jul 2008 14:56:08 -0300, qvx <[EMAIL PROTECTED]> escribi : > > > I don't have server listening on port 8084 but I can open socket to it > > (and to many other ports, te

I CAN connect socket to any localhost port but I shouldn't be able to

2008-07-29 Thread qvx
Hi, I don't have server listening on port 8084 but I can open socket to it (and to many other ports, tested for all<8000) import socket def test(port): af, socktype, proto, canonname, sa = socket.getaddrinfo('localhost', port, socket.AF_INET, socket.SOCK_STREAM)[0] s = socket.sock

Re: Simulating low bandwidth network on localhost

2005-10-08 Thread qvx
I forgot to tell you that I'm using Windows. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simulating low bandwidth network on localhost

2005-10-07 Thread qvx
Thanks. I'll try to find a version that works under Windows. So far I had little luck finding it. qvx -- http://mail.python.org/mailman/listinfo/python-list

Simulating low bandwidth network on localhost

2005-10-07 Thread qvx
specialized software for this kind of things (preferably free). Thanks, qvx -- http://mail.python.org/mailman/listinfo/python-list

Help with unicode and sqlobject/pysqlite2

2005-09-28 Thread qvx
7; I'm using the latest version of sqlobject from SVN. qvx -- http://mail.python.org/mailman/listinfo/python-list

Re: sqlobject performance problems (really)

2005-09-27 Thread qvx
qvx wrote: > "autocommit off" attempt: > > connection_string = 'sqlite:/' + db_filename +'?autoCommit=0' > > "no select" attempt: > > t1 = T1(id=t1id, col1=r.col1, ...) I changed : conn_string = 'sqlite:/'

sqlobject performance problems (really)

2005-09-27 Thread qvx
sqlobject work as fast as plain pysqlite. P.S. I used 0.6.1 version of sqlobject, but later I downloaded fresh version from SVN (upgraded pysqlite to 2.x, downloaded formencode, ez_setup, setuptools and maybe others) but it still doesn't work any better. qvx -- http://mail.python.org/mailman/listinfo/python-list

Re: Poor man's OCR: need performance improvement tips

2005-09-24 Thread qvx
I also have 0 OCR experience, but the case is simple enough. I know about scipy but I have 0 experience with it. I was actually hoping somebody who knows about it might have some recipe. I also tried psyco, but unfortunetly, the speedup is only few percent. I will check out ADaM's site. I was h

Poor man's OCR: need performance improvement tips

2005-09-24 Thread qvx
he same to the line of text of input picture. Then i would have to compare two buffers of length equal to the length of character. After successfull match, I would advance "input" stream by that number of bytes. Thanx qvx -- http://mail.python.org/mailman/listinfo/python-list

Starting twisted service manually

2005-09-01 Thread qvx
n(0) thread.start_new_thread(runner, ()) I feel lost in twisted documentation and HOWTOs. Please help! Qvx -- http://mail.python.org/mailman/listinfo/python-list

Re: PEP on path module for standard library

2005-08-01 Thread qvx
Ron Adam wrote: > Bengt Richter wrote: > > > http://msdn.microsoft.com/workshop/networking/pluggable/overview/aplugprot_overviews_entry.asp. Qvx -- http://mail.python.org/mailman/listinfo/python-list

Daylight savings and getmtime

2005-01-28 Thread Qvx
Hello, I'we written a simple web deployment program which scans for the changes made to local copy of web site. Changed files are than packaged into a zip file and deployed to web server. Now here's the catch. Changes are computed using (1) log file from the last deployment and (2) local file sys