
如上图所示:
我想实现:双击 command.command 文件自动运行 manage.py,需要在 command 文件里怎么写?
当前情况:在 command 文件里只写了 python manage.py 。
分析:需要 command 文件运行的时候能够获取当前正在运行的 command 文件的路径;类似于 python 的 sys.path[0] 或者 os.path.basename[file]的效果。 补充之后的 command 文件内容应该类似于:
"""
cd 当前 command 文件路径;
python manage.py
"""
但是目前 google 许久,没有找到类似的终端命令 求大神相助。。。。。。
