python - 如何将“get (gcf, 'currentchar') ~= ' '” 从 Matlab 转换为 Python?
问题描述
我正在尝试将 Matlab 程序转换为 Python。这是 Matlab 代码的开头:
while get(gcf, 'currentchar') ~= ' '
if get(gcf,'currentchar')=='r'
我已经看到我需要导入我所做的 matplotlib.pyplot,但我未能在 Python 中找到与 Matlab 'currentchar' 等效的东西。“获取”部分也是如此。我猜Matlab程序的目标是检测打开当前图形时使用了哪个键并采取相应的行动(当使用一个键时,如果使用的键是“r”,那么做[...])
你知道如何翻译这个吗?
解决方案
推荐阅读
- c++ - C++ 在使用 goto 语句第二次调用时忽略 getline()
- aspnetboilerplate - Asp.Net Zero (Asp.Net Boilerplate framework) 当应用程序部署到带有负载平衡器的 IIS 时,会话用户为空
- javascript - UnhandledPromiseRejectionWarning: SequelizeUnknownConstraintError: 未知约束错误
- laravel - 由于 ssl 证书,laravel 电子邮件验证在生产中不起作用
- amazon - Amazon PA API 5.0 和闪购价格,我能拿到最低价吗?
- mongodb - Mongodb Kafka Connector如何查看多个集合
- google-apps-script - 如何在不知道文件 ID 的情况下使用文件名访问 Google 驱动器文件?
- makefile - 具有多个目标的 Makefile:MAKECMDGOALS 优惠待遇
- python - 未显示以 NaN Y 轴值开始或结束的散景图
- c - 如何检查数组的元素是否为特殊字符?