导入python,请帮助! [英] Imports in python, Help please!

查看:72
本文介绍了导入python,请帮助!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我从pydev下载了一个游戏,其导入内容如下所示.

Recently I downloaded a game off pydev and the imports for it look like this below.

import pygame
from pygame.locals import *



但是,我只能通过这种方式调用游戏来创建游戏.



However I have only ever created games by calling the in this way.

import pygame
import player
import enemy



我在课堂上一一叫过.

顶部的代码行有什么作用?



I have called in the class one by one.

What does the lines of code at the top do? does it call all of his classes in?

推荐答案

也许可以帮助您更好地理解它.
http://www.sthurlow.com/python/lesson09/ [
Maybe this will help you to understand it better.

http://www.sthurlow.com/python/lesson09/[^]


这篇关于导入python,请帮助!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