Re: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Turritopsis Dohrnii Teo En Ming
Noted with thanks. I will contact the script authors. On 2020-08-17 07:16, Cameron Simpson wrote: On 16Aug2020 17:41, Turritopsis Dohrnii Teo En Ming wrote: Subject: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab The best thing

Re: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Cameron Simpson
On 16Aug2020 17:41, Turritopsis Dohrnii Teo En Ming wrote: >Subject: I discovered a bug in the no-ip dynamic dns free hostname >auto renewal/confirmation script written by loblab The best thing to do here is to submit this as an issue here: https://github.com/loblab/noip-renew/

I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab

2020-08-16 Thread Turritopsis Dohrnii Teo En Ming
Subject: I discovered a bug in the no-ip dynamic dns free hostname auto renewal/confirmation script written by loblab Good day from Singapore, Programming code troubleshooting person: Mr. Turritopsis Dohrnii Teo En Ming (Targeted Individual) Country: Singapore Date: 15 to 16 August 2020

Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Thomas Jollans
docs say, turning the hostname into an IP address and working with that would be incorrect. Say we have a server, 'fred.weasley.example.com', which is also known as 'www.example.com'. Its reverse DNS pointer is 'fred.weasley.example.com'. Now, if we have 'e

Re: getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Rhodri James
On 12/09/18 15:29, Florian Bergmann wrote: Hello, While I was debugging some salt issues I dug into the python code and found a piece of code in the `socket.py` module that surprised my a bit: In the `getfqdn` function the `gethostbyaddr` name function is being called with a `hostname` instead

getfqdn passes a hostname to gethostbyaddr instead of an ip address

