-
-
Save pythoncat1024/ad687253fec55e320f12c5fdb2dd22bd to your computer and use it in GitHub Desktop.
python执行git命令并得到结果
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def git_shell(git_command): | |
try: | |
return os.popen(git_command).read().strip() | |
except: | |
return None |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
调用示例:
给力