利用notepda++查看/修改python文件缩进(IndentationError: unexpected indent python)

今天在线上部署api,测试时候python突然报错:IndentationError: unexpected indent python. 在网上查了一下,了解到报错的原因是缩进问题。

下面为大家介绍一下如何通过notepad++查看以及修改py文件的缩进。

查看缩进:View → Show Symbol → Show White Space and TAB

修改缩进:Edit → Blank Operations → TAB to Space

1)查看缩进


发现py文件确实存在缩进问题


2)修改缩进


修改后的py文件:


猜你喜欢

转载自blog.csdn.net/lz_peter/article/details/79403884
今日推荐