IndentationError: unexpected indent python
来源:互联网 发布:esp8266单片机51程序 编辑:程序博客网 时间:2024/05/16 08:30
在CentOS 6.3 64bit上一个没有配置好的vim中,修改了一个python脚本,运行时就反复报错,说
IndentationError: unexpected indent python
怎么调整格式都不对,这才真正领教了python格式对齐的厉害。没方法只好用xshell将该文件转到原来的Ubuntu 14.04下面,使用配置好的vim编辑。
在修改并保存后,有错误的地方,vim直接就报出来了。
解决方法:
没有处理好tab和空格的关系,使用配置好的vim编写python就可以了。
在vim中需要配置如下设置就可以了:
set tabstop=4 "tab width
set shiftwidth=4 "indent width
set expandtab "expand tab to space
0 0
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- python:IndentationError: unexpected indent
- IndentationError: unexpected indent python
- IndentationError: unexpected indent python
- Python的IndentationError: unexpected indent
- python错误:IndentationError: unexpected indent
- python报"IndentationError: unexpected indent"
- Python错误IndentationError: unexpected indent
- python的IndentationError: unexpected indent python
- python报"IndentationError: unexpected indent"的解决方法.
- python报错:IndentationError: unexpected indent
- Python编程错误之IndentationError: unexpected indent
- Python 报错:IndentationError: unexpected indent
- IndentationError: unexpected indent python格式问题
- python报"IndentationError: unexpected indent"的解决方法.
- 黑马程序员——基础学习(十一)集合框架
- 文章标题
- Android资源布局文件命名规范
- 由快速排序引出的第k大的数..
- ACM--常识问题
- IndentationError: unexpected indent python
- 算法竞赛入门经典例题-并查集
- JAVA – 虚函数、抽象函数、抽象类、接口
- 关于方法的介绍
- 使用jcaptcha插件生成验证码
- Windows OS 下我做为开发人员常用的一些软件
- 深度学习之在iOS上运行CNN
- UVA - 1422 Processor
- QQ输入密码的时候 键盘自动输入 (系统为win8)