Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
python问题求助
社区开发
1135
views ·
5
replies ·
To
floor
Go
biewenyu
deepin
2016-03-05 19:52
Author
我正在学习python,写了一个小脚本,但是运行时出现了这样的问题
代码在此
,恳请大神们指教。。。
Reply
Like 0
Favorite
View the author
All Replies
biewenyu
deepin
2016-03-05 20:29
#1
而用pycharm则可以运行
Reply
Like 0
View the author
u855697021
deepin
2016-03-05 20:46
#2
在pygame.init()之前print(dir(pygame))一下试试看...
很明显错误原因是模块中没有init这个方法嘛,我想traceback和error message说的很清楚了...
Reply
Like 0
View the author
Feng Yu
deepin
2016-03-05 21:03
#3
不要把你的代码名字命名成pygame.py,否则import pygame实际是import你自己的代码,而不是pygame这个类库。
明显你的基础知识欠佳
Reply
Like 0
View the author
biewenyu
deepin
2016-03-05 22:27
#4
对。。。3楼说的对。。大神受教了。。Python放了很长时间没学,最近又拿出来
Reply
Like 0
View the author
biewenyu
deepin
2016-03-05 22:29
#5
不不不,是4楼
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
Nuntia - Modern IMAP/SMTP mail client for Deepin (Beta tester wanted!)
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
Adding a Dancing Spectrum Bar to the Deepin Taskbar | deepin-spectrum
Popular Events
More
代码在此