Skip to content

Error calling os. system() command neper using Python #767

Answered by mkasemer
zhfzzz asked this question in Q&A
Discussion options

You must be logged in to vote

@kshankar7 or @EMengiste - any thoughts on the above Python command?

My use of the os package in Python is limited, but a quick google search shows examples where the command has spaces:

import os

cmd = "git --version"

returned_value = os.system(cmd)  # returns the exit code in unix
print('returned value:', returned_value)

EDIT: Is it the (seemingly) erroneous f at the beginning of your command? i.e., os.system(f'...') ?

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rquey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants