One way to speed up the development cycle is to preserve your Python process so you
only need to load the packages once.
Instead of running the script, package the script itself as a module.
Open an interactive python (or perhaps IPython) session, import your module, then
"run the script" by calling its main function.
If you make changes to the script, you will only have to reload your
module. Since the other modules are already loaded, this should be relatively
quick. Since Python modules are cached, importing the same module a second time is essentially instantaneous.
In Python, reloading can be done this way.
Or you could configure IPython to automatically reload modules or packages when they change this way. IPython also has some nice debugging features, such as %pdb, which will drop you into a debugger whenever an uncaught exception is raised.
So instead of your script.py looking like this:
import xyz
statement1
statement2
statement3
You'd modify it to look like
import xyz
def main():
statement1
statement2
statement3
# This allows you to still run your module as a script:
if __name__ == '__main__':
main()
Then, at the interactive Python session prompt, you'd type
>>> import script
>>> script.main()
to run the script.