python学习之yummain模块

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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学习之argparse模块

python学习之argparse模块

Python学习之MySQLdb模块

python学习之模块:xlsxwriter

python学习之模块补充二

Python模块学习之IPy模块