摘要: 参考 http://yshblog.com/blog/151 遇到的问题有: 写入时候的编码问题,将str类型转换为 unicode类型即可。 阅读全文
posted @ 2017-11-08 21:38 百变小超 阅读(1315) 评论(1) 推荐(0) 编辑
摘要: 根据json文件,读取并自动生成表格; 处理JSON的文件是将JSON串保存在js文件中,定义了一个变量名等于这个JSON串(数组)。 参考: https://my.oschina.net/TOW/blog/734589 http://www.cnblogs.com/rainlam163/p/325 阅读全文
posted @ 2017-11-07 13:04 百变小超 阅读(8418) 评论(0) 推荐(0) 编辑
摘要: 比较两个postgresql数据库,原理 比较数据库中各表的大小 1. 数据库查询语句 2. python字典比较 阅读全文
posted @ 2017-10-16 13:22 百变小超 阅读(1850) 评论(0) 推荐(0) 编辑
摘要: unrar在Linux机器中对中文的支持有漏洞 components.py 利用python 对各种格式的文件压缩 解压 操作,文件的一些操作,目录结构读成字典的形式,字典的比较方法(http://www.runoob.com/python/att-dictionary-cmp.html)。 阅读全文
posted @ 2017-10-12 13:21 百变小超 阅读(673) 评论(0) 推荐(0) 编辑
摘要: 参考 http://blog.chinaunix.net/uid-26719405-id-3450447.html 如果 /user/bin 中有 rar 删除后重新创建软连接 如果出现 “-bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF 阅读全文
posted @ 2017-10-10 01:12 百变小超 阅读(3900) 评论(1) 推荐(0) 编辑
摘要: 离线安装python库参考: http://www.cnblogs.com/michael-xiang/p/5690746.html 安装 unrar 的错误问题 参考: https://github.com/matiasb/python-unrar/blob/master/README.md ht 阅读全文
posted @ 2017-10-10 00:48 百变小超 阅读(2267) 评论(1) 推荐(0) 编辑
摘要: 在使用python读取中文目录的名称的时候,会出现中文乱码的问题,该问题很严重,因为使用os.path.isdir('乱码名称')和ospath.isfile('乱码名称')是判断不正确,都为false。 即使有时候采用 filename.decode("gbk").encode("utf-8") 阅读全文
posted @ 2017-10-09 19:18 百变小超 阅读(30055) 评论(1) 推荐(0) 编辑
摘要: 参考 http://www.developerq.com/article/1493123866 报错1: 是由于 没有设置 报错2: 会卡死在 该种方式进行交互,注意必须要换行"\n",和前面必须不能有空格等其他字符,确保密码正确 阅读全文
posted @ 2017-09-28 13:19 百变小超 阅读(4302) 评论(2) 推荐(0) 编辑
摘要: class UNRARModel: def __init__(self, filepath): self.rar = rarfile.RarFile(filepath) self.infolist = self.rar.infolist() def extral_list(self, selected_dir): selected... 阅读全文
posted @ 2017-09-25 20:31 百变小超 阅读(1189) 评论(0) 推荐(0) 编辑
摘要: class SFTPModel: def __init__(self, host, user, password): t = paramiko.Transport((host, 22)) t.connect(username=user, password=password) self.sftp = paramiko.SFTPClient.f... 阅读全文
posted @ 2017-09-25 20:29 百变小超 阅读(276) 评论(0) 推荐(0) 编辑