Re: Timeout when connecting to sybase DBS

2009-07-02 Thread eranlevi
On Jul 2, 1:07 am, s...@pobox.com wrote: >     Gil> Are you saying, that when you trying to connect to a sybase DBS >     Gil> server and the DBS or the server is down, you get an error after a >     Gil> few seconds and not after a few minutes? > > Yes, though thankfully our server tends to almost

Re: Timeout when connecting to sybase DBS

2009-07-02 Thread eranlevi
On Jul 2, 1:08 am, s...@pobox.com wrote: >     Gil> There's no such group as python-sybase :-( > > http://sourceforge.net/mailarchive/forum.php?forum_name=python-sybase... > > S Thanks :-) -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread skip
Gil> There's no such group as python-sybase :-( http://sourceforge.net/mailarchive/forum.php?forum_name=python-sybase-misc S -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread skip
Gil> Are you saying, that when you trying to connect to a sybase DBS Gil> server and the DBS or the server is down, you get an error after a Gil> few seconds and not after a few minutes? Yes, though thankfully our server tends to almost always be up. Gil> Which python version are

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread eranlevi
On Jul 1, 3:56 pm, eranlevi wrote: > On Jun 30, 7:48 pm, s...@pobox.com wrote: > > > > >     Gil> I have looked for a timeout parameter to limit the 4 minutes to > >     Gil> something more reasonable but couldn't find one.  Can anyone please > >     Gil> help? > > >     Gil> BTW, I'm using Sybase

Re: Timeout when connecting to sybase DBS

2009-07-01 Thread eranlevi
On Jun 30, 7:48 pm, s...@pobox.com wrote: >     Gil> I have looked for a timeout parameter to limit the 4 minutes to >     Gil> something more reasonable but couldn't find one.  Can anyone please >     Gil> help? > >     Gil> BTW, I'm using Sybase.connect(, , , >     Gil> datetime='auto') > > We us

Re: Timeout when connecting to sybase DBS

2009-06-30 Thread skip
Gil> I have looked for a timeout parameter to limit the 4 minutes to Gil> something more reasonable but couldn't find one. Can anyone please Gil> help? Gil> BTW, I'm using Sybase.connect(, , , Gil> datetime='auto') We use the Sybase module where I work, but I've never encoun

Re: timeout

2008-04-29 Thread Bill
maehhheeyy wrote, On 4/29/2008 6:02 PM: Hi, I was just wondering if there was such thing as a timeout module. Take a look at the Timer class, which is a subclass of the Thread class. Here's a link to the official Python documentation: http://www.python.org/doc/2.3.5/lib/timer-objects.htm

Re: timeout

2008-04-29 Thread Diez B. Roggisch
maehhheeyy schrieb: Hi, I was just wondering if there was such thing as a timeout module. time.sleep? Diez -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout test hangs IDLE

2007-12-06 Thread Gabriel Genellina
En Thu, 06 Dec 2007 08:03:49 -0300, Andreas Tawn <[EMAIL PROTECTED]> escribió: >> There was a strange error when using 'print' & threads. When >> what I printed filled the entire screen, instead of moving >> all the text up, IDLE just hanged. Try running your code from >> the shell instead, to s

RE: Timeout test hangs IDLE

2007-12-06 Thread Andreas Tawn
> I once made a small app that used threads on IDLE. > > There was a strange error when using 'print' & threads. When > what I printed filled the entire screen, instead of moving > all the text up, IDLE just hanged. Try running your code from > the shell instead, to see if the problem is in IDL

Re: Timeout test hangs IDLE

2007-12-05 Thread Sergio Correia
I once made a small app that used threads on IDLE. There was a strange error when using 'print' & threads. When what I printed filled the entire screen, instead of moving all the text up, IDLE just hanged. Try running your code from the shell instead, to see if the problem is in IDLE. HTH, Sergio

Re: Timeout test hangs IDLE

2007-12-05 Thread kyosohma
On Dec 5, 10:37 am, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > > > On Dec 5, 6:00 am, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > > > > I'm trying to integrate the timeout function from > > > herehttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/47 > > > 3878into a > > > > long running autom

RE: Timeout test hangs IDLE

2007-12-05 Thread Andreas Tawn
> > On Dec 5, 6:00 am, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > > > I'm trying to integrate the timeout function from > > herehttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/47 > > 3878into a > > > long running automation script and the following code > > causes IDLE after > > > 20 o

RE: Timeout test hangs IDLE

2007-12-05 Thread Andreas Tawn
> On Dec 5, 6:00 am, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > > I'm trying to integrate the timeout function from > herehttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/47 > 3878into a > > long running automation script and the following code > causes IDLE after > > 20 or 30 iterations

