You might also try breaking up your long file into shorter ones. Make nice-sized modules and the main program collects these modules together. Any code you have in common between scripts? Factor it out! A function with a lot of helpers? break that out into a separate package.