mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-12 17:48:09 +00:00
15 lines
325 B
Python
15 lines
325 B
Python
import re
|
|
import sys
|
|
|
|
|
|
def process(source, target):
|
|
re_qstr = re.compile(r"MP_QSTR_[_a-zA-Z0-9]+")
|
|
for line in source:
|
|
for match in re_qstr.findall(line):
|
|
name = match.replace("MP_QSTR_", "")
|
|
target.write(f"Q({name})\n")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
process(sys.stdin, sys.stdout)
|