Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31740

Re: Python on Windows

Date 2012-10-19 14:24 +0100
From graham <grahams@tectime.com>
Newsgroups comp.lang.python
Subject Re: Python on Windows
References <1pKdnT9EiNaO2ODNnZ2dnUVZ8rCdnZ2d@bt.com>
Message-ID <JY2dnYfmpcsEyRzNnZ2dnUVZ8vadnZ2d@bt.com> (permalink)

Show all headers | View raw


On 16/10/2012 12:29, graham wrote:
>
> Downloaded and installed Python 2.7.3 for windows (an XP machine).
>
> Entered the Python interactive interpreter/command line and typed the
> following:
>
>      >>>import feedparser
>
> and I get the error message "No module named feedparser".
>
> There is a feedparser.py file lurking around - so I suppose Python
> cannot find it.
>
> Anyone: What to do?
>
>
>
> GC
>

Thanks to everyone who replied.

Python was installed in the subdirectory C:\Python27 with the file 
feedparser.py residing in C:\Python27\Lib\email.

Setting the Windows environment variable (which did not previously 
exist) to C:\Python27\Lib\email allowed me to import feedparser 
successfully.

However, it seems that this feedparser module is not the module I wanted.

I'm trying to follow an introductory Python course from the magazine 
Linux Format (issue number 120 I think). The article includes the 
following lines:

>>> import feedparser
>>> url = “http://weather.yahooapis.com/forecastrss?p=UKXX0637&u=c”
>>> data = feedparser.parse(url)

This is fine using Ubuntu (after installing the feedparser package) but 
now, running XP I get

>>> data = feedparser.parse(url)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'parse'



So there seems to be at least 2 feedparser modules - the one I have does 
not include "parse". How can I identify the correct one? How do I

This is all confusing and frustrating.

Some searching suggests I need the 'universal feed parser' code. I can 
find documentation for this but no code/module file. Is it available 
only for Unix-like OS's?

GC





Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python on Windows graham <grahams@tectime.com> - 2012-10-16 12:29 +0100
  Re: Python on Windows Marco Nawijn <nawijn@gmail.com> - 2012-10-16 04:35 -0700
    Re: Python on Windows Dwight Hutto <dwightdhutto@gmail.com> - 2012-10-16 07:56 -0400
  Re: Python on Windows Joel Goldstick <joel.goldstick@gmail.com> - 2012-10-16 07:44 -0400
  Re: Python on Windows graham <grahams@tectime.com> - 2012-10-19 14:24 +0100
    Re: Python on Windows Tim Golden <mail@timgolden.me.uk> - 2012-10-19 14:44 +0100
    Re: Python on Windows rusi <rustompmody@gmail.com> - 2012-10-19 06:48 -0700
    Re: Python on Windows Tim Golden <mail@timgolden.me.uk> - 2012-10-19 15:00 +0100
    Re: Python on Windows graham <grahams@tectime.com> - 2012-10-19 15:12 +0100
      Re: Python on Windows Tim Golden <mail@timgolden.me.uk> - 2012-10-19 15:24 +0100
    Re: Python on Windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-10-19 15:23 +0100
    Re: Python on Windows Tim Golden <mail@timgolden.me.uk> - 2012-10-19 15:40 +0100
    Re: Python on Windows Gisle Vanem <gvanem@broadpark.no> - 2012-10-20 14:47 +0200

csiph-web