sh
  • Usage
    • Passing Arguments
      • Keyword Arguments
    • Exit Codes & Exceptions
      • Signals
    • Redirection
      • Filename
      • File-like Object
      • Function Callback
    • Asynchronous Execution
      • Incremental Iteration
      • Background Processes
        • Output Callbacks
        • Interactive callbacks
        • Done Callbacks
    • Baking
    • Piping
      • Basic
      • Advanced
    • Sub-commands
    • Default Arguments
    • Environments
    • Input via STDIN
    • ‘With’ Contexts
  • Reference
    • Special Kwargs
      • Controlling Output
        • _out
        • _err
        • _err_to_out
        • _encoding
        • _decode_errors
        • _tee
        • _truncate_exc
      • Execution
        • _fg
        • _bg
        • _bg_exc
        • _env
        • _timeout
        • _timeout_signal
        • _cwd
        • _ok_code
        • _new_session
        • _uid
        • _preexec_fn
        • _pass_fds
        • _close_fds
      • Communication
        • _in
        • _piped
        • _iter
        • _iter_noblock
        • _with
        • _done
      • TTYs
        • _tty_in
        • _tty_out
        • _unify_ttys
        • _tty_size
      • Performance & Optimization
        • _in_bufsize
        • _out_bufsize
        • _err_bufsize
        • _internal_bufsize
        • _no_out
        • _no_err
        • _no_pipe
      • Program Arguments
        • _long_sep
        • _long_prefix
        • _arg_preprocess
      • Misc
        • _log_msg
    • Architecture Overview
      • Launch
        • Child
        • Parent
      • Running
        • Buffers
      • Exit
        • STDIN Thread Shutdown
        • STDOUT/ERR Thread Shutdown
        • Exit Code Processing
        • Done Callback
    • API
      • Command Class
      • RunningCommand Class
      • OProc Class
      • Exceptions
        • ErrorReturnCode
        • SignalException
        • TimeoutException
        • CommandNotFound
      • Helper Functions
  • Contrib Commands
    • Commands
      • Sudo
      • Git
      • SSH
    • Extending
  • Using Sudo
    • sh.contrib.sudo
      • Terminal Input
      • String Input
    • /etc/sudoers NOPASSWD
    • sh.sudo
    • _fg=True
  • Tutorials
    • Tailing a real-time log file
    • Entering an SSH password
      • SSH Contrib command
      • How you should REALLY be using SSH
  • FAQ
    • How do I execute a bash builtin?
    • Will Windows be supported?
    • How do I append output to a file?
    • Why does my command’s output have color?
    • Why is _tty_out=True the default?
    • Why doesn’t “*” work as a command argument?
    • How do I call a program that isn’t in $PATH?
    • How do I execute a program with a dash in its name?
    • How do I execute a program with a special character in its name?
    • Why not use | to pipe commands?
    • Why isn’t piping asynchronous by default?
    • How do I run a command and connect it to sys.stdout and sys.stdin?
    • Why do my arguments need to be separate strings?
    • How do I order keyword arguments?
    • How to disable pylint E1101 no-member errors?
    • How do I patch sh in my tests?
    • Why is sh just a single file?
    • How do I see the commands sh is running?
sh
  • »
  • Reference
  • View page source

Reference¶

  • Special Kwargs
    • Controlling Output
      • _out
      • _err
      • _err_to_out
      • _encoding
      • _decode_errors
      • _tee
      • _truncate_exc
    • Execution
      • _fg
      • _bg
      • _bg_exc
      • _env
      • _timeout
      • _timeout_signal
      • _cwd
      • _ok_code
      • _new_session
      • _uid
      • _preexec_fn
      • _pass_fds
      • _close_fds
    • Communication
      • _in
      • _piped
      • _iter
      • _iter_noblock
      • _with
      • _done
    • TTYs
      • _tty_in
      • _tty_out
      • _unify_ttys
      • _tty_size
    • Performance & Optimization
      • _in_bufsize
      • _out_bufsize
      • _err_bufsize
      • _internal_bufsize
      • _no_out
      • _no_err
      • _no_pipe
    • Program Arguments
      • _long_sep
      • _long_prefix
      • _arg_preprocess
    • Misc
      • _log_msg
  • Architecture Overview
    • Launch
      • Child
      • Parent
    • Running
      • Buffers
    • Exit
      • STDIN Thread Shutdown
      • STDOUT/ERR Thread Shutdown
      • Exit Code Processing
      • Done Callback
  • API
    • Command Class
    • RunningCommand Class
    • OProc Class
    • Exceptions
      • ErrorReturnCode
      • SignalException
      • TimeoutException
      • CommandNotFound
    • Helper Functions
Next Previous

© Copyright 2020, Andrew Moffat

Built with Sphinx using a theme provided by Read the Docs.