我之前提出的问题是从未得到过回复,但我现在有更具体的内容,所以希望你能提供帮助.
基本上,SendKeys库似乎只能在我的32位Windows系统上安装...
所以我想知道是否有一种方法可以实现,所以我要编写的这个函数只能在32位系统上执行?我意识到有一个platform.architecture()方法来检查当前系统,但它返回字符串"('64bit','WindowsPE')".
我想知道是否有办法读取此字符串的64位部分,以使此功能正常工作.
例如,伪代码:
checker = platform.architecture()
system = strip or read 64 bit from checker string somehow
if system == 64 bit
then warn system is 64 bit and won't run function
else run function
Run Code Online (Sandbox Code Playgroud)
沿着那条线.除非有更简单的方法检查它 - 可能与使用的Python版本(即32或64位)
希望我已经正确地理解了这一点 - 我对编程仍然很陌生.:)