定义:`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模块的更多相关文章

  1. Python学习 Part4:模块

    Python学习 Part4:模块 1. 模块是将定义保存在一个文件中的方法,然后在脚本中或解释器的交互实例中使用.模块中的定义可以被导入到其他模块或者main模块. 模块就是一个包含Python定义 ...

  2. python学习之argparse模块

    python学习之argparse模块 一.简介: argparse是python用于解析命令行参数和选项的标准模块,用于代替已经过时的optparse模块.argparse模块的作用是用于解析命令行 ...

  3. Python学习day19-常用模块之re模块

    figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...

  4. Python学习day18-常用模块之NumPy

    figure:last-child { margin-bottom: 0.5rem; } #write ol, #write ul { position: relative; } img { max- ...

  5. python学习之random模块

    Python中的random模块用于生成随机数.下面介绍一下random模块中最常用的几个函数. random.random random.random()用于生成一个0到1的随机符点数: 0 < ...

  6. Python学习笔记之模块与包

    一.模块 1.模块的概念 模块这一概念很大程度上是为了解决代码的可重用性而出现的,其实这一概念并没有多复杂,简单来说不过是一个后缀为 .py 的 Python 文件而已 例如,我在某个工作中经常需要打 ...

  7. Python学习笔记-常用模块

    1.python模块 如果你退出 Python 解释器并重新进入,你做的任何定义(变量和方法)都会丢失.因此,如果你想要编写一些更大的程序,为准备解释器输入使用一个文本编辑器会更好,并以那个文件替代作 ...

  8. Python学习笔记1—模块

    模块的使用 引用模块的两种形式 形式一: import module_name 形式二: from module1 import module11   (module11是module的子模块) 例: ...

  9. Python学习笔记2——模块的发布

    1.为模块nester创建文件夹nester,其中包含:nester.py(模块文件): """这是"nester.py"模块,提供了一个名为prin ...

随机推荐

  1. [Android 新特性] 15项大改进 Android 4.4新特性解析

    腾讯数码讯(编译:刘沙) 终于,Android系统迎来了久违的重大更新——Android 4.4 KitKat,并与新旗舰Nexus 5同时问世.那么,新的系统究竟都有怎样的改进.是否值得升级呢,下面 ...

  2. 谈谈Copy-on-Write容器

    1.简介 Copy-On-Write简称COW,是一种用于程序设计中的优化策略.其基本思路是,从一开始大家都在共享同一个内容,当某个人想要修改这个内容的时候,才会真正把内容Copy出去形成一个新的内容 ...

  3. GPGPU OpenCL使用结构体数据

    OpenCL编程中可以使用结构体,只需要在核函数kernel中提供同样的结构体申明就可以啦. 如果在主函数中定义了结构体: typedef struct studentNode{ int age; f ...

  4. 使用工具将安卓Android apk应用转换成Bar BlackBerry 10格式

    首先要强调的是命令行工具使用起来虽然比较方便,但是对使用者有一定要求.而使用在线的网页进行转换虽然步骤比较多,但是操作比较简单.所以,对于初步接触的同学来讲,建议还是使用上一篇博文的在线转换工具比较好 ...

  5. Android -- ContentProvider与联系人

    数据库                                                                                         读联系人 raw ...

  6. 解决.NET 调用JAVA WEBService服务中文乱码问题

    主要代码如下: String input ="中文" C#调用代码:  String str = System.Text.Encoding.GetEncoding("UT ...

  7. linux查看当前shell的方法

    这篇文章主要对比一下 source 命令执行shell文件和 ./ping.sh 这种方式执行shell文件的区别. 1. source   ping.sh 这个是在当前的shell 中执行 ping ...

  8. 转:sublime2 官方网址

    1. sublime2 官方网址 http://www.sublimetext.com/2

  9. QPS、RT、PV、UV之间的关系

    QPS: 每秒查询率(Query Per Second) ,每秒的响应请求数,也即是最大吞吐能力. QPS = req/sec = 请求数/秒 QPS统计方式 [一般使用 http_load 进行统计 ...

  10. 百度地图API拾取坐标网址

    http://api.map.baidu.com/lbsapi/getpoint/index.html