我尝试从Client
文件夹中的 Python 源代码中获取类图,pyreverse
但它需要__init__.py
(venv) C:\Users\User\Desktop\project> pyreverse Client
parsing Client\__init__.py...
Failed to import module Client\__init__.py with error:
No module named Client\__init__.py.
我没有找到任何解决方案。有没有办法获取图表?
更新:文件夹
中有很多文件Client
:
Client.py
GUI.py
script.py
...
这是Client.py
代码:
class Client:
def __init__(self):
self.socket = None
self.listen_socket = None
self.buff_dict = {}
self.message_list_dict = {}
self.lock = threading.Lock()
self.target = None
self.listen_flag = True
...
这是GUI.py
代码:
class Window(object):
def __init__(self, title, font, client):
self.title = title
self.font = font
self.client = client
self.root = tk.Tk()
self.root.title(title)
self.build_window()
class LoginWindow(Window):
def __init__(self, client, font):
super(LoginWindow, self).__init__('Login', font, client)
self.build_window()
...