Home
Sign Up
Sign In
推荐学习书目
›
Learn Python the Hard Way
Python Sites
›
PyPI
- Python Package Index
›
http://diveintopython.org/toc/index.html
›
Pocoo
值得关注的项目
›
PyPy
›
Celery
›
Jinja2
›
Read the Docs
›
gevent
›
pyenv
›
virtualenv
›
Stackless Python
›
Beautiful Soup
›
结巴中文分词
›
Green Unicorn
›
Sentry
›
Shovel
›
Pyflakes
›
pytest
Python 编程
›
pep8 Checker
Styles
›
PEP 8
›
Google Python Style Guide
›
Code Style from The Hitchhiker's Guide
V2EX
›
Python
python2 中 import Tkinter 和 tkinter 什么区别?
oldbird
·
Mar 18, 2024
· 4245 views
This topic created in 960 days ago, the information mentioned may be changed or developed.
看教程都说 py2 应该用 import Tkinter ,试了下发现 import tkinter 也可以,请问这两种 import 在实际开发时是否有区别?
import
Tkinter
Tkinter
4 replies
•
2024-03-18 19:43:37 +08:00
aloxaf
Mar 18, 2024
1
我猜是因为你的文件系统不区分大小写,你试一下 import TkIntER 是不是也没问题
oldbird
OP
Mar 18, 2024
2
@
aloxaf
不行,只能是 tkinter 或者 Tkinter 。Win10 系统,python 2.7.18 。
Tink
Mar 18, 2024
3
Python 2 里面 Tkinter 引入不区分大小写,3 不行,必须小写
ClericPy
Mar 18, 2024
4
python3 要做的就是消去这种歧义, 老版本问题忽略吧, 要么直接用 3 , 要么自己写好测试
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
2900 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 24ms ·
UTC 13:20
·
PVG 21:20
·
LAX 05:20
·
JFK 08:20
♥ Do have faith in what you're doing.
❯