简体   繁体   English

在python中可以从中调用其他类的main方法

[英]In python is possible to call main method of other class from

Here is my programs 1.post-commit.py 2.commit-comments.py 这是我的程序1.post-commit.py 2.commit-comments.py

I need to call main method of commit-comments from post-commit.py with 5 arguements 我需要从带有5个论据的post-commit.py调用commit-comments的主要方法

Is that possible if so how can we do that 如果可以的话,那我们可以怎么做

Thanks in advance Sathishkumar 在此先感谢Sathishkumar

You can do it as this in your post-commit.py script: 您可以在post-commit.py脚本中这样做:

import commit_comments

commit_comments.main(arg1, arg2, arg3, arg4, arg5)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM