simple pythonpath query

M

marc.wyburn

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
 
T

Tim Golden

[[email protected]]

| 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
 
M

marc.wyburn

Cheers Tim, that sorted it. I need to re-read the modules section and
namespaces. Everydays a schoolday. MW.
 
T

Twig

| [[email protected]]
|
|| 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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,710
Latest member
bernietqt

Latest Threads

Top