Linux/Win32 func. to get Python instdir (not exedir) + site-packages => extensions mgmt

John Machin sjmachin at lexicon.net
Mon Jan 21 11:48:04 CET 2008


On Jan 21, 9:05 pm, pythonewbie <epro... at gmail.com> wrote:
> On 21 jan, 10:34, "Diez B. Roggisch" <de... at nospam.web.de> wrote:
[snip]
> > Diez
>
> To John Machin,

Get a clue #1: read the instructions for your news client ... like the
bit that says "click on the message/posting that you want to reply to"

>
> >>> sys.path
>
> ['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/
> python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk', '/usr/lib/
> python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/
> usr/lib/python2.5/site-packages',

Get a clue #2: it "doesn't work" because it needs a different pattern
on *x platforms.

Consider proceeding in this order:
1. get some clues
2. write an app, test it, etc
3. do the setup.py thingie for Windows & Linux
4. persuade some people to install it and test it
5. then and only then look into "verify if an/several extension(s) are
installed and to automatically install the missing ones"

By the way, I understand "extensions" to mean modules/packages written
substantially or wholly in C or C++. Is that what you mean? If so, do
1-5 above with a Python-only module first.

BTW#2 ... for Windows users of an app you'd need to be able to package
the app up with py2exe, which involves _including_ all the third-party
libraries called by the app.

HTH,
John



More information about the Python-list mailing list