[英]How do I import a module in a package / folder with a dot in the filename for a relative import?
use shell util to copy the file over and use it 使用shell util复制文件并使用它
import shutil
from os.path import join, dirname, basename
__dirname = dirname(__file__)
shutil.copy(join(__dirname, '..', 'duel.sikuli', 'duel.py'), join(__dirname, 'duel.py'))
from duel import duel
or check out https://stackoverflow.com/a/27556208/3854436 或查看https://stackoverflow.com/a/27556208/3854436
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.