天天看點

python使用import導入檔案夾中的檔案

python使用import導入檔案夾中的檔案,例如我有一個檔案夾eblib,需要從serialutils中import即

from eblib.serialutils import full_port_name, enumerate_serial_ports

在eblib中添加一個名字為__init__.py的空檔案即可解決