How to reload a python module in same program ? Home › Forums › Python Programming › How to reload a python module in same program ? This topic has 1 reply, 1 voice, and was last updated 12 years, 5 months ago by Humble. Viewing 2 posts - 1 through 2 (of 2 total) Author Posts August 1, 2013 at 7:51 pm #1929 Reply HumbleKeymaster Do you guys know how to reload a module inside the same python program, so that it will pick the new changes? August 1, 2013 at 7:56 pm #1961 Reply HumbleKeymaster The builtin python function called ‘reload’ can be used to reload a module inside the same program. >>>> reload.__doc__ 'reload(module) -> module\n\nReload the module. The module must have been successfully imported before.' >>> For ex: >>>> import os >>> os <module 'os' from '/usr/lib64/python2.7/os.pyc'> >>> reload(os) <module 'os' from '/usr/lib64/python2.7/os.pyc'> >>> os Author Posts Viewing 2 posts - 1 through 2 (of 2 total) Reply To: How to reload a python module in same program ? Your information: Name (required): Mail (will not be published) (required): Website: Set as private reply Submit