Skip to content

Use subprocess instead of os.system #1476

@davidism

Description

@davidism

There are various places, mostly in _termui_impl, that use os.system. Python has recommended using subprocess (call, Popen) instead for quite some time. Replace all occurrences of os.system with subprocess.call or Popen, passing a list of args (not a string command). This will require a bit of care since there's a few places that write command strings that can't be directly translated to args lists, and we should ensure the expected commands continue to work on Windows, Mac, and Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions