![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python学习之路
文章平均质量分 93
moonclearner
这个作者很懒,什么都没留下…
展开
-
ipython
ipythoninstallipython是一个 python 的交互式 shell,比默认的python shell 好用得多,支持变量自动补全,自动缩进,支持 bash shell 命令,内置了许多很有用的功能和函数。 cd python\Scripts\ pip.exe install ipython waiting c:>ipython 进入ipython交互命令行 安装notebo转载 2016-10-22 21:40:43 · 3384 阅读 · 0 评论 -
python 使用virtualenv 出现VCRUNTIME140.dll 缺失 解决办法
使用virtualenv 创建新的python虚拟环境的时候出现了 VCRUNTIME140.dll 缺失解决办法:将python安装的根目录中的所有.dll文件复制到python根目录\Scripts\即可解决问题当在使用virtualenv 新建的虚拟环境 activate 启动后,使用python进入python环境时候出现了 VCRUNTIME140.dll 缺失解决办法将python安装原创 2016-11-23 16:03:46 · 4076 阅读 · 0 评论 -
python-link-mysql
python 使用mysqlpython API MySQL Oracle SQL Server DB APIprocedure: connection -> cusor -> … ->close cusor -> close connectioninstall python mysql connetorwin cmd 中输入 easy_install MySQL-python 或者 pip原创 2016-10-20 20:52:49 · 455 阅读 · 0 评论 -
python 错误与异常
python 错误与异常错误 语法错误 不符合解释器和编译器 逻辑错误 异常 程序遇到逻辑或者算法问题 运行过程中计算机错误(内存不够或者IO错误) 区别错误在执行前修改,逻辑错误无法修改运行时,异常产生,检查到错误且解释器认为是异常,抛出异常异常处理,截获异常,忽略或者终止程序处理异常常见的错误 a:NameError :没有在引用就使用变量 if True:SyntaxError :语法原创 2016-10-19 21:57:29 · 2723 阅读 · 0 评论 -
python_basic4
pyhton基础知识 four特殊的方法 __init__(self,…) 这个方法在新建对象恰好要被返回使用之前被调用。 __del__(self) 恰好在对象要被删除之前调用。 __str__(self) 在我们对对象使用print语句或是使用str()的时候调用。 __lt__(self,other) 当使用 小于 运算符(<)的时候调用。类似地,对于所有的运算符原创 2016-10-17 22:01:16 · 335 阅读 · 0 评论 -
python_basic3
pyhton基础知识 three面向对象的编程selfPython中的self等价于C++中的self指针和Java、C#中的this参考。创建一个类class Person: pass # An empty block p = Person() print p输出$ python simplestclass.py <__main__.Person instance at 0xf6fcb18原创 2016-10-17 22:00:36 · 492 阅读 · 0 评论 -
python_basic2
pyhton基础知识 two数据结构 列表 元组 字典 列表list = ['apple', 'mango', 'carrot', 'banana']len(list) list.append(’ ‘)list.sort()del list[0]print 'These items are:', # Notice the comma at end of the line我们在print语句的结尾使原创 2016-10-17 21:58:21 · 1148 阅读 · 0 评论 -
python_basic
python 基础知识字符串字符串可以乘法words=hel print words*3输出:helhelhel逻辑行和物理行物理行是你在编写程序时候所看见的,即每一行逻辑行是python看见的每个语句一个物理行使用多个逻辑行那么你需要使用分号(;)来特别地标明这种用法。分号表示一个逻辑行/语句的结束。例如:i=5 print i与之相同:i=5; print i;同样类似:i=5;print i;原创 2016-10-17 21:56:57 · 486 阅读 · 0 评论 -
python 正则表达式
python 正则表达式找到以imooc开头的字符串def find_start_imooc(fname): f=open(fname) for line in f: if line.startswith('imooc'): print line找以imooc开头和结尾的字符串def fine_in_imooc(fname): f=op原创 2016-10-17 21:54:59 · 1658 阅读 · 0 评论 -
Blog for django
Blog for djangorequirement django 1.10.5 markdown2 2.3.3 pygments 2.2.0 exampleIt run on tencent server ubuntu 14.04 my blog site: moonclearner.cn - first need init ngnix service(had provided ngnix co原创 2017-05-17 16:04:42 · 466 阅读 · 0 评论