大家好,今天小编关注到一个比较有意思的话题,就是关于python编程学习目录的问题,于是小编就整理了4个相关介绍Python编程学习目录的解答,让我们一起看看吧。
python做个小游戏,需要下哪些库,或者应用,在电脑上?
要开发哪种平台的应用比较重要。如果在是window或mac,或linux,需要的库都略有不同。pygame肯定必须,为兼容不同平台,可能还会需要对应的库,比如window的wxwindow库。
pygame就行,python平台下一个专门用于游戏开发的一个库,可以快速构建小型游戏,下面我简单介绍一下这个库的安装和使用,实验环境win10+python3.6:
1.首先,安装pygame,这个直接在cmd窗口中运行命令“pip install pygame”就行,如下,很快就能安装成功:
2.安装成功后,我们就可以进行一下简单的测试了,这里直接以官方自带的Demo示例为例,如下,直接在python的安装目录Lib->site-packages->pygame->examples中就能找到,如下:
第一个示例,alien.py这个脚本,cmd切换到examples目录,运行命令“python alien.py”就行,如下:
python安装的在哪个文件夹?
一般是安装在你的
Python.exe
所在目录下的Lib\site-packages下。(图片来源网络,侵删)需要注意的一点是,你的本机是可以同时安装多个版本的Python,因此安装的模块在哪个文件夹取决于你在使用的
Python.exe
在哪个目录最简单的方式是写入下面的代码列出你当前Python环境的搜索路径,一定程度上可以找出来安装目录在哪里,因为在你平时导入某个安装模块时,Python就是从
sys.path
中找的。
python安装的模块在哪个文件夹?
一般是安装在你的
Python.exe
所在目录下的Lib\site-packages下。需要注意的一点是,你的本机是可以同时安装多个版本的Python,因此安装的模块在哪个文件夹取决于你在使用的
Python.exe
在哪个目录最简单的方式是写入下面的代码列出你当前Python环境的搜索路径,一定程度上可以找出来安装目录在哪里,因为在你平时导入某个安装模块时,Python就是从
sys.path
中找的。python 开发 哪些大系统?
Python提供了高效的高级数据结构,还能简单有效地面向对象编程,被用于独立、大型项目的开发。
Python开发常用的库及模块比较大的如下:
1.psutil是一个跨平台库,能够实现获取系统运行的进程和系统利用率,主要用于系统监控、分析和系统***及进程的管理;
2.IPy,***IP规划;
3.DNS Python,是Python实现的一个DNS工具包;
4.difflib是Python的标准模块,无需安装,作用是对比文本之间的差异;
5.filecmp,系统自带,可以实现文件、目录、遍历子目录的差异,对比功能;
6.***tplib,发送电子邮件的模块。
到此,以上就是小编对于python编程学习目录的问题就介绍到这了,希望介绍关于python编程学习目录的4点解答对大家有用。