Python脚本(reindent.py)在PowerShell / cmd中不能作为Windows7中的可执行文件使用

时间:2016-02-23 17:03:10

标签: python cmd windows-7

我想重新使用一个大的python源文件,并使用windows 7 64-bitpowershellpip。 我安装了reindent pip install reindent。我可以在reindnet中看到pip freeze,我认为这个包应该可以正常工作。 但是,当我这样做 - reindent -n \path\to\file.py时,我总是被提示打开一个文件,文件的内容总是如下 -

#!c:\python27\python.exe
from reindent import main
main()

我对这种行为毫无头绪和好奇。到底发生了什么?我该如何解决这个问题?

我已使用以下条目设置系统路径变量 -

C:\Python27
C:\Python27\Scripts

另外,我可以在python<python_files>.bat上投放powershellcmd

0 个答案:

没有答案