mozilla / jydoop

Efficient Hadoop Map-Reduce in Python
Other
31 stars 19 forks source link

Better support for modules and sys.path #29

Open indygreg opened 11 years ago

indygreg commented 11 years ago

Currently, sys.path is munged to include just the path of the executing script. This essentially means that all scripts must be in the same directory. I don't believe this will scale, as we will likely inevitably have dozens (possibly hundreds) of scripts and we will likely want to organize them in directories.

I think we should have a directory for shared modules and a directory for scripts. The directory for shared modules is always added to sys.path. And, we continue to add the script's directory to sys.path, if needed.

If nothing else, this is the Python way and it will encourage code re-use among jobs because there is a clear and obvious place for reusable code/modules.