Shen Ronghong

Results 3 comments of Shen Ronghong

> 试试这个: python **-m** kflash -B dan hello_world.bin > > 或者: python **-m** kflash/**kflash** -B dan hello_world.bin @GongT 谢谢, 这个方法是可行的 `python -m kflash -B dan hello_world.bin` ·python -m kflash/kflash -B...

@zhen8838 在我的理解中, 添加环境变量PATH是把一个可执行文件的路径添加到这个变量中,这样shell在运行时会到PATH所在的目录搜索这些可执行文件。当kflash在我的理解中只是一个python脚本模块,他也能直接被终端运行吗? # 我做了以下尝试: > 参考了下列文章: > https://frostming.com/2019/03-13/where-do-your-packages-go/ > https://sysin.org/blog/windows-env/ > 在powershell下运行 ``` PS C:\Users\Edison> python Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on...

@zhen8838 可能是我的意思没表达到位. 应该这么理解吧, 脚本的运行还需要解释器的解释. 如果需要用到python的脚本, 需要这么写`python -m kflash -B dan hello_world.bin` , 指定用python解释器运行. 而不是`kflash -B dan hello_world.bin` , 这样写默认用shell的解释器运行. shell有自己的解释器, 他默认执行的脚本只能是shell语言的脚本.