Re: ping script

2022-02-27 Thread 황병희
Dear Barry, Barry Scott writes: >> [...] > This is correct python3.org is only setup for email. > Use the host and dig commands to check for yourself. It is very amazing! Thanks for explanation! > Compare > > $ host python.org > > with > > $ host pyth

Re: ping script

2022-02-27 Thread Barry Scott
> On 27 Feb 2022, at 13:53, Byung-Hee HWANG wrote: > > simple ping check script with python3 (Python 3.9.2) > tested under Debian 11 Bullseye: > > soyeomul@penguin:~/gitlab/test$ ./fping.py localhost > ok > soyeomul@penguin:~/gitlab/test$ ./fping.py python.org

ping script

2022-02-27 Thread Byung-Hee HWANG
simple ping check script with python3 (Python 3.9.2) tested under Debian 11 Bullseye: soyeomul@penguin:~/gitlab/test$ ./fping.py localhost ok soyeomul@penguin:~/gitlab/test$ ./fping.py python.org ok soyeomul@penguin:~/gitlab/test$ ./fping.py python3.org python3.org: No address associated with

Re: Response for PING in ircbot.

2021-02-09 Thread flaskee via Python-list
‐‐‐ Original Message ‐‐‐ On Saturday, January 30, 2021 11:50 AM, Bischoop wrote: > Got problem with responding for Ping, > tried so many ways to response > and always end up with time out or other error. > This time: > Is it possible to share your final Ping answe

Re: Response for PING in ircbot.

2021-02-07 Thread flaskee via Python-list
‐‐‐ Original Message ‐‐‐ On Saturday, January 30, 2021 11:50 AM, Bischoop wrote: > Got problem with responding for Ping, tried so many ways to response > and always end up with time out or other error. This time: > Is it possible to share your final Ping answer? I've h

Re: Response for PING in ircbot.

2021-02-03 Thread dn via Python-list
On 04/02/2021 07.07, Dennis Lee Bieber wrote: > On Tue, 02 Feb 2021 20:26:34 -0500, Random832 > declaimed the following: > > >> 1. It looks like you're forgetting to send \n\r > > Isn't the convention \r\n -- from the days of teletype, when the return > took longer to complete than the

Re: Response for PING in ircbot.

2021-02-02 Thread Random832
On Sat, Jan 30, 2021, at 11:50, Bischoop wrote: > > Got problem with responding for Ping, tried so many ways to response > and always end up with time out or other error. This time: 1. It looks like you're forgetting to send \n\r 2. i'm not sure if the server ping is

Re: Response for PING in ircbot.

