Skip to main content

Python IDLE 汉化

Pypi 总下载量 GitHub 总下载量

支持版本: Python 3.9~3.14 的最新版本(跟随 cpython 各分支最新源码)

First Image Second Image


将 IDLE 的界面变为中文。

同时,修复了中文输入法下输入某些字母时误触发快捷键的问题。

使用方法

安装

打开您的命令提示符或终端,输入以下命令:

pip install idcn
# 如果连接速度比较慢的话,请在后边加上 -i https://mirrors.aliyun.com/pypi/simple

安装完成后,打开您的 IDLE,界面即为中文。

卸载

同样输入以下命令卸载:

pip uninstall idcn

卸载 idcn 之后您的 IDLE 将恢复原版英文。

遇到问题

如果在安装汉化之后 IDLE 闪退:

Python 版本过旧:ImportError: cannot import name '_setup_dialog` from 'tkinter.simpledialog' 遇到这个报错,是因为 Python 版本太旧。
以 Python 3.9 为例,最新的 IDLE 3.9 所使用的 _setup_dialog 函数是在 Python 3.9.5 添加的。
如果您的 Python 3.9 版本比 3.9.5 更旧,就会导致 IDLE 找不到这个函数,启动闪退。
要解决这个问题,请安装最新的 Python。(只需要小版本号最新即可,比如更新到 Python 3.9.13)
配置文件编码问题:UnicodeDecodeError: 'gbk' codec can't decode byte 0x83 in position 289 IDLE 打不开,可能是因为旧的 IDLE 配置文件的编码类型和新的(UTF-8)不一样。
只需把旧的配置文件删除,然后应该就可以打开了。
Windows:C:\Users\%username%\.idlerc 文件夹
Linux/macOS:~/.idlerc 文件夹

如果汉化仍然闪退,请将 IDLE 的报错内容和 Python 版本告诉我(创建议题 / 电子邮件),我去修复。

您可先 卸载汉化,一切应该会恢复原样。
(如果还是闪退,参考上面配置文件编码问题,删除配置文件,现在应该真的恢复原样了)

开发资料

构建指南:Build.md
测试指南:Test.md

推荐搭配 MapleMono NF CN 字体

项目进展

  • 汉化 turtledemo
  • 汉化 idlelib
  • 修复 IDLE 中文输入法误触问题
  • 制作 pip 汉化包
  • 汉化 idle 附带的文档
  • 把界面变得更现代一些

Metadata

Release files for idcn 1.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idcn 1.5.2
File Size Uploaded
idcn-1.5.2.tar.gz 3.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for idcn 1.5.2
File Interpreter ABI Platform
idcn-1.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 MB

Release files / idcn-1.5.2.tar.gz

Download URL idcn-1.5.2.tar.gz
Size 3.0 MB
Tags Source
SHA-256 checksum
How to use checksums
fd2ba38e78aee16450bb29dafc33c1e77b2b2029647abeb03548f60d87601823
BLAKE2b-256 checksum
How to use checksums
880f931792b9eaad6be652eca1d822a4c0a8a0028a5fa8ef1dfa16ca517394ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / idcn-1.5.2-py3-none-any.whl

Download URL idcn-1.5.2-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b76138889d2868f77431cfa7e31e272721fc299a6a7c7809ab610f0e75bb94ac
BLAKE2b-256 checksum
How to use checksums
4b6df94c8161dda8ded1bd98efd4ac01f370f54bafc06d9a998a13aa0158ee3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

1.5.2 This release

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.1

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page