Python script (reindent.py) not working as executa

2019-04-15 02:41发布

问题:

I want to reindent a big python source file, and using windows 7 64-bit, powershell, and pip. I installed reindent with pip install reindent. I can see reindnet in pip freeze, and I suppose the package should work fine. But, when I do - reindent -n \path\to\file.py, I am always prompted to open a file, and the content of the file is always as follows -

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

I am bit clueless and curious about this behavior. What exactly is happening here? How do I solve this?

I have set System Path variables with following entries-

C:\Python27
C:\Python27\Scripts

Also, I can run python and <python_files>.bat on powershell and cmd.