473,800 Members | 3,070 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

telnetlib thread-safe?

Can anyone tell me if the telnetlib module is thread-safe? I've done
some looking, but don't know, and I don't know how to tell from reading
the module code.

Aug 24 '06 #1
5 2859
Jerry wrote:
Can anyone tell me if the telnetlib module is thread-safe?
define thread-safe. how do you plan to use it?

</F>

Aug 24 '06 #2
Fredrik Lundh wrote:
define thread-safe. how do you plan to use it?
I would like to write a program that spawns ~10 threads. Each thread
would get a host to connect to from a Queue object and run then do it's
thing (i.e. connecting to the host, running some commands, returning
back a success or fail based on the results).

I just want to make sure that telnetlib is safe for this.

--
Jerry

Aug 24 '06 #3
Jerry schrieb:
Fredrik Lundh wrote:
>define thread-safe. how do you plan to use it?

I would like to write a program that spawns ~10 threads. Each thread
would get a host to connect to from a Queue object and run then do it's
thing (i.e. connecting to the host, running some commands, returning
back a success or fail based on the results).

I just want to make sure that telnetlib is safe for this.
Usually, OO-style libs that don't share state between objects are pretty
safe - and I'd presume that this holds for telnetlib, too.

There is of course no way except looking into the source to _know_ that
for sure. So - try it out.

Diez
Aug 24 '06 #4
Jerry wrote:
>define thread-safe. how do you plan to use it?

I would like to write a program that spawns ~10 threads. Each thread
would get a host to connect to from a Queue object and run then do it's
thing (i.e. connecting to the host, running some commands, returning
back a success or fail based on the results).

I just want to make sure that telnetlib is safe for this.
as long as each thread uses it's own Telnet instance, that should be no
problem at all (as far as I can tell).

</F>

Aug 24 '06 #5
Great, thanks for the info.

Aug 25 '06 #6

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

Similar topics

3
6462
by: Mike Monaghan | last post by:
I'm rather new to python but a long time programmer. I think I've covered my bases so I hope this isn't somthing obvious. I'm running ActiveState PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54) on win32. I have several processes that are polling a telnet server on a regular basis. I'm using telnetlib for this. When I issue the .close method the connection is not closed (no TCP FIN is sent to the server).
3
4987
by: Svha | last post by:
Greetings I'd like to do some tweaks on a telnet session as I have no control over the server side what so ever. However I cannot correctly negotiate a telnet connection to the server. I've gone back to basics on the code for simplicity here; Linux 2.6 : Python 2.3.4
3
12485
by: Wojciech Halicki-Piszko | last post by:
How to know if connection is active after telnetlib.Telnet.open(host,port)?
4
10529
by: vercingetorix52 | last post by:
I'm trying to use a python script to access an embedded computer running linux and connected via a crossover ethernet cable using the following script... ....and I realize the username and password is not realistic... I'm still in "proof of concept" stage here :) ######################### import telnetlib
3
3253
by: Phoe6 | last post by:
Hi All, I am trying to use the telnetlib module. Manually when I do telnet 172.31.128.244 I get: Login: (I type root) Password: ( I type Password) And it enters to the Telnet Session:
0
9694
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10509
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10256
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7584
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5612
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4152
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3765
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2953
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.