Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要创建一个具有一些值的变量,并将该值提供给 python 脚本一个衬里 ( python -c "...") 以处理该变量,并将其返回到相同或其他变量中。
python -c "..."
我怎样才能用键盘大师做到这一点?
来自 KeyboardMaestro 的变量可以通过os.environ['KMVAR_...'];访问。%Variable% 以os.environ['KMVAR_Variable']. 对于输出,如果您使用“执行文本脚本”,您还可以控制 Python 解释器的输出的定向方式。
os.environ['KMVAR_...']
os.environ['KMVAR_Variable']