Installing reindent python

前端 未结 3 2007
清酒与你
清酒与你 2021-01-07 11:29

I have lot of issues with Python indentation with the Notepad++. Inorder to resolve, I tried to install Python reindent module but Im unsuccessful on how to use it. If anyon

相关标签:
3条回答
  • 2021-01-07 11:59

    You're trying to run the command from the Python interpreter instead of the command line. As reindent is a script program, it needs to be run from the command line.

    You want to use either

     C:\...\> python -m reindent -d C:\Python27\wxpython\ch2-updateui.py
    

    or just

     C:\...\> reindent -d C:\Python27\wxpython\ch2-updateui.py
    

    at your command prompt.

    0 讨论(0)
  • 2021-01-07 11:59

    Try downloading this as reindent.bat in your C:\Python27\Scripts. Then it should just be a matter of reindent path\to\file.py

    0 讨论(0)
  • 2021-01-07 12:06

    I don't know anything about the package, but the command you are using indeed does not conform to Python syntax. I'd guess you need to run it in your terminal, not Python interpreter.

    0 讨论(0)
提交回复
热议问题