方法一:
python -m +执行文件,在这里注意路径位置
python -m 鼠标操作.py
方法二:
python -c “import py_compile;py_compile.compile(r’执行文件路径’)”
python -c "import py_compile;py_compile.compile(r'增强现实.py')"
为什么要生成pyc:
见参考:
https://www.cnblogs.com/Samuel-Leung/p/10768192.html