[CentralOH] sys.path and utility routines

Mark Erbaugh mark at microenh.com
Thu Jul 1 19:53:57 CEST 2010

I'm developing a Python application using the Eclipse IDE with PyDev. I have developed some routines that I think will be useful in other applications, so I place them in a separate PyDev project. PyDev allows me to add this other project to the PYTHONPATH of my application project so that all I need to do is import my utility package.

Where is the best place to put my utility package when running outside of Eclipse?  To keep things together, it seems like a good choice would be inside the src folder of the application.

When I run my application outside of Eclipse / PyDev, what's the best way to get my utility package into sys.path?  Ideally, I'd like to have code that runs the same inside PyDev where the utility is in another PyDev project and outside of Eclipse where the utility somewhere else.


More information about the CentralOH mailing list