2018-09-12 Thread Florian Bergmann
Hello, While I was debugging some salt issues I dug into the python code and found a piece of code in the `socket.py` module that surprised my a bit: In the `getfqdn` function the `gethostbyaddr` name function is being called with a `hostname` instead of an `ipaddress`: ```python def getfqdn

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-02 Thread Chris Angelico
On Tue, Sep 3, 2013 at 3:52 AM, wrote: > To be honest, knowing nothing about DNS configuration, I don't even know if > adding the entry to /etc/hosts is the "proper" fix or if the issue should be > fixed somewhere else (or perhaps "didn't know", as you seem to imply that > that is not the corr

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-02 Thread anntzer . lee
On Monday, September 2, 2013 5:45:26 AM UTC-7, Roy Smith wrote: > In article <[email protected]>, > [email protected] wrote: > > > As it happens I found a better way: just add the proper entry to /etc/hosts. > > You have not found a better way. You still

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-02 Thread Roy Smith
In article <[email protected]>, [email protected] wrote: > As it happens I found a better way: just add the proper entry to /etc/hosts. You have not found a better way. You still have a network (or more specifically, DNS) configuration that's broken. Wh

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-02 Thread Chris Angelico
On Mon, Sep 2, 2013 at 3:28 PM, wrote: > On Sunday, September 1, 2013 2:03:56 PM UTC-7, Chris Angelico wrote: > >> > I tried using netifaces (https://pypi.python.org/pypi/netifaces) which >> > seems to rely on getifaddrs (according to the doc, I didn't check the >> > source). Again, it returns

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread anntzer . lee
On Sunday, September 1, 2013 2:03:56 PM UTC-7, Chris Angelico wrote: > > I tried using netifaces (https://pypi.python.org/pypi/netifaces) which > > seems to rely on getifaddrs (according to the doc, I didn't check the > > source). Again, it returns nearly instantaneously the correct IP address.

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread Chris Angelico
way to call that from core Python. But a Google search for 'python >> getifaddrs' shows up a few third-party modules that might be of use to >> you; that'd be a lot quicker and more reliable than trying to look up >> your own hostname and depending on the results. >

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread anntzer . lee
#x27;python > getifaddrs' shows up a few third-party modules that might be of use to > you; that'd be a lot quicker and more reliable than trying to look up > your own hostname and depending on the results. > > ChrisA I tried using netifaces (https://pypi.python.org/p

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread anntzer . lee
On Saturday, August 31, 2013 10:06:43 PM UTC-7, Michael Torrie wrote: > On 08/31/2013 10:51 PM, [email protected] wrote: > > > It is the call to gethostbyname_ex that is very slow. The call to > > gethostname is quick (and returns the same string as > > /usr/

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread Chris Angelico
issue. The C function you want to be calling is getifaddrs(), and I don't think there's a way to call that from core Python. But a Google search for 'python getifaddrs' shows up a few third-party modules that might be of use to you; that'd be a lot quicker and more reliable

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-09-01 Thread Roy Smith
In article <[email protected]>, [email protected] wrote: > It is the call to gethostbyname_ex that is very slow. The call to > gethostname is quick (and returns the same string as /usr/bin/hostname). First, please stop posting with Google

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-08-31 Thread Michael Torrie
On 08/31/2013 10:51 PM, [email protected] wrote: > It is the call to gethostbyname_ex that is very slow. The call to > gethostname is quick (and returns the same string as > /usr/bin/hostname). What gethostbyname_ex and /usr/bin/hostname do are very different things. gethostbyname_

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-08-31 Thread anntzer . lee
It is the call to gethostbyname_ex that is very slow. The call to gethostname is quick (and returns the same string as /usr/bin/hostname). On Saturday, August 31, 2013 6:01:00 PM UTC-7, Roy Smith wrote: > In article , > > [email protected] wrote: > > > > > Hi, &

Re: gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-08-31 Thread Roy Smith
sort of configuration issue which is causing some DNS query to timeout. The first step, is to figure out which part is taking so long. Open up a python shell and run: >>> name = socket.gethostname() see how long that takes and what it returns. Then, assuming it returns a s

gethostbyname_ex(hostname) extremely slow (crossposted from stackoverflow)

2013-08-31 Thread anntzer . lee
Hi, At startup, IPython (qtconsole) calls "socket.gethostbyname_ex(socket.gethostname())[2]" to find a list of IP addresses that point to the machine. On a Linux server that I manage this call is extremely slow (>20s)... which I have trouble understanding as "ip addr show" seems to give the sa

Re: using text file to get ip address from hostname

2012-09-19 Thread Dan Katorza
> > > > > > print ("#####") > > > > > > > > > > > > > > print ("# Choose from the options below #") > > > > > > > > > > &

Re: using text file to get ip address from hostname

2012-09-19 Thread Dave Angel
except EnvironmentError as e: >> print(e) >> sys.exit(1) >> >> print("\nFile {0} exists!".format(filename)) >> print("\nGetting IP addresses for hosts") >> print("\n") >> els

Re: using text file to get ip address from hostname

2012-09-19 Thread Dan Katorza
> > print ("#\n") > > > > > > > > > > > > mchoice = int(raw_input("Please enter your choice> ")) > > > > > > while mchoice !=1 and mchoice !=2: > &

Re: using text file to get ip address from hostname

2012-09-19 Thread Dan Katorza
(raw_input("Please enter your choice> ")) > > while mchoice !=1 and mchoice !=2: > > print("{0} is not a menu option.".format(mchoice)) > > mchoice = int(raw_input("Please try again> ")) > > > > > > if mchoice

Re: using text file to get ip address from hostname

2012-09-19 Thread Chris Angelico
On Wed, Sep 19, 2012 at 6:50 PM, Dan Katorza wrote: > i know about the while loop , but forgive me i just don't have a clue how to > use it for this situation. You've already used one. What you need to do is surround your entire code with the loop, so that as soon as it gets to the bottom, it go

Re: using text file to get ip address from hostname

2012-09-19 Thread Dan Katorza
llo, please enter file name here> ") if filename.endswith(".txt"): try: infile = open(filename) except EnvironmentError as e: print(e) sys.exit(1) print("\nFile {0} exists!".format(filename)) print("\nGetting IP addresses for hosts"

Re: using text file to get ip address from hostname

2012-09-19 Thread Chris Angelico
On Wed, Sep 19, 2012 at 5:41 PM, Dan Katorza wrote: > > Hello again, > I have another question and i hope you will understand me.. > Is there any option where you can set the program to go back to lets say the > top of the code? > I mean if the program finished the operation and i want to stay in

Re: using text file to get ip address from hostname

2012-09-19 Thread Dan Katorza
t; -- > > > > > > #!/usr/bin/env python > > > > > > #Get the IP Address > > > > > >

Re: using text file to get ip address from hostname

2012-09-17 Thread Thomas Rachel
... - First - #!/usr/bin/env python #Get the IP Address print("hello, please enter file name here>"), import socket for line in open(raw_input()): hostname = line.strip() print("IP address for {0} is {1}

Re: using text file to get ip address from hostname

2012-09-15 Thread Dan Katorza
. > > > > this is what i have so far > > -- > > #!/usr/bin/env python > > #Get the IP Address > > > > import socket > > hostname = 'need it to read from a text file

Re: using text file to get ip address from hostname

2012-09-15 Thread Hans Mulder
t; i need to get an ip address from list of hostnames which are in a textfile. >> >> >> >> this is what i have so far >> >> -- >> >> #!/usr/bin/env python >> >> #Ge

Re: using text file to get ip address from hostname

2012-09-15 Thread Dan Katorza
. > > > > this is what i have so far > > -- > > #!/usr/bin/env python > > #Get the IP Address > > > > import socket > > hostname = 'need it to read from a text file

Re: using text file to get ip address from hostname

2012-09-12 Thread Jason Friedman
> i need to get an ip address from list of hostnames which are in a textfile. > > this is what i have so far > -- > #!/usr/bin/env python > #Get the IP Address > > import socket > hostname = '

Re: using text file to get ip address from hostname

2012-09-12 Thread Terry Reedy
On 9/12/2012 10:41 AM, [email protected] wrote: it's not really homework, i found a lab exercise on the web > and i;m trying to study with it. maybe not the most efficient way. i have a file with hostnames ordered line by line. Key fact for this exercise: open files are iterable. So your

Re: using text file to get ip address from hostname

2012-09-12 Thread Alister
gt;> >> >> i need to get an ip address from list of hostnames which are in a >> textfile. >> >> >> >> this is what i have so far >> >> -- >> >> #!/usr/

Re: using text file to get ip address from hostname

2012-09-12 Thread dkatorza
ile. > > > > this is what i have so far > > -- > > #!/usr/bin/env python > > #Get the IP Address > > > > import socket > > hostname = 'need it to read from a text

Re: using text file to get ip address from hostname

2012-09-12 Thread Chris Angelico
sic pointer. You have there something that successfully resolves one hostname to an IP address. Now you want to expand that to reading an entire file of them and resolving them all. Presumably you need to produce a list of IP addresses; check the question as to whether you need to create a file, or ou

using text file to get ip address from hostname

2012-09-12 Thread dkatorza
ython #Get the IP Address import socket hostname = 'need it to read from a text file' addr = socket.gethostbyname(hostname) print 'The address of ', hostname, 'is', addr --- any idea ? sor

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread Dan Stromberg
On Thu, Apr 28, 2011 at 1:18 PM, cjblaine wrote: > Thanks for the reply, Ned. > > Bummer for me. Check this out: > > C code on Solaris 10 SPARC returns the following with nscd > running (the Solaris Naming Services Caching Daemon, on by > default): > I'm guessing the IP's PTR record is pointing

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread cjblaine
Thanks for the reply, Ned. Bummer for me. Check this out: C code on Solaris 10 SPARC returns the following with nscd running (the Solaris Naming Services Caching Daemon, on by default): PRIMARY according to gethostbyaddr(): my-dns-cname.our.org ALIAS according to gethostbyaddr(): primary.ou

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread Ned Deily
In article <850c85c0-be6e-4eec-b6b1-5c79e1716...@glegroupsg2000goo.googlegroups.com >, cjblaine wrote: > Python 2.7.1 (perhaps others) > > I believe this is a bug. Comments? > > Docs state: Return a triple (hostname, aliaslist, ipaddrlist) > where hostname is the prim

socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread cjblaine
Python 2.7.1 (perhaps others) I believe this is a bug. Comments? Docs state: Return a triple (hostname, aliaslist, ipaddrlist) where hostname is the primary host name responding to the given ip_address, aliaslist is a (possibly empty) list of alternative host names for the same address, and

Python Package Index hostname change

2007-07-31 Thread Martin v. Löwis
The Python Packaging Index (the software formerly known as Cheeseshop) is now available at http://pypi.python.org/pypi The old addresses (www.python.org/pypi, and cheeseshop.python.org/pypi) will continue to work, either as aliases or using HTTP redirections. The software was renamed to its old

Re: $HOSTNAME not in os.environ?

2006-09-01 Thread slinkp
Grant Edwards wrote: > On 2006-09-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Can anybody explain this one? > > >>>> print os.getenv('HOSTNAME') > > None > >>>> > > [EMAIL PROTECTED] ~ $ echo $HOSTNAME > >

Re: $HOSTNAME not in os.environ?

2006-09-01 Thread Grant Edwards
On 2006-09-01, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Can anybody explain this one? >>>> print os.getenv('HOSTNAME') > None >>>> > [EMAIL PROTECTED] ~ $ echo $HOSTNAME > kermit Perhaps the HOSTNAME variable isn't exported? -

$HOSTNAME not in os.environ?

2006-09-01 Thread slinkp
Can anybody explain this one? [EMAIL PROTECTED] ~ $ python Python 2.4.3 (#1, Jul 27 2006, 13:07:44) [GCC 3.4.6 (Gentoo 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> imp

Re: gaierror: (8, 'hostname nor servname provided, or not known')

2006-07-31 Thread Laszlo Nagy
faulkner írta: > my boss has a similar problem with his home internet connection in > general. he traced it back to his router, which was in the first couple > generations of routers. how old are the routers you tested this on? > aside from upgrading them, if they are the problem, i can suggest a >

Re: gaierror: (8, 'hostname nor servname provided, or not known')

2006-07-31 Thread faulkner
connect() > File "/usr/local/lib/python2.4/httplib.py", line 1072, in connect > sock.connect((self.host, self.port)) > File "", line 1, in connect > gaierror: (8, 'hostname nor servname provided, or not known') > > The program is connecting to

gaierror: (8, 'hostname nor servname provided, or not known')

2006-07-31 Thread Laszlo Nagy
ib/python2.4/httplib.py", line 1072, in connect sock.connect((self.host, self.port)) File "", line 1, in connect gaierror: (8, 'hostname nor servname provided, or not known') The program is connecting to the same host about 2 times per minute. After running for

Re: xmlrpc: hostname nor servname provided ?

2006-07-27 Thread Laszlo Nagy
tput > self.send(msg) > File "/usr/local/lib/python2.4/httplib.py", line 646, in send > self.connect() > File "/usr/local/lib/python2.4/httplib.py", line 1072, in connect > sock.connect((self.host, self.port)) > File "", line 1, in connect >

xmlrpc: hostname nor servname provided ?

2006-07-25 Thread Laszlo Nagy
n2.4/httplib.py", line 1072, in connect sock.connect((self.host, self.port)) File "", line 1, in connect gaierror: (8, 'hostname nor servname provided, or not known') This exception does not stop my server program and it keeps trying to connect to the xmlrpc server

Re: Hostname

2006-01-29 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Wow! This was a fast answer and it works. That's why we used to joke about Guido's time machine: somebody would express a need (sometimes phrased as a suggestion for an enhancement), and Guido would zip back in time and implement the needed functiona

Re: Hostname

2006-01-29 Thread [EMAIL PROTECTED]
Wow! This was a fast answer and it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: Hostname

2006-01-29 Thread Alex Martelli
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi > Iam new in Python. > I want to know for my first Project in Python how i can get the > Hostname from a URL? >>> import urlparse >>> urlparse.urlsplit('http://foo.bar.com/zapzap') ('http&#

Hostname

2006-01-29 Thread [EMAIL PROTECTED]
Hi Iam new in Python. I want to know for my first Project in Python how i can get the Hostname from a URL? Thanks for Help -- http://mail.python.org/mailman/listinfo/python-list