Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Watch That Post

Reply
Thread Tools

Watch That Post

 
 
=?iso-8859-1?q?Premshree=20Pillai?=
Guest
Posts: n/a
 
      05-09-2004
Hello,

I recently posted a simple Python script--Watch That
Post--that lets you watch a URL for any changes.

I wrote it to watch posts on LiveJournal, but it can
watch any URL.

It's at http://premshree.seacrow.com/code/python/watch

-Premshree Pillai

=====
-Premshree
[http://www.qiksearch.com/]

__________________________________________________ ______________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/

 
Reply With Quote
 
 
 
 
Steven
Guest
Posts: n/a
 
      05-10-2004
Premshree Pillai wrote:

> Hello,
>
> I recently posted a simple Python script--Watch That
> Post--that lets you watch a URL for any changes.
>
> I wrote it to watch posts on LiveJournal, but it can
> watch any URL.
>
> It's at http://premshree.seacrow.com/code/python/watch



I tried running it. It works fine until it tries to run the watch function a
second time, then it does this:

Traceback (most recent call last):
File "watch.py", line 76, in ?
watch()
File "watch.py", line 58, in watch
size2 = len(urllib.urlopen(url).readlines())
File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'

I really like the idea,

Steven
 
Reply With Quote
 
 
 
 
Peter Otten
Guest
Posts: n/a
 
      05-10-2004
Steven wrote:

> Premshree Pillai wrote:
>
>> Hello,
>>
>> I recently posted a simple Python script--Watch That
>> Post--that lets you watch a URL for any changes.
>>
>> I wrote it to watch posts on LiveJournal, but it can
>> watch any URL.
>>
>> It's at http://premshree.seacrow.com/code/python/watch

>
>
> I tried running it. It works fine until it tries to run the watch function
> a second time, then it does this:
>
> Traceback (most recent call last):
> File "watch.py", line 76, in ?
> watch()
> File "watch.py", line 58, in watch
> size2 = len(urllib.urlopen(url).readlines())
> File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.3/urllib.py", line 181, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.3/urllib.py", line 410, in open_file
> return self.open_local_file(url)
> File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
> raise IOError(e.errno, e.strerror, e.filename)
> IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'
>
> I really like the idea,
>
> Steven


Try to provide the protocol:

>>> import urllib
>>> urllib.urlopen("www.kde-apps.org")

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python2.3/urllib.py", line 76, in urlopen
return opener.open(url)
File "/usr/local/lib/python2.3/urllib.py", line 181, in open
return getattr(self, name)(url)
File "/usr/local/lib/python2.3/urllib.py", line 410, in open_file
return self.open_local_file(url)
File "/usr/local/lib/python2.3/urllib.py", line 420, in open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'
>>> urllib.urlopen("http://www.kde-apps.org")

<addinfourl at 1078699980 whose fp = <socket._fileobject object at
0x404b47d4>>
>>>


(Just a guess)

Peter

 
Reply With Quote
 
Matt Leslie
Guest
Posts: n/a
 
      05-10-2004
Steven wrote:
>
> I tried running it. It works fine until it tries to run the watch function a
> second time, then it does this:
>
> Traceback (most recent call last):
> File "watch.py", line 76, in ?
> watch()
> File "watch.py", line 58, in watch
> size2 = len(urllib.urlopen(url).readlines())
> File "/usr/lib/python2.3/urllib.py", line 76, in urlopen
> return opener.open(url)
> File "/usr/lib/python2.3/urllib.py", line 181, in open
> return getattr(self, name)(url)
> File "/usr/lib/python2.3/urllib.py", line 410, in open_file
> return self.open_local_file(url)
> File "/usr/lib/python2.3/urllib.py", line 420, in open_local_file
> raise IOError(e.errno, e.strerror, e.filename)
> IOError: [Errno 2] No such file or directory: 'www.kde-apps.org'
>
> I really like the idea,
>
> Steven


The URLs in the url file need to start with http://

Matt
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Modelsim post place and route/Post Translate issues Sridhar Hegde VHDL 2 09-13-2004 02:43 PM
wlftg17 modelsim temp file beeing too big (corret post, ignore the old post) Oleg VHDL 0 04-05-2004 03:31 AM
Post post post. Shel-hed Computer Support 2 11-08-2003 07:41 AM



Advertisments