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 ...
随机推荐
- eclipse 中添加自定义 classpath 的方法,以及 javac 和 java 的一些使用细节
目标: 将 ~/java 加入classpath eclipse: 右键选中 Project, Properties, Java Build Path, Libraries, Add External ...
- tyvj 2075 借教室 题解
P2075 [NOIP2012T5]借教室 时间: 1000ms / 空间: 131072KiB / Java类名: Main 背景 noip2012-tg 描述 在大学期间,经常需要租借教室.大到院 ...
- OpenCV学习(13) 细化算法(1)
程序编码参考经典的细化或者骨架算法文章: T. Y. Zhang and C. Y. Suen, "A fast parallel algorithm for thinning digita ...
- OpenCV中图像融合
准备2副背景图像,注意图像黑色的部分,是作为mask用的,我们会用灰度图的方式打开它们,这时黑色的部分值为0,则图像融合时候,可以把第二幅图像在黑色的部分显示出来. 代码非常简单,注意就是图 ...
- C#模拟MSN窗体抖动
C#模拟MSN窗体抖动 窗体抖动是件很有意思的事情,就让我们看看一起来看看它的原理吧. 其实是生成随机数,然后改变Form的左上角的坐标.我用的是循环来弄得,其实可以用timer来控制. 我把抖动分成 ...
- 文本相似性计算总结(余弦定理,simhash)及代码
最近在工作中要处理好多文本文档,要求找出和每个文档的相识的文档.通过查找资料总结如下几个计算方法: 1.余弦相似性 我举一个例子来说明,什么是"余弦相似性". 为了简单起见,我们先 ...
- Android4.2.2 Gallery2源码分析(5)——GLCanvasImpl.java
GLCanvasImpl.java是接口GLCanvas的唯一实现类,也就是说二者在功能上完全等同.代码中调用GLCanvas对象函数的地方,等效于调用GLCanvasImpl中的该函数,GLCanv ...
- 浅析GitLab Flow的十一个规则
使用 Git 版本控制,是对使用它之前的所有版本控制方式的一种改进.然而,很多组织最终以太过混乱或过于复杂的流程来结束.这个问题对于刚从其他版本控制系统转过来的组织来说特别突出. 在本文中我们会列出 ...
- hdoj5645DZY Loves Balls
Problem Description DZY loves playing balls. He has n balls in a big box. On each ball there is an i ...
- CSDN日报20170404 ——《不不过写代码,而是完毕作品》
[程序人生]不不过写代码,而是完毕作品 作者:瞬息之间 近来有人问起,如今似乎真得变成了码农,日出而作,日落而息.整天不停的写代码,开发业务需求,周而复始,日子长了,感到厌倦. 有时回忆,应该在过去的 ...