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 代码,如果它们已安装,它将为我提供 IntelliJ IDEA 或 PyCharm exe 的路径。
通常,我想为 Eclipse 检测到相同的情况,但似乎 Eclipse 没有安装程序:(
安装路径保存在注册表中: HKEY_CURRENT_USER\JetBrains\IntelliJ IDEA\<build number>\(Default)
HKEY_CURRENT_USER\JetBrains\IntelliJ IDEA\<build number>\(Default)
(如果需要 PyCharm 安装路径,请用 PyCharm 替换 IntelliJ IDEA)
您可以使用 _winreg 模块来读取注册表并检索路径。