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 ...
随机推荐
- Echarts的legend改变图例图标为自定义图片
当折线图时,legend默认时rect形式,如果需要改图例形状,可以自己设置legend的icon属性 legend: { icon:'stack' }, 1.自定义每个图例样式:为data的每个对象 ...
- Python——管理属性(1)
管理属性 这里将展开介绍前面提到的[属性拦截]技术.包含下面内容: [1]__getattr__和__setattr__方法.把没有定义的属性获取和全部的属性赋值指向通用的处理器方法 [2]__get ...
- [Algorithm] Dynamic programming: Find Sets Of Numbers That Add Up To 16
For a given array, we try to find set of pair which sums up as the given target number. For example, ...
- [Grunt] Uglify
Grunt Uglify to compress your javascript for production deployment. Install npm install grunt-contri ...
- Codeforces Round #250 (Div. 1) D. The Child and Sequence
D. The Child and Sequence time limit per test 4 seconds memory limit per test 256 megabytes input st ...
- 用CSS下划线距离
但在我在CSS中新加了TEXT-DECORATION: underline; 后发现下划线离文本太近了,很难看. 代码一: a { text-decoration: none; background: ...
- Struts2漏洞分析,漏洞波及全系版本
Struts漏洞分析 Apache Struts团队已经发布了Struts 2.3.15.1安全更新版本.在Struts2.3.15.1版本之前,存在着严重的安全漏洞,如果现在一些比较大的网站是 ...
- 微信小程序 - 贝塞尔曲线(购物车效果)
转载来源于:https://segmentfault.com/a/1190000011710786 简化了一下,发出来吧 示例源码:点击下载
- java 和 C# 响应输出的相似度
java servlet response: bf.append("Shipment No, STT No, WIN Event, DateTime, WOU Envent, DateTim ...
- UNIX网络编程读书笔记:名字与地址转换
概述 在名字和数值地址间进行转换的函数: gethostbyname和gethostbyaddr:在主机名字与IPv4地址之间进行转换.仅仅支持IPv4. getservbyname和getservb ...