python学习之yummain模块
定义:`yum`的命令行接口。
- yummain.main(args)
-
Run the yum program from a command line interface.
- yummain.hotshot(func, *args, **kwargs)
-
Profile the given function using the hotshot profiler.
Parameters: func – the function to profile Returns: the return code given by the hotshot profiler
- yummain.cprof(func, *args, **kwargs)
-
Profile the given function using the cprof profiler.
Parameters: func – the function to profile Returns: the return code given by the cprof profiler
- yummain.print_stats(stats)
-
Print out information from a Stats object.
Parameters: stats – the Stats object to print information from
- yummain.user_main(args, exit_code=False)
-
Call one of the multiple main() functions based on environment variables.
Parameters: - args – command line arguments passed into yum
- exit_code – if exit_code is True, this function will exit python with its exit code when it has finished executing. Otherwise, it will return its exit code.
Returns: the exit code from yum execution
python学习之yummain模块的更多相关文章
- Python学习 Part4:模块
Python学习 Part4:模块 1. 模块是将定义保存在一个文件中的方法,然后在脚本中或解释器的交互实例中使用.模块中的定义可以被导入到其他模块或者main模块. 模块就是一个包含Python定义 ...
- python学习之argparse模块
python学习之argparse模块 一.简介: argparse是python用于解析命令行参数和选项的标准模块,用于代替已经过时的optparse模块.argparse模块的作用是用于解析命令行 ...
- Python学习day19-常用模块之re模块
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...
- Python学习day18-常用模块之NumPy
figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...
- python学习之random模块
Python中的random模块用于生成随机数.下面介绍一下random模块中最常用的几个函数. random.random random.random()用于生成一个0到1的随机符点数: 0 < ...
- Python学习笔记之模块与包
一.模块 1.模块的概念 模块这一概念很大程度上是为了解决代码的可重用性而出现的,其实这一概念并没有多复杂,简单来说不过是一个后缀为 .py 的 Python 文件而已 例如,我在某个工作中经常需要打 ...
- Python学习笔记-常用模块
1.python模块 如果你退出 Python 解释器并重新进入,你做的任何定义(变量和方法)都会丢失.因此,如果你想要编写一些更大的程序,为准备解释器输入使用一个文本编辑器会更好,并以那个文件替代作 ...
- Python学习笔记1—模块
模块的使用 引用模块的两种形式 形式一: import module_name 形式二: from module1 import module11 (module11是module的子模块) 例: ...
- Python学习笔记2——模块的发布
1.为模块nester创建文件夹nester,其中包含:nester.py(模块文件): """这是"nester.py"模块,提供了一个名为prin ...
随机推荐
- @使用javap反编译Java字节码文件
在Sun公司提供的JDK中,就已经内置了Java字节码文件反编译工具javap.exe(位于JDK安装目录的bin文件夹下). 我们可以在dos窗口中使用javap来反汇编指定的Java字节码文件.在 ...
- WebService_java编写Webservice_Axis2_1.6
最近给某省国家电网写一套系统,由于内部数据库单向隔离装置不支持ODBC, 原来c#写的webservice 和.net ,iis就需要换成java这一套... 下面是用Axis2 写的webservi ...
- 在JavaScript文件中读取properties文件的方法
假设有JavaScript文件叫做:readproperties.js,这个文件需要读取config.properties这个配置文件,步骤如下: 1. 下载插件jquery.i18n.proper ...
- cocos2d-x游戏开发 跑酷(八) 对象管理 碰撞检測
对象管理类的原理是这种: ObjectManager类是一个单例类,全局仅仅有一个对象实例存在.初始化的时候创建两个数组CCArray来保存金币和岩石.为什么要保存,由于在地图重载的时候.要销毁看不见 ...
- 【笔记】css 1像素边框
有时候在移动端显示1像素的边框时 可能因为dpi 的原因造成像素有变差 所以为了达到显示的像素达到预期效果就要编写一个css 通用类达到1像素边框的效果 关于dpi 的解释请看张鑫旭老师的文章:htt ...
- Report Studio值提示通过prompt宏函数给sql查询传参
场景:当我们在DW中新建了一个表,但是在FM中没有创建模型,想针对这个表直接做一个报表,那么就需要在reportstudio中直接用sql来查询,为了追求查询速度,我们可以把页面用户选择的条件直接传给 ...
- xcode 调试程序 lldb 使用
xcode 调试程序 lldb 使用 一:lldb是什么 https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/g ...
- Oracle 检索数据
SELECT * | { [ DISTINCT ] column | expression [ alias ] , ... } FROM ta ...
- android开发之数据库游标未关闭导致
replacements=[Ljava.lang.String;@4192fea8HARDWARE=hw7d501lmatchers=[Ljava.lang.String;@4192fe28RADIO ...
- udp套接字使用信号驱动式I/O
信号驱动式I/O的本质就是:进程预先告知内核当某个描写叙述符发生事件时,内核会向该进程发送SIGIO信号通知进程,进程可在信号处理函数中进行处理 进程能够通过fcntl打开O_ASYNC标志或ioct ...