摘要: 今天使用PYthon时,发现错误 ImportError: No module named sqlite 这是因为缺少 SQLITE3的缘故。 下面分享一下解决此问题的方法步骤: 1. 查看是Python是否有该库 使用http://django-china.cn/topic/413/ 查看自己Py 阅读全文
posted @ 2018-01-25 23:39 yanzi_meng 阅读(24011) 评论(1) 推荐(0) 编辑
摘要: 我用的centos7.2,系统自带python2.7。 我自己装了python3.5,但在导入sqlite3这个包的时候出现找不到包的错误。 下面给出解决方法。 第一种: 检查自己有没有安装sqlite-devel,没有的话yum -y install sqlite-devel 然后进入到Pytho 阅读全文
posted @ 2018-01-25 23:38 yanzi_meng 阅读(2391) 评论(0) 推荐(0) 编辑
摘要: 先上代码: 代码挺简单的,但是这一点代码也有可能达不到预期效果。 一开始,在readWrite()函数中,我用的是注释掉的那些代码,没有用红色部分代码,结果点击“读写”按钮后,还是不可编辑。于是就改成了红色部分代码,结果再点击“读写”按钮就可以编辑了。 总结了一下,当达不到预期效果时,可以使用以下几 阅读全文
posted @ 2018-01-25 18:16 yanzi_meng 阅读(412) 评论(0) 推荐(0) 编辑
摘要: <body> <input id="t1" type="button" value='fff'> <input id="t2" type="button" value='fff'> <input id="t3" type="button" value='fff'> <input id="t4" ty 阅读全文
posted @ 2018-01-25 12:54 yanzi_meng 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 示例: var num1=3.3; var num2=7.17; var ret=parseFloat(num1)+parseFloat(num2); //ret的值为:10.469999999999998 这是JS对浮点型数据运算时,个别比较特殊的数字存在bug,可能是计算机对二进制处理的问题。 阅读全文
posted @ 2018-01-24 17:43 yanzi_meng 阅读(189) 评论(0) 推荐(0) 编辑
摘要: Jinja2用法总结 一:渲染模版 要渲染一个模板,通过render_template方法即可。 @app.route('/about/') def about(): # return render_template('about.html',user='username') return rend 阅读全文
posted @ 2018-01-24 17:41 yanzi_meng 阅读(33035) 评论(0) 推荐(0) 编辑
摘要: python3内置函数大全 内置函数 (1)abs(), 绝对值或复数的模 1 print(abs(-6))#>>>>6 (2)all() 接受一个迭代器,如果迭代器的所有元素都为真,那么返回True,否则返回False 1 print(all([1,0,3,6]))#>>>>False (3)an 阅读全文
posted @ 2018-01-24 11:10 yanzi_meng 阅读(792) 评论(0) 推荐(0) 编辑
摘要: python内置函数大全 python内建函数 最近一直在看python的document,打算在基础方面重点看一下python的keyword、Build-in Function、Build-in Constants、Build-in Types、Build-in Exception这四个方面,其 阅读全文
posted @ 2018-01-24 11:09 yanzi_meng 阅读(1223) 评论(0) 推荐(0) 编辑
摘要: 转载请注明出处http://write.blog.csdn.net/mdeditor 目录 目录 前言 安装Python-279 解决YUM与Python279的兼容问题 前言 CentOS 6.5中预安装了Python-2.6.6,其比较新的Python-2.7.9(CentOS 7预装版本)主要 阅读全文
posted @ 2018-01-24 00:25 yanzi_meng 阅读(4279) 评论(0) 推荐(0) 编辑
摘要: 在CentOS以及其他的Linux系统中遇到安装包安装错误的原因,大多数都是因为缺少依赖包导致的,所以对于错误:zipimport.ZipImportError: can’t decompress data,是因为缺少zlib 的相关工具包导致的,知道了问题所在,那么我们只需要安装相关依赖包即可, 阅读全文
posted @ 2018-01-24 00:21 yanzi_meng 阅读(193) 评论(0) 推荐(0) 编辑