Re: Python on Windows

Discussion in 'Python' started by rusi, Oct 19, 2012.

  1. rusi

    rusi Guest

    On Oct 19, 6:24 pm, graham <> wrote:
    > 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


    Just try taking your ubuntu's /usr/share/pyshare/feedparser.py onto
    your windows box??
    [UNTESTED]
     
    rusi, Oct 19, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Achim Domma
    Replies:
    0
    Views:
    442
    Achim Domma
    Jul 19, 2003
  2. Replies:
    1
    Views:
    374
    David Fraser
    Nov 26, 2004
  3. Michael Kearns
    Replies:
    35
    Views:
    1,858
  4. Max M
    Replies:
    1
    Views:
    427
    Brandon K
    Oct 10, 2005
  5. Replies:
    8
    Views:
    664
    =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
    Apr 11, 2007
Loading...

Share This Page