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 > ok > soyeomul@penguin:~/gitlab

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
ns in this case isn't an issue for me. A built in ping method would be better was being looked into but wanted to get this part finished first. Thanks Original Message ---- Subject: Re: Ping monitor - monitor ip in the background? From: Jorgen Grahn <[EMAIL PROTECTED]> Da

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 many variants of ping for Unix, and they don't take th

Re: Ping monitor - monitor ip in the background?

2008-11-02 Thread Andrey Balaguta
Hi, ScottZ. I I have to write such a thing, I'll wrap the whole thing into some class, say Pinger. It will have "do" method, which will perform one particular pinging action. It'll also have a start/stop mechanism, which will start a thread to continuously pinging a host. To notify environment (sa

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

2008-03-14 Thread Rune Strand
On Mar 13, 9:14 pm, "Mauro \"Baba\" Mascia" <[EMAIL PROTECTED]> wrote: > Hi, this is my question: > > I want to know if several switch (about 50) in a big lan are up and then > know their MAC addresses to do a list that contains host name, ip and mac. > I know only the range of their IP addresses (

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

2008-02-03 Thread John Nagle
JJohn Nagle wrote: >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. ... > I suspe

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 start invesigating with Roger's suggestion.

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, especially > as every O

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 Python module that implements ping in a > > platform/OS-independent

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, especially > as every OS has a differ

Re: ping

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

RE: ping

2006-04-14 Thread brandon.mcginty
nal Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of david brochu jrSent: Friday, April 14, 2006 5:04 PMTo: python-list@python.orgSubject: re: ping Thanks,   Unfortunately substituting os.system with os.popen results in the output being: www.google.

Re: ping

2006-04-14 Thread David Reed
On Apr 14, 2006, at 8:04 PM, david brochu jr wrote: > Thanks, > > Unfortunately substituting os.system with os.popen results in the > output being: > > ', mode 'r' at 0x009C4650> > ', mode 'r' at 0x009C4650> > ', mode 'r' at 0x009C4650> > ', mode 'r' at 0x009C4650> > > instead of giving me

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 'r' at 0x009C4650>  instead of giving me the ping stats "pinging

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 x in file: > ping = "ping " + x > print >> redirect,