2021-01-30 Thread Cameron Simpson
On 30Jan2021 16:50, Bischoop wrote: >Got problem with responding for Ping, tried so many ways to response >and always end up with time out or other error. This time: > >ERROR :(Ping timeout: 264 seconds) >Traceback (most recent call last): >s.send(bytes('PONG 

Response for PING in ircbot.

2021-01-30 Thread Bischoop
Got problem with responding for Ping, tried so many ways to response and always end up with time out or other error. This time: ERROR :(Ping timeout: 264 seconds) Traceback (most recent call last): s.send(bytes('PONG ' + data.split()[1], 'UTF-8')) BrokenPipeError: [E

Re: Python,ping,csv

2016-04-11 Thread Jason Friedman
t; a = str(address) > res = subprocess.call(['ping', '-c', '3', address]) > """Typical output from ping: $ ping -c 3 10.2.2.2 PING 10.2.2.2 (10.2.2.2) 56(84) bytes of data. --- 10.2.2.2 ping statistics --- 3 packets transmitted, 0 recei

Re: Python,ping,csv

2016-04-11 Thread Jason Friedman
; a = str(address) > res = subprocess.call(['ping', '-c', '3', address]) """Typical output from ping: $ ping -c 3 10.2.2.2 PING 10.2.2.2 (10.2.2.2) 56(84) bytes of data. --- 10.2.2.2 ping statistics --- 3 packets transmitted, 0 recei

Re: Python,ping,csv

2016-04-11 Thread Smith
Il 10/04/2016 05:29, Jason Friedman ha scritto: for ping in range(1,254): address = "10.24.59." + str(ping) res = subprocess.call(['ping', '-c', '3', address]) if res == 0: print ("ping to", address, "OK")

Re: Python,ping,csv

2016-04-11 Thread Smith
Il 10/04/2016 05:29, Jason Friedman ha scritto: for ping in range(1,254): address = "10.24.59." + str(ping) res = subprocess.call(['ping', '-c', '3', address]) if res == 0: print ("ping to", address, "OK")

Re: Python,ping,csv

2016-04-09 Thread Jason Friedman
> for ping in range(1,254): > address = "10.24.59." + str(ping) > res = subprocess.call(['ping', '-c', '3', address]) > if res == 0: > print ("ping to", address, "OK") > elif res == 2: >

Re: Python,ping,csv

2016-04-08 Thread Joel Goldstick
rry for unclear English > Thanks in advance > > > import subprocess > > for ping in range(1,254): > address = "10.24.59." + str(ping) > res = subprocess.call(['ping', '-c', '3', address]) > if res == 0: > pri

Python,ping,csv

2016-04-08 Thread Smith
Hello to all, I have this little script that pings certain ip addresses. Considering that I am a newbie to the Python programming language, can you help me change these lines in order to put the output into a csv file? Sorry for unclear English Thanks in advance import subprocess for ping in

ping in bluetooth

2012-11-02 Thread Luca Sanna
hi, how do I send a ping in bluetooth? because android phones are not always visible. I can not find the ping command thanks -- http://mail.python.org/mailman/listinfo/python-list

cross platform ping module

2009-04-07 Thread Eugene Yunak
Hi all! I'm interested in developing a cross platform module that will allow a simple 'ping' functionality, i mean sending icmp type 8 code 0 and receiving appropriate answers. This sound like a simple work, but i ask for your help with architectural decision. I can implement icmp

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-18 Thread bieffe62
      t.join(JOIN_TIMEOUT); > >         if not t.isAlive(): > >             print t.result > > Thanks for your great sample. And, thank you for your tips on speedup the > ping stuff. > > However, i still have problem when adding timeout to join(). > - It works, but only

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread Mamahita Sela
rint t.result > Thanks for your great sample. And, thank you for your tips on speedup the ping stuff. However, i still have problem when adding timeout to join(). - It works, but only print out thread result that is not alive, as we put in the code. So, i never get result from unsuccessf

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread bieffe62
On 16 Feb, 14:47, Mamahita Sela wrote: > Dear All, > > I have read several howtos for threading in PyGTK. I have tried some but with > no luck. > > What i want is: i can keep typing in gtk.TextView while periodically doing > ping some hosts. > > I think, the thread

Re: Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread Jean-Paul Calderone
On Mon, 16 Feb 2009 05:47:22 -0800 (PST), Mamahita Sela wrote: Dear All, I have read several howtos for threading in PyGTK. I have tried some but with no luck. What i want is: i can keep typing in gtk.TextView while periodically doing ping some hosts. You don't need threads for

Threads in PyGTK: keep typing while ping-ing

2009-02-16 Thread Mamahita Sela
Dear All, I have read several howtos for threading in PyGTK. I have tried some but with no luck. What i want is: i can keep typing in gtk.TextView while periodically doing ping some hosts. I think, the thread part is working since i can ping so fast (even for not reply host, around 3 s for

Looking for traffic generating utility (like ping)

2008-11-14 Thread [EMAIL PROTECTED]
Hello, I am looking for a utility that will generate any number of pings per second, and allow me to check how many of the pings in the last X seconds have been dropped, while it is still running. The reason I can't use the built-in Unix ping is that 1) it does not provide overall feedback

Re: Ping monitor - monitor ip in the background?

2008-11-02 Thread Andrey Balaguta
On Nov 2, 12:47 pm, "ScottZ" <[EMAIL PROTECTED]> wrote: > Andrey - Thank you very much for the example. > Is something missing after the def start(self): or should def run(): not > be there? No, Scott, this is one of the neatest features of Python -- "run" is a nested function. It is visible and u

RE: Ping monitor - monitor ip in the background?

2008-11-02 Thread ScottZ
change that comment to "for my *nix environment" to be more precise in the future. It was posted as an example of what I'm doing rather than a global ping solution for all. I deploy an alternative set of common tools (ping being one of them) amongst our various platforms so the optio

Re: Ping monitor - monitor ip in the background?

2008-11-02 Thread Jorgen Grahn
On Sat, 01 Nov 2008 20:26:43 -0700, ScottZ <[EMAIL PROTECTED]> wrote: ... > if os.name == "nt": # Windows > pcmd = "ping -n 1 -w 1000 " > else: # *nix > pcmd = "ping -c1 -W1 " Not really correct. Unfortunately there are man

Re: Ping monitor - monitor ip in the background?

2008-11-02 Thread Andrey Balaguta
do(self): if os.name == "nt": # Windows pcmd = "ping -n 1 -w 1000 " else:# *nix pcmd = "ping -c1 -W1 " p = subprocess.Popen(pcmd + self.ip, shell=True, stdout=subprocess.PIPE) # give it time to respond p.wait(

Ping monitor - monitor ip in the background?

2008-11-01 Thread ScottZ
ne or not. The ping portion looks like this: if os.name == "nt": # Windows pcmd = "ping -n 1 -w 1000 " else: # *nix pcmd = "ping -c1 -W1 " def Ping(ipaddress): # execute the code and pipe the result to a string p = subprocess.Popen(p

Re: ka-ping yee tokenizer.py

2008-09-17 Thread Karl Kobata
ython-list> > > [mailto:python-list-bounces+kkobata=syncira at python.org <http://mail.python.org/mailman/listinfo/python-list> ] On Behalf Of > Fredrik Lundh > Sent: Monday, September 15, 2008 2:04 PM > To: python-l... at python.org <http://mail.python.org/mailman/li

Re: ka-ping yee tokenizer.py

2008-09-16 Thread Aaron "Castironpi" Brady
> From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > Fredrik Lundh > Sent: Monday, September 15, 2008 2:04 PM > To: [EMAIL PROTECTED] > Subject: Re: ka-ping yee tokenizer.py > > Karl Kobata wrote: > > > I have enjoyed using ka-ping yee's t

RE: ka-ping yee tokenizer.py

2008-09-16 Thread Karl Kobata
( modifyLine( myFileHandle ) ): Print token Anxiously looking forward to your thoughts. karl -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fredrik Lundh Sent: Monday, September 15, 2008 2:04 PM To: python-list@python.org Subject: Re: ka-ping yee

Re: program to Ping ip addresses

2008-04-18 Thread Nick Stinemates
On Tue, Apr 15, 2008 at 07:24:05AM -0700, shawn s wrote: > Hi > > I am trying to modify a small program i found off the internet as follows... > I can get the 'tracert' to work and it gives me all the info back. However, > when i replace the tracert with 'pi

program to Ping ip addresses

2008-04-15 Thread shawn s
Hi I am trying to modify a small program i found off the internet as follows... I can get the 'tracert' to work and it gives me all the info back. However, when i replace the tracert with 'ping', the commamd prompt shows 'testing' and the script freezes... any

Re: Ping and ARP on both Win and Linux in Python

2008-03-14 Thread Rune Strand
know only the range of their IP addresses (the host name it's simply > to know using socket.gethostn. > > The first idea it's to ping all ip, parse the response and then execute > the command "arp -a" and parse the response. > However this way depends on the operati

Ping and ARP on both Win and Linux in Python

2008-03-13 Thread Mauro "Baba" Mascia
it's to ping all ip, parse the response and then execute the command "arp -a" and parse the response. However this way depends on the operating system and the ping response depends too from the language. Another way it's to open the main page of the switch and parse the HT

Re: How to broad cast ping address.......

2008-02-12 Thread Gabriel Genellina
nd out all the >>> device >>> connected in the network. Just I planned to broad cast the ping address >> >> The simplest approach is to enumerate and ping each and every address in >> your subnet and wait for the response, but consider that some hosts may >

Re: How to broad cast ping address.......

2008-02-11 Thread Steve Holden
Gabriel Genellina wrote: > En Mon, 11 Feb 2008 13:31:56 -0200, Manikandan R <[EMAIL PROTECTED]> > escribi�: > >> I am working in Python scripting. I an need to find out all the >> device >> connected in the network. Just I planned to broad cast the pin

Re: How to broad cast ping address.......

2008-02-11 Thread Gabriel Genellina
En Mon, 11 Feb 2008 13:31:56 -0200, Manikandan R <[EMAIL PROTECTED]> escribi�: > I am working in Python scripting. I an need to find out all the > device > connected in the network. Just I planned to broad cast the ping address > and > use the ARP table to get

How to broad cast ping address.......

2008-02-11 Thread Manikandan R
Hai, I am working in Python scripting. I an need to find out all the device connected in the network. Just I planned to broad cast the ping address and use the ARP table to get the IP address of the system in the network. As, I am working in Win XP i am not able to use ping -b command to broad

Re: "ping" not reconnecting in Python MySQLdb client interface

2008-02-03 Thread John Nagle
but it doesn't. ... > I suspect that MySQL has auto-reconnect turned off, but doesn't document > this. That seems to be the case. MySQLdb.connect turns off auto-reconnect, and doesn't document "ping". I'm currently trying this:

"ping" not reconnecting in Python MySQLdb client interface

2008-02-03 Thread John Nagle
I have some long-running Python programs that can be idle for hours, and, of course, the MySQL connection times out. So I call db.ping() at the beginning of a new request cycle. This should reestablish the connection, but it doesn't: Traceback (most recent call last): File "ra

Re: Ping Implementation in Python

2007-12-22 Thread Mrown
Roger Miller wrote: > On Dec 20, 5:41 am, Mrown <[EMAIL PROTECTED]> wrote: > > Hi, > > I was wondering if there was a ping implementation written in > > Python. > > http://www.gnist.org/~lars/code/ping/ping.html Thanks for your replies. I'll probably star

Re: Ping Implementation in Python

2007-12-20 Thread Roger Miller
On Dec 20, 5:41 am, Mrown <[EMAIL PROTECTED]> wrote: > Hi, > I was wondering if there was a ping implementation written in > Python. http://www.gnist.org/~lars/code/ping/ping.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Ping Implementation in Python

2007-12-20 Thread Lorenzo Mainardi
Nel mezzo del cammin di nostra vita, mi ritrovai con Mrown che diceva: > Hi, > I was wondering if there was a ping implementation written in > Python. I'd rather using a Python module that implements ping in a > platform/OS-independent way than rely on the underlying OS, espe

Re: Ping Implementation in Python

2007-12-20 Thread Mrown
On Dec 20, 6:13 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On Dec 20, 2007 9:41 AM, Mrown <[EMAIL PROTECTED]> wrote: > > > Hi, > > I was wondering if there was a ping implementation written in > > Python. I'd rather using a Pyth

Re: Ping Implementation in Python

2007-12-20 Thread Chris Mellon
On Dec 20, 2007 9:41 AM, Mrown <[EMAIL PROTECTED]> wrote: > Hi, > I was wondering if there was a ping implementation written in > Python. I'd rather using a Python module that implements ping in a > platform/OS-independent way than rely on the underlying OS, especia

Ping Implementation in Python

2007-12-20 Thread Mrown
Hi, I was wondering if there was a ping implementation written in Python. I'd rather using a Python module that implements ping in a platform/OS-independent way than rely on the underlying OS, especially as every OS has a different implementation. Furthermore, if you're going to pi

Re: Beginner Ping program

2007-04-30 Thread Duncan Booth
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > There is no (that I am aware of) ICMP module in the standard library. > See http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409689 for > an example of a Python implementation of ping. Google also finds another

Re: Beginner Ping program

2007-04-29 Thread Gabriel Genellina
En Sun, 29 Apr 2007 08:26:36 -0300, Bjoern Schliessmann <[EMAIL PROTECTED]> escribió: > Linus Cohen wrote: >> It will be called inettools, and the ping function is >> what I'm working on first. It should be a simple enough job to >> code in the features the Unix

Re: Beginner Ping program

2007-04-29 Thread Bjoern Schliessmann
Linus Cohen wrote: > Actually the class ping bit is a placeholder. But why is it one? "ping" is something you do -- and not a "thing" of which you could have several copies. > I'm actually developing a module with python implementations of > most standard net

Re: Beginner Ping program

2007-04-28 Thread [EMAIL PROTECTED]
On Apr 27, 10:54 pm, Linus Cohen <[EMAIL PROTECTED]> wrote: > Hi all, > I'm a newbie to python and programming in general, so I wanted a > simple project to start off. What I'm trying to do here is write a > python command-line ping program, much like the Unix and Windo

Re: Beginner Ping program

2007-04-28 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Linus Cohen wrote: > Actually the class ping bit is a placeholder. I'm actually developing > a module with python implementations of most standard network/internet > tools such as telnet, tracert, whois etc. It will be called inettools, > and the pi

Re: Beginner Ping program

2007-04-28 Thread Linus Cohen
Actually the class ping bit is a placeholder. I'm actually developing a module with python implementations of most standard network/internet tools such as telnet, tracert, whois etc. It will be called inettools, and the ping function is what I'm working on first. It should be a simple

Re: Beginner Ping program

2007-04-27 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Linus Cohen wrote: > I'm a newbie to python and programming in general, so I wanted a > simple project to start off. What I'm trying to do here is write a > python command-line ping program, much like the Unix and Windows ping > programs. I

Beginner Ping program

2007-04-27 Thread Linus Cohen
Hi all, I'm a newbie to python and programming in general, so I wanted a simple project to start off. What I'm trying to do here is write a python command-line ping program, much like the Unix and Windows ping programs. I've got this much worked out already: class ping def

Re: Parallel ping problems python puzzler

2007-04-02 Thread Matimus
I wouldn't use threads for system calls. Checkout the subprocess module instead. You can run multiple pipes at the same time (subprocess.Popen). The python documentation for subprocess is pretty good. There are a few examples. Actually, you don't even _need_ the subprocess module, you can use os.po

Re: Parallel ping problems python puzzler

2007-04-02 Thread amaccormack
On 2 Apr, 15:03, "Miki" <[EMAIL PROTECTED]> wrote: > Hello, > > >def run(self): > > # -w 1 option topingmakes ittimeoutafter 1 second > > pingcmd="/bin/ping-c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip > > Not sure, but "ip

Re: Parallel ping problems python puzzler

2007-04-02 Thread Miki
Hello, >def run(self): > # -w 1 option to ping makes it timeout after 1 second > pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip Not sure, but "ip" should be "self.ip", this might cause the problem. HTH, -- Miki <[EMA

Parallel ping problems python puzzler

2007-04-02 Thread amaccormack
# -w 1 option to ping makes it timeout after 1 second pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip self.status = os.system(pingcmd) def serping(ip): pingcmd="/bin/ping -c 2 -q -i 0.3 -w 1 %s >/dev/null" % ip os.syste

Re: How to ping and shutdown a remote computer?

2007-02-14 Thread joja15
On Feb 14, 10:09 am, Christophe <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] a écrit : > > > > > I am working on a Python script to perform as a remote computer > > manager. So far I have a WOL function working and I would like to add > > the ability to show if a machine is on or off (I figured I

Re: How to ping and shutdown a remote computer?

2007-02-14 Thread Tim Golden
or otherwise) which simply shut my machine down. Is this possible? Second, machines -- or networks -- may be configured to reject or swallow pings so the lack of a ping may not indicate vitality. Since you specify that the machine has a folder share, that means it's running SMB/NMB/whatever i

Re: How to ping and shutdown a remote computer?

2007-02-14 Thread Christophe
[EMAIL PROTECTED] a écrit : > I am working on a Python script to perform as a remote computer > manager. So far I have a WOL function working and I would like to add > the ability to show if a machine is on or off (I figured I would do so > by pinging the machine and seeing if I get a response). I

How to ping and shutdown a remote computer?

2007-02-14 Thread joja15
I am working on a Python script to perform as a remote computer manager. So far I have a WOL function working and I would like to add the ability to show if a machine is on or off (I figured I would do so by pinging the machine and seeing if I get a response). I would also like to add the ability t

Re: PIL: match for ImageMagick's display -ping

2006-11-09 Thread Mohammad Tayseer
>>> import Image>>> im = Image.open('myimage.jpg')>>> im.size(200, 100)PIL reads the header only in the Image.open() call above. Sponsored Link Mortgage rates near 39yr lows. $420,000 Mortgage for $1,399/mo - Calculate new house payment-- http://mail.python.org/mailman/listinfo/python-list

Re: PIL: match for ImageMagick's display -ping

2006-11-07 Thread Steve Holden
Torsten Bronger wrote: > Hallöchen! > > I have to extract the dimensions of many bitmap files. An old Bash > script did it with ImageMagick's "display -ping ...". "-ping" means > that it extracts the image dimensions efficiently. I suspect it > sim

PIL: match for ImageMagick's display -ping

2006-11-07 Thread Torsten Bronger
Hallöchen! I have to extract the dimensions of many bitmap files. An old Bash script did it with ImageMagick's "display -ping ...". "-ping" means that it extracts the image dimensions efficiently. I suspect it simply doesn't read the image itself. Now the Bash sc

PIL: match for ImageMagick's display -ping

2006-11-07 Thread Torsten Bronger
Hallöchen! I have to extract the dimensions of many bitmap files. An old Bash script did it with ImageMagick's "display -ping ...". "-ping" means that it extracts the image dimensions efficiently. I suspect it simply doesn't read the image itself. Now the Bash sc

Re: ping

2006-04-14 Thread Luis Armendariz
C4650> > http://www.espn.com/> > ', mode 'r' at 0x009C4650> > http://www.redsox.com/> > ', mode 'r' at 0x009C4650> > > instead of giving me the ping stats "pinging etc etc, packets sent 4 > recienved 4 etc) > > Any idea aro

RE: ping

2006-04-14 Thread brandon.mcginty
Title: Message Try this: import os pinginfo=os.popen("ping www.google.com") #opens file object with output of the ping to google print pinginfo.read(-1) #reads the ping information from the abuv file object pinginfo.close() #closes the pinginfo object, as you would do for a sta

Re: ping

2006-04-14 Thread David Reed
#x27; at 0x009C4650> > ', mode 'r' at 0x009C4650> > > instead of giving me the ping stats "pinging etc etc, packets sent > 4 recienved 4 etc) > > Any idea around this? os.popen gives you a file-like object that you can then read. >>> im

re: ping

2006-04-14 Thread david brochu jr
Thanks,   Unfortunately substituting os.system with os.popen results in the output being: www.google.com', mode 'r' at 0x009C4650> www.boston.com', mode 'r' at 0x009C4650> www.espn.com', mode 'r' at 0x009C4650> www.redsox.com', mode '

Re: ping

2006-04-14 Thread David Reed
On Apr 14, 2006, at 6:30 PM, david brochu jr wrote: > I am trying to ping websites and output the results to a txt file: > > import os > > file = open("c:\python24\scripts\ip.txt") > redirect = open("c:\python24\scripts\log.txt","a") > > for

ping

2006-04-14 Thread david brochu jr
I am trying to ping websites and output the results to a txt file:   import os file = open("c:\python24\scripts\ip.txt")redirect = open("c:\python24\scripts\log.txt","a") for x in file: ping = "ping " + x print >> redirect, os.system(ping)  but the

Re: How to ping in Python?

2005-12-08 Thread Chris Miles
You could also try the ping module that the Eddie monitoring tool has been using successfully, cross-platform, for many years. http://dev.eddie-tool.net/trac/browser/eddie/trunk/lib/common/Directives/pinger.py Cheers, Chris Nico Grubert wrote: > I could not find any "ping" Class

Re: How to ping in Python?

2005-12-07 Thread [EMAIL PROTECTED]
There is also always searching the Python Cookbook (http://pythoncookbook.activestate.com/) for something like this. There is already an ICMP library there (written by me and a friend) that includes a ping function that uses the library. -Brett -- http://mail.python.org/mailman/listinfo/python

Re: How to ping in Python?

2005-12-07 Thread Sybren Stuvel
Nico Grubert enlightened us with: > I just need to "ping" a machine to see if its answering. What's the > best way to do it? To do a real ICMP ping, you need raw sockets, which are turned off on Windows and reserved for root on other systems. You could try to connect to an

Re: How to ping in Python?

2005-12-07 Thread Michael Schneider
Les, I only ping internal machines. You are right about shutting down ports. When we disable telent, we also disable ping. Many people may not though, good luck, Mike Laszlo Zsolt Nagy wrote: > Michael Schneider wrote: > >> I telnet to port 13 (returns time) >> > The

Re: How to ping in Python?

2005-12-07 Thread Laszlo Zsolt Nagy
Michael Schneider wrote: >I telnet to port 13 (returns time) > The problem is that most modern up-to-date servers use firewalls. They only open the ports that are absolutely necessary. Usually the time service is part of inetd, which is disabled by default, on most of the servers. PIN

Re: How to ping in Python?

2005-12-07 Thread Michael Schneider
I telnet to port 13 (returns time) Hope this is helpful, Mike Nico Grubert wrote: > Hi there, > > I could not find any "ping" Class or Handler in python (2.3.5) to ping a > machine. > I just need to "ping" a machine to see if its answering. What's the

Re: How to ping in Python?

2005-12-05 Thread Larry Bates
ons(myChecksum) & 0x else: myChecksum = socket.htons(myChecksum) You also must import the following modules: import socket import os import sys import struct import time import select -Larry Bates dwelch wrote: > Nico Grubert wrote: > >> Hi there, >> >

Re: How to ping in Python?

2005-12-05 Thread dwelch
Nico Grubert wrote: > Hi there, > > I could not find any "ping" Class or Handler in python (2.3.5) to ping a > machine. > I just need to "ping" a machine to see if its answering. What's the best > way to do it? > > Kind regards, > Nico

Re: How to ping in Python?

2005-12-05 Thread dudeman
Try the PyNMS libraries: http://freshmeat.net/projects/pynms/ It has a ping module. If all you need is the ping module, maybe you could just look through that code and see if it's relatively simple to impliment yourself. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to ping in Python?

2005-12-05 Thread Peter Hansen
Nico Grubert wrote: > I could not find any "ping" Class or Handler in python (2.3.5) to ping a > machine. > I just need to "ping" a machine to see if its answering. What's the best > way to do it? Either use something like os.system() to call the ping

How to ping in Python?

2005-12-05 Thread Nico Grubert
Hi there, I could not find any "ping" Class or Handler in python (2.3.5) to ping a machine. I just need to "ping" a machine to see if its answering. What's the best way to do it? Kind regards, Nico -- http://mail.python.org/mailman/listinfo/python-list

Re: network ping

2005-05-29 Thread garabik-news-2005-05
Sam the Cat <[EMAIL PROTECTED]> wrote: > Besides calling the external ping utility -- is there a way native to python > to execute a similar utility ? > > yes http://www.python.org/~jeremy/python.html -- --- | Ra

network ping

2005-05-29 Thread Sam the Cat
Besides calling the external ping utility -- is there a way native to python to execute a similar utility ? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a ping client

2005-02-24 Thread Nick Vargish
"Harlin Seritt" <[EMAIL PROTECTED]> writes: > ? #!/bin/sh ping $1 Enjoy, Nick -- # sigmask || 0.2 || 20030107 || public domain || feed this to a python print reduce(lambda x,y:x+chr(ord(y)-1),' Ojdl!Wbshjti!=obwAcboefstobudi/psh?') -- http://mail.pytho

Re: How to write a ping client

2005-02-23 Thread Harlin Seritt
? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a ping client

2005-02-22 Thread Martin Bless
On 21 Feb 2005 18:35:06 -0800, "Harlin" <[EMAIL PROTECTED]> wrote: >Is there a way to write a ping client? I would like to be able to write >a small ping client so that I dont have to do os.system('ping args') I once followed the same line and used a py modul

Re: How to write a ping client

2005-02-22 Thread Peter Hansen
Harlin wrote: whoa... this is not in the standard library, is it? I never knew this was out there. Thanks! You mean, Google? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a ping client

2005-02-22 Thread Harlin
whoa... this is not in the standard library, is it? I never knew this was out there. Thanks! Please use your powers for good (the one about halting production on teenage sex comedies :) -- http://mail.python.org/mailman/listinfo/python-list

Re: How to write a ping client

2005-02-21 Thread Grant Edwards
On 2005-02-22, Harlin <[EMAIL PROTECTED]> wrote: > Is there a way to write a ping client? [...] http://www.google.com/search?q=python+icmp+ping -- Grant Edwards grante Yow! I have the power at to HALT PROD

How to write a ping client

2005-02-21 Thread Harlin
Is there a way to write a ping client? I would like to be able to write a small ping client so that I dont have to do os.system('ping args') and thereby keep the resource overhead low. Does anyone know how this can be done or can point me in the right direction? thanks, Harlin