NavigationUser loginSpam?See spam posts on this site? If so, please don't reply to the spam! Instead, just report the URL to the webmaster. |
Python - *.pth files -- can't get it to workHello, I'm build a Python application at /home/www/ I'd like to put modules that I can import into my application in /home/www/stuff/bin, def myModule(): To import myModule into my application I thought that I could add a file, say, www.pth, to /usr/lib/Python2.3/site-packages with the content /home/www/stuff/bin, but it doesn't work. 1) What am I doing wrong? The books (O'Reilly's "Learning Python," and "Python in a Nutshell," among others) and the web seem rather vague on this topic. I've also read the comments in site.py, but that hasn't helped either. I know that ultimately I need to add my module directory to PYTHONPATH. But I'm don't even understand how to do this manually, much less with the help of a *.pth file. I suppose my deeper questions is: 3) What's the best way to set up and configure a directory structure for non-trivial Python application? Many thanks, Lloyd |
Re: Python - *.pth files -- can't get it to work
I am not able to reproduce your problem.