Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Python on Windows

Reply
Thread Tools

Re: Python on Windows

 
 
rusi
Guest
Posts: n/a
 
      10-19-2012
On Oct 19, 6:24*pm, graham <grah...@tectime.com> 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/forecas...=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]
 
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
Changing Windows logon Screen in Windows 7 and Windows 2008 Tech Guy Windows 64bit 0 04-27-2011 12:59 PM
!Windows Live Mail replace Outlook Express on Windows XP and Windows Mail on Vista... Max Burke NZ Computing 8 05-18-2007 12:10 AM
troubles building python 2.5 on Windows XP x64 Windows Server 2003 sp1 Platform SDK bhochstetler@gmail.com Python 8 04-11-2007 10:45 PM
Windows installer, different versions of Python on Windows Max M Python 1 10-10-2005 01:26 PM
compiling mysql-python for python 2.3 on windows Achim Domma Python 0 07-19-2003 08:29 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57