473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

POP connection timeout.

Hi All

I have written an application that queries a POP mailbox and
downloads messages. When the application tries to connect to the mail
server, but takes too long (eg. longer than 60 seconds) I want to have
it time out.

Something like

try:
pop = poplib.POP3(POPHOST, POPPORT)
except someerror, err:
print "Connecting to mail box has timed out:\n", err

I know that in python 2.5 I could pass an additional timeout parameter
to the above statement ( ie: pop = poplib.POP3(POPHOST, POPPORT,
TIMEOUTINSECONDS), but I am using python 2.4.

Can anyone help me implement this timeout functionality.

Regards

Nicol
--

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle.

--

The three things to remember about Llamas:
1) They are harmless
2) They are deadly
3) They are made of lava, and thus nice to cuddle.
Jun 27 '08 #1
1 1547
Aspersieman wrote:
I have written an application that queries a POP mailbox and ...
I want to have it time out....
I know that in python 2.5 I could pass an additional timeout parameter
to the above statement ( ie: pop = poplib.POP3(POPHOST, POPPORT,
TIMEOUTINSECONDS), but I am using python 2.4.

Can anyone help me implement this timeout functionality.
Obviously, get a copy of 2.5 and back-port the poplib code as
poplib25 or some such. If you want more help than that, hire
someone to do it.

--Scott David Daniels

Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dicky Cheng | last post by:
Hi, I am using .net remoting technology. I set up a .net remoting client and server in IIS. When the client calls the server, the server will run a long duration method (30-60seconds). I have a...
0
by: Christopher H. Laco | last post by:
I'm in a strange situation. I have a dataset that uses it own connection string from MySettings. All is well. This thing works in .NET just dandy. If I reference this dataset from another...
3
by: Martin B | last post by:
Hallo! I'm working with C# .NET 2.0, implementing Client/Server Applications which are connecting via Network to SQL-Server or Oracle Databases. To stay independent from the underlaying Database...
6
by: michael sorens | last post by:
I have used the visual designer to create a series of DataGridViews populated from SQLServer data. A typical call is: myCountsTableAdapter.Fill(myDataSet.myCounts); My application actually...
7
by: =?Utf-8?B?Sm9obiBTdGFnZ3M=?= | last post by:
Hello, Please read this all before giving an answer :) I'm doing some troubleshooting on a web application that my company wrote. It's written in asp.net 1.1. The error that the Event viewer...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.