Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving from using 'os.system(...)' #39

Open
tjones79 opened this issue Mar 20, 2024 · 0 comments
Open

Moving from using 'os.system(...)' #39

tjones79 opened this issue Mar 20, 2024 · 0 comments
Assignees

Comments

@tjones79
Copy link
Collaborator

Using os.system to run commands, copy files etc... is generally not a good idea. os.system() does not provide complete or in a few cases, the correct exit status of a program that has crashed. For example, if you are trying to copy a file, and it fails, it will simply return a '1' exit code without telling you exactly why it failed.

There are specific packages built to run shell commands, such as 'shutils' and 'subprocess', we should make use of these instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant