467,211 Members | 1,220 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,211 developers. It's quick & easy.

simple pythonpath query

I've downloaded the hypertext module and put it in the c:\python24\lib
folder. I would have thought that since the lib directory is in the
Pythonpath,I would be able to import python scripts from
C:\Python24\Lib\HyperText. I also tried including
C:\Python24\Lib\HyperText to
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\ PythonPath but no
joy. Am I missing something very simple here? Thanks, Marc

Jan 19 '06 #1
  • viewed: 1085
Share:
3 Replies
[ma*********@googlemail.com]

| I've downloaded the hypertext module and put it in the
c:\python24\lib
| folder. I would have thought that since the lib directory is in the
| Pythonpath,I would be able to import python scripts from
| C:\Python24\Lib\HyperText. I also tried including
| C:\Python24\Lib\HyperText to
| HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\ PythonPath but no
| joy. Am I missing something very simple here? Thanks, Marc

I take it that's Andy Dustman's HyperText package? One thing
to bear in mind (given that you haven't said what happened
when you tried) is that the package itself offers little --
ie if you do "import HyperText" you won't get much; you
need to do something like "from HyperText import HTML".

That said, I have it installed under site-packages
(ie c:\python24\lib\site-packages) which is more designed
for external modules/packages. The lib directory itself
is rather for Python-supplied modules.

Not sure if that all helps, but if you want to offer
a traceback or error message, we might see some more.

TJG

Jan 19 '06 #2
Cheers Tim, that sorted it. I need to re-read the modules section and
namespaces. Everydays a schoolday. MW.

Jan 19 '06 #3

"Tim Golden" <ti********@viacom-outdoor.co.uk> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
| [ma*********@googlemail.com]
|
|| I've downloaded the hypertext module and put it in the
| c:\python24\lib
|| folder. I would have thought that since the lib directory is in the
|| Pythonpath,I would be able to import python scripts from
|| C:\Python24\Lib\HyperText. I also tried including
|| C:\Python24\Lib\HyperText to
|| HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.4\ PythonPath but no
|| joy. Am I missing something very simple here? Thanks, Marc
|
| I take it that's Andy Dustman's HyperText package? One thing
| to bear in mind (given that you haven't said what happened
| when you tried) is that the package itself offers little --
| ie if you do "import HyperText" you won't get much; you
| need to do something like "from HyperText import HTML".
|
| That said, I have it installed under site-packages
| (ie c:\python24\lib\site-packages) which is more designed
| for external modules/packages. The lib directory itself
| is rather for Python-supplied modules.
|
| Not sure if that all helps, but if you want to offer
| a traceback or error message, we might see some more.
|
| TJG
|

Hello,

How is installation of modules done? Is it just copying files to
\lib\site-packages directory or is there something centralized db
involved?
This is for self made libs, of course.

Can I use any directory if just update path or some python specific env
var?

Jan 20 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.