Python找到client_accounts
但无法导入方法 - 为什么?毫无意义
#settings.py
method_list= []
client_accounts = {}
from settings import client_accounts
print client_accounts
from settings import method_list
{}
Traceback (most recent call last):
File "/home/ubuntu/workspace/main_loop.py", line 63, in <module>
from settings import method_list
ImportError: cannot import name method_list
即使使用此功能也不起作用:
from settings import client_accounts, method_list