摘要: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
阅读全文
随笔分类 - Python
摘要:序列化 import pickle friend = {"Dan": [20, "Lodon", 123123], "Mary" : [24, "Madi", 333333]} with open("friend.dat", "wb") as f: pickle.dump(friend, f) 反序
阅读全文
摘要:subnetcalc.py class SubnetCalc(object): def __init__(self, network, mask): self.network = network.split(".") self.msk = mask.split(".") @property def
阅读全文
摘要:1. 下載python3的原碼 //安裝依賴包 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel
阅读全文