Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 08-03-2004, 03:38 AM   #1
Registered: Mar 2002
Location: egypt
Distribution: Gentoo
Posts: 457

Rep: Reputation: 30
can anyone help me pl with this eror i a python script

i made this script about 3 months ago and it was working very good till few days ag where i started getting this error and i don't know why

import urllib, commands, datetime
i = commands.getoutput("lynx -dump -nolist -auth safrout:sa1782ao | grep '^ *[0-9].*ppp$' -m 1 | cut -c 4-15")
x= commands.getoutput ("host | cut -c 35-46")
def compare():
  if x == i :
    print,"-->", i,"=", x
    url_new = urllib.urlopen(url)
    print, "ur IP was changed to ",, ", and it up2date now :)"
and the error looks like this

safrout@home IP-Update $ python
Traceback (most recent call last):
  File "", line 12, in ?
  File "", line 10, in compare
    url_new = urllib.urlopen(url)
  File "/usr/lib/python2.3/", line 76, in urlopen
  File "/usr/lib/python2.3/", line 181, in open
    return getattr(self, name)(url)
  File "/usr/lib/python2.3/", line 281, in open_http
    if not host: raise IOError, ('http error', 'no host given')
IOError: [Errno http error] no host given
maybe it is a silly error but really i can't figure it out


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
python cgi script and premature end of script headers Neruocomp Programming 1 07-28-2005 12:43 PM
Help with small Python Script cmfarley19 Programming 8 05-02-2005 09:10 AM
how do I do this in Python? (simple sh script) johnMG Programming 6 12-22-2004 11:05 PM
Anyone have a HelloWorld Python Qt script? SheldonPlankton Programming 1 07-22-2004 03:52 PM
python script LinuxLala Programming 14 04-07-2004 07:19 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:32 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration