【发布时间】:2016-11-05 12:36:23
【问题描述】:
我希望将我的可执行文件放在子文件夹中:
$ tree
.
├── bin
│ ├── exec.py
│ ├── method1
│ │ ├── exec1.py
│ │ └── exec2.py
│ └── method2
│ ├── exec1.py
│ └── exec2.py
如果我在 PATH 中包含 bin/ 文件夹,有没有办法从我的 shell 脚本(位于另一个目录中)访问可执行文件,例如
$ method1/exec1.py arg1 arg2
上面的命令报错(没有这样的文件或目录),但是
$ exec.py arg1 arg2
有效,因为它不在子文件夹中。
请告知我如何在子文件夹中组织可执行文件。谢谢。
【问题讨论】:
标签: python bash path directory-structure project-structure