Re: Timeout test hangs IDLE

2007-12-05 Thread kyosohma
On Dec 5, 6:00 am, "Andreas Tawn" <[EMAIL PROTECTED]> wrote: > I'm trying to integrate the timeout function from > herehttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/473878into a > long running automation script and the following code causes IDLE after > 20 or 30 iterations in countTest.

Re: Timeout to readline()/readlines()

2007-03-19 Thread Hendrik van Rooyen
"Horta" <[EMAIL PROTECTED]> wrote: > Sometimes, when I do an os.popen*(), the process executed by the > command hangs, and the script stops forever on the readline()/ > readlines() calls. I found that I can use select, but I'm thinking... > if, after a sellect() call returns, the stdout (for exam

Re: timeout in urllib.open()

2007-03-05 Thread Facundo Batista
Stefan Palme wrote: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool I'm working on adding a socket_timeout parametero to urllib2.urlopen. Regards, -- . Facundo . Blog: http://www.taniquetil.com.ar/plog/ PyAr: http:

Re: timeout in urllib.open()

2007-02-25 Thread John J. Lee
[EMAIL PROTECTED] writes: > >> I believe this can only be set globally: > >> > >> import socket > >> socket.setdefaulttimeout(seconds) > > Stefan> Uuuh this is no solution for me, because the website-checking > Stefan> tool is part of a very very big application running i

Re: timeout in urllib.open()

2007-02-25 Thread skip
>> I believe this can only be set globally: >> >> import socket >> socket.setdefaulttimeout(seconds) Stefan> Uuuh this is no solution for me, because the website-checking Stefan> tool is part of a very very big application running in an Stefan> application server, so g

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Paul Rubin writes: > Stefan Palme <[EMAIL PROTECTED]> writes: > > is there a way to modify the time a call of > > > > urllib.open(...) > > > > waits for an answer from the other side? Have a tool which > > automatically checks a list of websites for certain content.

Re: timeout in urllib.open()

2007-02-23 Thread John J. Lee
Steve Holden <[EMAIL PROTECTED]> writes: [...] > This has recently been discussed on python-dev. It's likely that > certain libraries will acquire a timeout keyword argument in the next > release, but only if someone is concerned enough to develop the > appropriate patches - the principle appears t

Re: timeout in urllib.open()

2007-02-19 Thread Paul Rubin
Stefan Palme <[EMAIL PROTECTED]> writes: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool which > automatically checks a list of websites for certain content. The > tool "hangs" when one of the contacted websites behaves

Re: timeout in urllib.open()

2007-02-19 Thread Steve Holden
Stefan Palme wrote: [Peter] I believe this can only be set globally: import socket socket.setdefaulttimeout(seconds) >>> [Stefan] >>> ... >>> But when there is a "default timeout" (as indicated by >>> the method name) - isn't there a "per-socket timeout" >>> too? >> [P

Re: timeout in urllib.open()

2007-02-19 Thread Stefan Palme
>>> [Peter] >>> I believe this can only be set globally: >>> >>> import socket >>> socket.setdefaulttimeout(seconds) >>> >> [Stefan] >> ... >> But when there is a "default timeout" (as indicated by >> the method name) - isn't there a "per-socket timeout" >> too? > > [Peter] > Yes, but it isn't as

Re: timeout in urllib.open()

2007-02-19 Thread Peter Otten
Stefan Palme wrote: (top-posting undone) [Peter] >> I believe this can only be set globally: >> >> import socket >> socket.setdefaulttimeout(seconds) [Stefan] > Uuuh this is no solution for me, because the > website-checking tool is part of a very very big > application running in an applicatio

Re: timeout in urllib.open()

2007-02-19 Thread Stefan Palme
Uuuh this is no solution for me, because the website-checking tool is part of a very very big application running in an application server, so globally setting the timeout may break a lot of other things... But when there is a "default timeout" (as indicated by the method name) - isn't there a "

Re: timeout in urllib.open()

2007-02-19 Thread Peter Otten
Stefan Palme wrote: > is there a way to modify the time a call of > > urllib.open(...) > > waits for an answer from the other side? Have a tool > which automatically checks a list of websites for > certain content. The tool "hangs" when one of the > contacted websites behaves badly and "never"

Re: timeout calling local sendmail

2006-08-11 Thread [EMAIL PROTECTED]
That seems applicable to writing an SMTP server/daemon, but is it necessary for a script client calling a local SendMail daemon? Tim Williams wrote: > > > RFC 1123 > > http://www.freesoft.org/CIE/RFC/1123/109.htm > > I find that a timeout of 120 seconds is the bare minimum. If the > timeout is

Re: timeout calling local sendmail

