python3学习手册⑤内置类属性 __dict__ #类的属性,一个字典,由类的数据属性组成 __doc__ #类的文档字符串 __name__ #类名 __module__ #类定义所在的模块 __bases__ #类的所有父类,一个元组 ⑥析构函数 __del__(self) #析构方法,在对象销毁时被调用 ★python解释器查找模块顺序 python解释器会去哪里找要导入的模块呢? 1,首先查找sys.modules字典里的模块(这是以前导入的所有模块的缓 存) 2,然后匹配内置的模块sys.buil�n_module_names 3,最后根据sys.path路径下去找(包含有程序当前路径;pip安装的包 在"site-packages"目录下) 都找不到就报错ModuleNotFoundError # python2 py两个模块,main.py只是用于测试 的主函数 现在需要把cof.py及lee.py打包成一个安装包 在我们的源程序目录下再创建一个setup.py文件,内容如下: from distutils.core import setup setup(name='cof', version="1.0", py_modules=['cof', 'lee'], # 要打包的模块名0 码力 | 213 页 | 3.53 MB | 1 年前3
DevOps MeetupProduct Ops Product Management Every technology under the sun Solaris, Windows, Linux Apache, IIS, TCServer, etc. Oracle, DB2, SQL Server How we got better We read and we studied.0 码力 | 2 页 | 246.04 KB | 5 月前3
k8s操作手册 2.3conf <core unlimited * hard core unlimited * so� memlock unlimited * so� memlock unlimited * 0 码力 | 126 页 | 4.33 MB | 1 年前3
安全简介practices at enterprise scale Synchronizes alignment, collaboration and delivery for large numbers teams Core values: Code quality - can't scale crappy code Program execution Alignment Transparency0 码力 | 2 页 | 304.16 KB | 5 月前3
The DevOps HandbookOpen Source Software: 2. Foreword xix 3. Imagine a World Where Dev and Ops Become DevOps: a. THE CORE, CHRONIC CONFLICT i. Among them are the two following goals, which must be pursued simultaneously:0 码力 | 8 页 | 22.57 KB | 5 月前3
postgresql操作手册ad.postgresql.org/pub/repos/yum/13/redhat/rhel-$releasev er-$basearch enabled=1 gpgcheck=0 # yum module disable postgresql -qy # yum install postgresql13-server -y # /usr/pgsql-13/bin/postgresql-13-setup0 码力 | 17 页 | 445.84 KB | 1 年前3
共 6 条
- 1













