
python
monkey315
这个作者很懒,什么都没留下…
展开
-
python格式化输出
原文 http://www.cnblogs.com/JerySpace/archive/2010/12/17/1909621.html在python中也有类似于c中的printf()的格式输出标记。在python中格式化输出字符串使用的是%运算符,通用的形式为格式标记字符串 % 要输出的值组其中,左边部分的”格式标记字符串“可以完全和c中的一致。右边的'值组'如果有两个转载 2016-07-19 17:06:19 · 986 阅读 · 0 评论 -
大文件处理异常定位
每次循环都print, 或则写log,非常影响效率设置一个全局变量,异常是打印出行号python 为例(只是思路):import traceback, sysi = 1000try: for i in range(-1000000000, 100000000): i = 1/iexcept Exception, e: print i原创 2017-09-08 11:54:17 · 290 阅读 · 0 评论 -
添加公钥到known_hosts文件
ssh-keyscan host https://superuser.com/questions/971766/adding-a-public-key-to-known-hosts-fileManual page for sshd(8) describes the format of known_hosts file:Each line in these files原创 2017-12-30 09:19:39 · 23617 阅读 · 0 评论