小编Ada*_*tav的帖子

在python进程之间传递二进制数据

我需要在linux上的python进程之间有效地传输二进制数据.但是我找不到用管道传递它的方法.我得到的最接近的是将其作为字符串传递,但由于某种原因它保留了二进制形式,因此它给我带来了问题.

ciphertext, tag = cipher1.encrypt_and_digest(input().encode())
print(ciphertext)
Run Code Online (Sandbox Code Playgroud)

密文是二进制的,但是当我在另一个进程中测试它的类型时

print(type(sys.stdin.read()))
Run Code Online (Sandbox Code Playgroud)

我明白了

<class 'str'>
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

python pipe python-3.x

4
推荐指数
1
解决办法
378
查看次数

Why mov ax, [[num] + val] isn't the same as breaking it to instructions

I need to use a pointer to an array and put the third value in ax. My solution:

mov bx, [chrs_ptr]
add bx, 2
mov ax,[bx]
Run Code Online (Sandbox Code Playgroud)

But I couldn't figure out why mov ax, [[chrs_ptr] + 2] gives me the pointer value.

x86 assembly emu8086

1
推荐指数
2
解决办法
77
查看次数

具有多个字符C#的运算符

我需要创建一个具有多个charecter的运算符,因为我希望代码更具可读性和更多关联性.例如:

public static bool operator !&(bool a, bool b)
    {
        return ((a == true && b == true) || (a == false && b = false));
    }
Run Code Online (Sandbox Code Playgroud)

c#

-7
推荐指数
1
解决办法
91
查看次数

标签 统计

assembly ×1

c# ×1

emu8086 ×1

pipe ×1

python ×1

python-3.x ×1

x86 ×1