> I'm trying to use the feedparser module (http://www.feedparser.org/).
>
> Is it possible to use this without running the setup program?
>
> I don't see why not, seems like I'm missing something obvious.
>
> My directory structure is:
>
> myprogram.py
> /feedparser
> /feedparser.py
>
> I know I can install the module in the modules directory but would like
> to
> avoid this for two reasons: I'm only using it for the one project so
> would
> like to keep it seperate, and if I move to a shared host I may not be
> allowed to install additional modules (not sure if this is correct
> though).
The easiest way would be to put the single module feedparser.py in the
same directory as your program (I don't completely get your reasons not
to do that). OR put feedparser.py in some other directory that is already
listed in sys.path. OR add the directory containing feedparser.py to
sys.path, just at the beginning of your program.
> I've tried:
>
> import feedparser
>
> import feedparser.feedparser
>
> from feedparser import feedparser
>
> What am I doing wrong? :)
*IF* the directory 'feedparser' were a package (that is, if it contained a
file __init__.py), then that last import statement would be valid. But I
don't reccomend doing this; you're changing the module's environment.
--
Gabriel Genellina
The malicious thing to do would be spam Python servers with 'import
Lib' and common locale-specific-language short words for techs: import
biblio, import server--- things we might all want really small-to-zero
numbers of... if in numbers... and such as columns of instancy (the
currency), from the instant of instant message. So, can you tank my
laptop, or can I go tanking the town?