文章分类 -  python

摘要:使用工具pyinstaller 1.工具安装: pip install pyinstaller 2.执行命令 pip install pyinstaller 2.执行命令 pip install pyinstaller 2.执行命令 pyinstaller yourprogram.py 在执行目录下 阅读全文
posted @ 2017-12-01 10:36 hyu9999 阅读(87) 评论(0) 推荐(0)
摘要:1.format 2.zfill 3.rjust 阅读全文
posted @ 2017-11-21 15:35 hyu9999 阅读(72) 评论(0) 推荐(0)
摘要:import osfrom PIL import Image, ImageChopsdef compare_images(path_one, path_two): image_one = Image.open(path_one) image_two = Image.open(path_two) tr 阅读全文
posted @ 2017-11-21 15:26 hyu9999
摘要:import osfrom PIL import Image, ImageChopsdef compare_images(path_one, path_two): image_one = Image.open(path_one) image_two = Image.open(path_two) tr 阅读全文
posted @ 2017-11-13 17:53 hyu9999 阅读(194) 评论(0) 推荐(0)
摘要:# 遍历远程文件目录def list_remote_dir(sftp, remote_dir): all_files = [] files = sftp.listdir_attr(remote_dir) for x in files: filename = remote_dir + '/' + x. 阅读全文
posted @ 2017-11-13 14:24 hyu9999 阅读(530) 评论(0) 推荐(0)
摘要:time.isoformat(timespec='auto') 返回表示ISO 8601格式的时间的字符串,HH:MM:SS.mmmmmm,如果微秒为0,HH:MM:SS。 如果utcoffset()不返回None,则会附加6个字符的字符串,给出UTC(签名)小时和分钟的偏移量:HH:MM:SS.m 阅读全文
posted @ 2017-10-11 14:06 hyu9999 阅读(1602) 评论(0) 推荐(0)
摘要:以下是C标准(1989版本)要求的所有格式代码的列表,并且这些在具有标准C实现的所有平台上工作。 请注意,1999版本的C标准增加了附加的格式代码。 Sun, Mon, ..., Sat (en_US); So, Mo, ..., Sa (de_DE) Sun, Mon, ..., Sat (en_ 阅读全文
posted @ 2017-10-11 13:56 hyu9999 阅读(1404) 评论(0) 推荐(0)
摘要:.datetime # datetime.datetime(xxx)参数: MINYEAR <= year <= MAXYEAR, 1 <= month <= 12, 1 <= day <= number of days in the given month and year, 0 <= hour 阅读全文
posted @ 2017-10-11 11:45 hyu9999 阅读(130) 评论(0) 推荐(0)
摘要:注册地址 https://www.jiguang.cn/ 注册界面 登录并创建应用 应用信息 阅读全文
posted @ 2017-09-22 14:11 hyu9999 阅读(105) 评论(0) 推荐(0)
摘要:兼容版本 Python 2.7 Python 3 环境配置 pip 方式: 代码样例 代码样例在 jpush-api-python-client 中的 examples 文件夹中,点击查看所有 examples 。 以下片断来自项目代码里的文件:jpush-api-python-client 中的 阅读全文
posted @ 2017-09-22 13:57 hyu9999 阅读(759) 评论(0) 推荐(0)
摘要:*args 和 **kwargs 主要用于函数定义。 你可以将不定数量的参数传递给一个函数。 这里的不定的意思是:预先并不知道, 函数使用者会传递多少个参数给你, 所以在这个场景下使用这两个关键字。 *args 是用来发送一个非键值对的可变数量的参数列表给一个函数. 这里有个例子帮你理解这个概念: 阅读全文
posted @ 2017-09-13 17:39 hyu9999 阅读(83) 评论(0) 推荐(0)
摘要:您可以通过使用itertools包中的itertools.chain.from_iterable轻松快速的辗平一个列表。下面是一个简单的例子: 阅读全文
posted @ 2017-09-13 16:29 hyu9999 阅读(194) 评论(0) 推荐(0)