摘要: import threading import inspect import ctypes def _async_raise(tid, exc_type): """raises the exception, performs cleanup if needed""" if not inspect.isclass(exc_type): raise TypeErr... 阅读全文
posted @ 2017-08-14 15:29 stone_wl 阅读(1522) 评论(1) 推荐(0) 编辑
摘要: import socket import struct if __name__ == '__main__': ip = '127.0.0.1' int_ip = struct.unpack('!I', socket.inet_aton(ip))[0] print(int_ip) str_ip = socket.inet_ntoa(struct.pack('!I'... 阅读全文
posted @ 2017-08-14 15:24 stone_wl 阅读(2293) 评论(0) 推荐(0) 编辑