Robert said:
Thank you!
There are no PyKyra .py, .pyc, .pyd files.
There is a release PyKyra.dll and a source directory contains a
__init__.py file.
Trying to use the PyKyra.dll returns:
"ImportError: dynamic module does not define init function (initPyKyra)"
Thus, PyKyra.dll, whatever else it may be, is not a Python extension
module named PyKyra.
Therefore I was attempting to define the location of the Package
(directory structure).
You need to put the PARENT directory of the PyKyra directory (where
the latter is the one containing __init__.py) on sys.path. Simplest
is to have a textfile, call it e.g. pykyra.pth, with a single line:
c:\the\parent\directory
in your site-packages directory (e.g. C:\Python23\Lib\site-packages\).
There is little information about creating path references for Packages in
Windows.
I thought I covered .pth files and various alternatives (all cross-platform:
why go to platform-specific approaches when cross-platform works fine?) in
an adequate fashion in "Python in a Nutshell". Specifically, it seemed to
me that the sentences:
"""
A package named P resides in a subdirectory, also called P, of some
directory in sys.path. The module body of P is in the file P/__init__.py.
You must have a file named P/__init__.py, even if it's empty (representing
an empty module body), in order to indicate to Python that directory P
is indeed a package.
"""
(in section Packages, p. 124) were adequate coverage of THAT issue; and
(on p.121, "Searching the Filesystem for a Module"), the sentences:
"""
If a text file with extension .pth is found in the PYTHONHOME directory
at startup, its contents are added to sys.path, one item per line
"""
(and following), were adequate coverage of THAT one (except that, sigh,
the mention of site-packages as a preferable alternative to PYTHONHOME
dropped by the wayside -- doesn't even seem to be among the errata, which
were fixed in the current [09/03] reprint of which I don't yet have a
printed copy).
Did you find this coverage unclear, or inadequate? If so, then perhaps
you might suggest how to enhance it in a future edition -- thanks!
Alex