Discuss / Python / 打卡1天

打卡1天

Topic source

黎晓缘梦

#1 Created at ... [Delete] [Delete and Lock User]
@192 Python % ls
hello.py
@192 Python % chmod a+x hello.py
@192 Python % hello.py
zsh: command not found: hello.py
@192 Python % ./hello.py 
hello, world

在Python目录下给hello.py加了执行权限,直接运行,报错;写上路径就不报错了。为什么已经在当前目录下了,还需要加路径?


  • 1

Reply