Re: ftplib timeout in Python 2.4

Discussion in 'Python' started by Nico Grubert, Dec 17, 2009.

  1. Nico Grubert

    Nico Grubert Guest

    > I don't know of one so you may need a workaround. What platforms do you
    > need to support?


    Suse Linux Enterprise 10, 64 Bit with Python 2.4.4.
    I need the Python 2.4.4 for a running application Server (Zope).
    Nico Grubert, Dec 17, 2009
    #1
    1. Advertising

  2. Nico Grubert

    r0g Guest

    Nico Grubert wrote:
    >> I don't know of one so you may need a workaround. What platforms do you
    >> need to support?

    >
    > Suse Linux Enterprise 10, 64 Bit with Python 2.4.4.
    > I need the Python 2.4.4 for a running application Server (Zope).




    OK, then one approach would be to use signals.alarm(timeout) to raise
    SIGALRM and break out of your FTP function. Have a look at the example
    at the very bottom of...

    http://docs.python.org/library/signal.html

    Roger.
    r0g, Dec 17, 2009
    #2
    1. Advertising

  3. Nico Grubert

    Nico Grubert Guest

    > Try the timelimited function from this recipe
    >
    > <http://code.activestate.com/recipes/576780/>



    Works perfect! Thanks a lot, Jean!
    Nico Grubert, Dec 18, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerrit Holl
    Replies:
    0
    Views:
    880
    Gerrit Holl
    Dec 29, 2003
  2. Brendan
    Replies:
    4
    Views:
    1,976
    Giampaolo Rodola'
    Dec 30, 2009
  3. Jennifer

    ftplib retrlines timeout

    Jennifer, Dec 15, 2009, in forum: Python
    Replies:
    2
    Views:
    495
    Jennifer
    Dec 16, 2009
  4. Nico Grubert

    ftplib timeout in Python 2.4

    Nico Grubert, Dec 17, 2009, in forum: Python
    Replies:
    1
    Views:
    414
  5. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,250
    Brian Candler
    Oct 6, 2004
Loading...

Share This Page