0 votes
1 view
in Python by (47.8k points)

I often test my module in the Python Interpreter, and when I see an error, I quickly update the .py file. But how do I make it reflect on the Interpreter? So, far I have been exiting and reentering the Interpreter because re-importing the file again is not working for me.

1 Answer

0 votes
by (107k points)

For re-importing an updated package in Python interpreter you can use the following mentioned way:-

If you are using Python3.4 you can use the importlib.reload(packagename) method and it will do the task. For Python3 you can use imp.reload(packagename)

Related questions

0 votes
1 answer
asked May 11 in Python by Sudhir_1997 (43.7k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 29, 2019 in Python by Rajesh Malhotra (16.3k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...