16th January 2008
After running into a series of difficulties while trying to compile a Pyrex package comprising of several modules, I ran into this brute force method to make sure all the frisky little spirits involved in my magic spell, namely the Python interpreter, the Pyrex distutils module and his pal, MinGW's gcc compiler, are able to find the necessary files: stick the package's directory right in the Python path environment variable.
This rudimentary but allegedly ingenious notion led to considerable frustration, as Windows XP's system manager failed to cooperate with my efforts: adding a PYTHONPATH environment variable did not really modify the Python path, as seen from the sys.path variable.
As customary, a search through the web eventually rewarded me with a couple of pointers shared by better sorcerers than I, whose knowledge I parrot below, in the hope that it may aid others as it did me.
16th January 2008
It turned out that I was lacking the means of directly modifying the variable in question at that daunting cavern of weirdness known as the Windows registry. Here follows the recipe:
regeditPronto! The package's directory is now in the path and the modules may be invoked directly from the Python interpreter. Be warned: name your modules in a sensible fashion or suffer the consequences.
16th January 2008
Some related material: