》在DOS窗口中到Python安装路径的scripts中执行 pip install pyperclip 出现错误 》》错误提示:Fatal error in launcher: Unable to create process using '"' 》解决办法 》》在DOS根目录中执行: pytho ...
分类:
其他好文 时间:
2016-12-16 07:42:54
阅读次数:
189
我有几个项目中使用了 sentry 捕获 ERROR 级别的日志,现在遇到一个问题:本地调试的时候,日志设置中,所有的 handler(包括 root) 都只打到 console 上面,但是本地调试中未捕捉到的异常会打到线上的 sentry 上面,而捕捉到的异常就按照我的log设置走,只打到 con ...
分类:
编程语言 时间:
2016-12-16 01:00:20
阅读次数:
182
不想欠题了..... 多打打CF才知道自己智商不足啊... A. Vladik and flights 给你一个01串 相同之间随便飞 没有费用 不同的飞需要费用为 abs i-j 真是题意杀啊,,,实际上我们只考虑01转换的代价一定为1如果目的地和起点相同 费用为0 不相同 肯定为1 因为0旁边必 ...
分类:
其他好文 时间:
2016-12-15 17:31:36
阅读次数:
323
1.说起python文件操作,一定要先说python中操作文件的函数open()并根据两种打开方式说一下关于open()函数中参数encoding with open('la.txt','r',encoding='utf-8') as f: pass with open('la.txt','rb') ...
分类:
编程语言 时间:
2016-12-15 14:48:52
阅读次数:
139
w,r,wt,rt都是python里面文件操作的模式。 w是写模式,r是读模式。 t是windows平台特有的所谓text mode(文本模式),区别在于会自动识别windows平台的换行符。 类Unix平台的换行符是\n,而windows平台用的是\r\n两个ASCII字符来表示换行,python... ...
分类:
编程语言 时间:
2016-12-15 14:19:04
阅读次数:
181
1--》IndentationError:expected an indented block 》IndentationError: unindent does not match any outer indentation level 》IndentationError: unexpected i ...
分类:
编程语言 时间:
2016-12-15 11:22:20
阅读次数:
337
开一篇文章,记录关于Python有意思的用法,不断更新 1.Python树的遍历 ...
分类:
编程语言 时间:
2016-12-14 21:14:43
阅读次数:
181
# -*- encoding:utf-8 -*-import osdef SearchFile(path,text): try: files=os.listdir(path) for f in files: fl= os.path.join(path,f) if os.path.isdir(fl): ...
分类:
其他好文 时间:
2016-12-14 18:56:24
阅读次数:
154
可以在元组中放入可变类型如列表,然后修改列表来修改元组 ...
分类:
编程语言 时间:
2016-12-14 14:21:43
阅读次数:
201
1.创建mysql的alzheimer表,包括pmc_id,journal,title,abstract,name,authorinfor,pun_year,keyword,reference信息。 2.从mongodb中获取信息并且填入mysql,因为有12万条,中间可能有不正确的数据无法填入,分 ...
分类:
数据库 时间:
2016-12-14 13:43:44
阅读次数:
309