我只使用emacs几天.现在我想使用emacs绘制ascii图片,我搜索艺术家模式可以做到这一点.但我不知道如何在没有gui的环境中使用这种模式.
//c struct code with filed width:
struct{
unsigned int x:1;
unsigned int y:25;
unsigned int z:6;
};
Run Code Online (Sandbox Code Playgroud)
现在我想用python重写它,打包并发送到网络,
python中的package结构体,可以打包/解包数据类型。
例如:
struct.pack('!I10s',1,'hello')
Run Code Online (Sandbox Code Playgroud)
但我不知道如何处理具有字段宽度的结构,如 c 结构示例。有人知道吗?