“python”
从源码编译安装 python
从源码编译程序的好处是可以使用最新版本,下面介绍如何在 Linux 下编译安装 python 和 pip 环境。下载源码包python 官网:https://www.python.org/当前最...
使用 subprocess.check_output 执行cmd命令并返回结果到字符串
语法:subprocess.check_output(args, *, stdin=None, stderr=None, shell=False, universal_newlines=Fals...
argparse and struct in python
https://docs.python.org/3/library/argparse.htmlhttps://docs.python.org/3/library/struct.html
string <-> byte in python
To transform a unicode string to a byte string in Python do this:>>> 'foo'.encode('utf_8...
hex <-> str in python
str to hex:import codecs hexlify = codecs.getencoder('hex') hexlify(b'Blaah')[0]out:b'426c616168'...