os.system and exitcode in Python
If you want to execute Linux command in Python code, use os.system.
For example,
import os
os.system('ls')
Above commands will show you a file list in your directory.
When it comes to exitcode, os.system('command') will give (return) you an exit value, and value 0 means success.
Thanks,
JF
For example,
import os
os.system('ls')
Above commands will show you a file list in your directory.
When it comes to exitcode, os.system('command') will give (return) you an exit value, and value 0 means success.
Thanks,
JF
댓글
댓글 쓰기