I'm using PyCharm with Python 3.7. In my Python console, how do I reload a module that I've changed? I created a file, "services.py" where I created a service class in
class ArticlesService:
def process(self):
As I test this in the console, I can't seem to figure out how to reload it. This is the error I get
from mainpage.services import ArticlesService
importlib.reload(ArticlesService)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 140, in reload
raise TypeError("reload() argument must be a module")
TypeError: reload() argument must be a module
How do I refer to my class to reload it? (Or better yet, how do I get the console to automatically reload everything I've changed?)