Tuesday, February 14, 2017

Reloading python packages on your command line.

A really quick post to bring readers attention to python package called imp

What is it?
Let's say you are on your command line and you already loaded some library... now, you need to change that library and for changes to take effect. How would you do it? Simple...

import imp

imp.reload(sample)

That's all to it! No need to close the prompt shell anymore.

No comments:

Post a Comment