{"library":"mozshellutil","title":"mozshellutil","description":"MozShellUtil is a Python library providing shell command line parsing utilities for Mozilla testing. It offers functionality to parse and execute shell commands in a cross-platform manner, handling quotes, variables, and subprocess launching. The current version is 1.0.0, with a requirement of Python >=3.8. The library is maintained by the Mozilla community and released as needed.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install mozshellutil"],"cli":null},"imports":["from mozshellutil import Shell","from mozshellutil import Command"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mozshellutil import Shell, Command\n\nshell = Shell()\n# Run a simple command\nresult = shell.run(Command(['echo', 'hello']))\nprint(result.stdout)  # b'hello\\n'\n\n# With arguments and environment\nenv = {'MY_VAR': 'value'} if os.environ.get('TEST') else {}\nresult = shell.run(Command(['printenv', 'MY_VAR'], env=env))\nprint(result.returncode)","lang":"python","description":"Creates a Shell instance to run Command objects. Each Command specifies the executable and arguments, and optionally an environment. The run method returns a CompletedProcess-like object.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}