python
文章平均质量分 91
sbsa_lc
这个作者很懒,什么都没留下…
展开
-
IndentationError: unindent does not match any outer indentation level
Python脚本运行出现语法错误:IndentationError: unindent does not match any outer indentation level运行环境是win7 x64 sublime text2,百度发现是对齐问题。具体来说是由于有的地方使用了4个空格,有的地方使用了tab键。代码区直接全选就会看到有的地方是四个点有个地方是一个横线,改一致了转载 2017-03-29 10:25:20 · 420 阅读 · 0 评论 -
pip install PIL失败了怎么办?
pip install PIL失败了怎么办?改用:pip install pillow然后就成功了:原创 2017-03-30 23:08:54 · 893 阅读 · 0 评论 -
python3.x与python2.x的一些不同
1)input()python3.x中把 raw_input 和 input 都归结为 input()所以全部用 input() 就好了并且,input() , 输入后得到的是 str 类型 , 必要时要进行类型的强制转换2)generator 中的 next()python2.x 中 generator 的输出是 g.next() python3.x 中gener原创 2017-03-27 22:59:18 · 524 阅读 · 0 评论 -
python(os模块)
os.listdir(): 列出dirname下的目录和文件os.listdir('')和os.listdir('.'):都是指当前文件夹 os.listdir('..'):是指上一个文件夹 2)os.path.splitext(): 分离文件名与扩展名这个函数,将path分为两部分放到tuple中我们在取的时候,就用os.pa原创 2017-04-04 16:09:13 · 310 阅读 · 0 评论 -
用树莓派做魔镜
用树莓派来做魔镜 一部分内容的转载声明:我是参照http://www.tuicool.com/articles/IFnQn2U这个网站做得,并加以修改,完成了这次大作业 一、材料树莓派、原子镜(我们是用贴膜的,材料还没到,暂时不知道效果怎么样)、显示器(显示屏+对应的驱动板)、HDMI线(HDMI转VGA)、8G及以上容量内存卡、Raspbian系统、Dht11温度传感器原创 2017-05-20 22:59:43 · 21547 阅读 · 7 评论