定义:`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. thymleaf th:if标签

    1.概念 <table> <tr> <th>NAME</th> <th>PRICE</th> <th>IN STOC ...

  2. ZZY的宠物(矩阵运算+快速幂)

    E :ZZY的宠物 描述 ZZY领养了一对刚刚出生的不知名小宠物..巨萌巨可爱!!...小宠物的生命为5个单位时间并且不会在中间出意外翘辫子(如: 从0出生能活到5但活不到6)..小宠物经过2个单位时 ...

  3. C#中使用TCP通信

    TCP通信需要通信双方都在线,所以需要先启动服务端进行监听,客户端才能获得连接,服务端代码: static void Main(string[] args) { TcpClient client = ...

  4. 如何利用WebClient模拟登陆CSRF控制的网站

    一般我们都是利用WebRequest这个类来向服务器进行数据的POST,不过很多情况下相应的服务器都有验证,看你是不是登陆,是不是来自同一个域,这些都简单,我们可以更改其属性来达到欺骗服务器.不过如果 ...

  5. netlink error: too many arguments to function 'netlink_kernel_create'

    2.6版本的 netlink_kernel_create(&init_net, NETLINK_TEST, 0, NULL, kernel_receive ,THIS_MODULE);   3 ...

  6. Jenkins 安装与使用--实例

    參考了博客Jenkins master在windows上安装 Jenkins的主要功能是监视反复工作的运行,比如软件project的构建详细地: *软件的持续构建和測试 本质上提供了一个易于使用的持续 ...

  7. C#应用视频教程3.3 Halcon+C#测试

    接下来我们考虑把Halcon的代码移植到C#程序上,首先找到halcon的dll(.NET类库有1.0,2.0,3.5的,如果你安装了更新版本的halcon则有更新的.NET类库,我们复制最新的dll ...

  8. hdu 2896 AC自动机模版题

    题意:输出出现模式串的id,还是用end记录id就可以了. 本题有个关键点:“以上字符串中字符都是ASCII码可见字符(不包括回车).”  -----也就说AC自动机的Trie树需要128个单词分支. ...

  9. UNIX网络编程学习笔记:值-结果(value-result)参数

    前言 当把套接口地址结构传递给套接口函数时,总是通过指针来传递的,即传递的是一个指向结构的指针.结构的长度也作为参数来传递,其传递的方式取决于结构的传递方向:从进程到内核,还是从内核到进程. 1.从进 ...

  10. ThinkPad如何修改fn键默认操作

    ThinkPad如何修改fn键默认操作 ThinkPad笔记本如何修改fn键默认操作 Fn键F1-F12