楚阿旗

博客园 首页 新随笔 联系 订阅 管理
  54 随笔 :: 1 文章 :: 0 评论 :: 5225 阅读

随笔分类 -  Python

摘要:import multiprocessing as mp import time def name_and_time(name,num): print(f"Hello {name}, current time is {time.time()} ({num})") print('Sleeping fo 阅读全文
posted @ 2020-01-27 10:42 楚阿旗 阅读(133) 评论(0) 推荐(0) 编辑

摘要:序列化 import pickle friend = {"Dan": [20, "Lodon", 123123], "Mary" : [24, "Madi", 333333]} with open("friend.dat", "wb") as f: pickle.dump(friend, f) 反序 阅读全文
posted @ 2019-12-31 09:34 楚阿旗 阅读(115) 评论(0) 推荐(0) 编辑

摘要:subnetcalc.py class SubnetCalc(object): def __init__(self, network, mask): self.network = network.split(".") self.msk = mask.split(".") @property def 阅读全文
posted @ 2019-12-27 15:41 楚阿旗 阅读(243) 评论(0) 推荐(0) 编辑

摘要:1. 下載python3的原碼 //安裝依賴包 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel 阅读全文
posted @ 2019-12-21 08:43 楚阿旗 阅读(210) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示