摘要: 一、打印相对路径 print(__file__) 二、打印绝对路径 import os print(os.path.abspath(__file__)) 三、打印文件名 import os print(os.path.dirname(os.path.abspath(__file__))) 阅读全文
posted @ 2018-07-28 22:44 Presley 阅读(8528) 评论(0) 推荐(0) 编辑
摘要: 一、模块:用一坨代码实现了某个功能的代码集合。 二、模块分为三种 1、自定义模块 2、内置标准模块(又称标准库) 3、开源模块(上传方式,百度PyPi) 开源模块安装方式: a、yum b、pip c、apt-get d、下载源码,然后解压,然后进入目录,然后编译安装: python setup.p 阅读全文
posted @ 2018-07-28 12:23 Presley 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 引用自:https://www.cnblogs.com/sch01ar/p/8552295.html 阅读全文
posted @ 2018-07-28 09:09 Presley 阅读(147) 评论(0) 推荐(0) 编辑