2006-08-09 Thread Tim Williams
On 9 Aug 2006 08:22:03 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > that's > "timeout calling local sendmail" > not > "timeout calling local se" > > > [EMAIL PROTECTED] wrote: > > (Environment: RedHat Linux recent, Python 2.3.5) > > > > We have a batch processing script that on occasion n

Re: timeout calling local sendmail

2006-08-09 Thread [EMAIL PROTECTED]
that's "timeout calling local sendmail" not "timeout calling local se" [EMAIL PROTECTED] wrote: > (Environment: RedHat Linux recent, Python 2.3.5) > > We have a batch processing script that on occasion needs to send out an > email. We have a sendmail running locally. > > Sometimes we get a socke

Re: timeout a process

2006-01-22 Thread iapain
Thanks Tim, Yeah win32api is working normally. -- http://mail.python.org/mailman/listinfo/python-list

Re: timeout a process

2006-01-15 Thread Tim Golden
iapain wrote: > Hello, > I am trying to build and infinite loop handler in python 2.4 on windows > platform. The problem is that i want to create a process and forcely > kill/timeout after 2 sec to handle infinite loop in a gcc complied exe > on cygwin. something like below > > os.system("mycpp.exe

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
I got the signal to work on linux with sys.stdin.readline() but the process timeout after x seconds even when I input something. Is there a way to close the signal after getting a correct input from the console window? Thanks Thierry -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout at command prompt

2006-01-12 Thread Amit Khemka
Another thing that can be tried is: import threading a="" def input(): global a a = raw_input() T = threading.Thread(target=input) T.start() T.join(2) ## does the trick ... I have not tested it but i guess should work. cheers, amit. On 1/12/06, Amit Khemka <[EMAIL PROTECTED]>

Re: Timeout at command prompt

2006-01-12 Thread Paul Rubin
Amit Khemka <[EMAIL PROTECTED]> writes: > import signal > TIMEOUT = 5 # number of seconds your want for timeout > signal.signal(signal.SIGALRM, input) > signal.alarm(TIMEOUT) > > def input(): > try: >foo = raw_input() >return foo > except: > # timeout > return This doesn't work with

Re: Timeout at command prompt

2006-01-12 Thread Amit Khemka
I tried it on "Python 2.4.1" on '2.6.11-1.1369_FC4smp with gcc version 4.0.0' .. which works fine .. may be it could be an issue with some other combinations .. cheers, amit On 12 Jan 2006 07:35:57 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: > Amit Khemka <[EMAIL PROTECTED]> writes:

Re: Timeout at command prompt

2006-01-12 Thread Amit Khemka
its "Python 2.4.1" .. on linux On 12 Jan 2006 06:34:08 -0800, Thierry Lam <[EMAIL PROTECTED]> wrote: > Is there a windows equivalent for that solution? > > -- > http://mail.python.org/mailman/listinfo/python-list > -- Endless the world's turn, endless the sun's spinning Endless the quest; I

RE: Timeout at command prompt

2006-01-12 Thread Tim Golden
[Thierry Lam] [to do with a Win32 equivalent to the SIGALRM interruption of a raw_input] | Is there a windows equivalent for that solution? Nothing so straightforward. Depends how hard you want to try. A couple of past threads on pretty much the exact same issue offer no equivalent solution.

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
Is there a windows equivalent for that solution? -- http://mail.python.org/mailman/listinfo/python-list

Re: Timeout at command prompt

2006-01-12 Thread Thierry Lam
Which Python version are you using? I'm getting the following error with Python 2.3.4: Traceback (most recent call last): File "C:\home\pciroot\vcur\sdk\tools\inter.py", line 32, in ? signal.signal(signal.SIGALRM, input) AttributeError: 'module' object has no attribute 'SIGALRM' Thierry -

Re: Timeout at command prompt

2006-01-11 Thread Amit Khemka
One way would be to use 'signal' s ... something like this should work import signal TIMEOUT = 5 # number of seconds your want for timeout signal.signal(signal.SIGALRM, input) signal.alarm(TIMEOUT) def input(): try: foo = raw_input() return foo except: # timeout return cheers, amit.

Re: Timeout for regular expression

2005-11-23 Thread Terry Hancock
On Tue, 22 Nov 2005 18:49:15 +0100 "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > not directly. the only reliable way is to run it in a > separate process, and use the resource module to set > necessary limits. Wow. Thank you Mr. Lundh, I never noticed that module. I think I have an application for

Re: Timeout for regular expression

2005-11-22 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote > Is there a way to set a timeout interval when executing with a > re.search ? Sometimes (reason being maybe a "bad" pattern), > the search takes forever and beyond... not directly. the only reliable way is to run it in a separate process, and use the resource module to