--- /tmp/sphinxcontrib-programoutput-0.16-1gedcygd1/debian/python-sphinxcontrib.programoutput-doc_0.16-1_all.deb +++ python-sphinxcontrib.programoutput-doc_0.16-1_all.deb ├── file list │ @@ -1,3 +1,3 @@ │ -rw-r--r-- 0 0 0 4 2020-04-16 07:33:15.000000 debian-binary │ -rw-r--r-- 0 0 0 1228 2020-04-16 07:33:15.000000 control.tar.xz │ --rw-r--r-- 0 0 0 26836 2020-04-16 07:33:15.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 26832 2020-04-16 07:33:15.000000 data.tar.xz ├── control.tar.xz │ ├── control.tar │ │ ├── ./md5sums │ │ │ ├── ./md5sums │ │ │ │┄ Files differ ├── data.tar.xz │ ├── data.tar │ │ ├── file list │ │ │ @@ -16,19 +16,19 @@ │ │ │ -rw-r--r-- 0 root (0) root (0) 328 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/documentation_options.js │ │ │ -rw-r--r-- 0 root (0) root (0) 286 2020-02-17 15:00:30.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/file.png │ │ │ -rw-r--r-- 0 root (0) root (0) 10847 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/language_data.js │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2020-02-17 15:00:30.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/minus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 90 2020-02-17 15:00:30.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/plus.png │ │ │ -rw-r--r-- 0 root (0) root (0) 4395 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/pygments.css │ │ │ -rw-r--r-- 0 root (0) root (0) 4323 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/genindex.html │ │ │ --rw-r--r-- 0 root (0) root (0) 38331 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/index.html │ │ │ +-rw-r--r-- 0 root (0) root (0) 38334 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/index.html │ │ │ -rw-r--r-- 0 root (0) root (0) 363 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/objects.inv │ │ │ -rw-r--r-- 0 root (0) root (0) 3593 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/py-modindex.html │ │ │ -rw-r--r-- 0 root (0) root (0) 3279 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/search.html │ │ │ --rw-r--r-- 0 root (0) root (0) 4848 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/searchindex.js │ │ │ +-rw-r--r-- 0 root (0) root (0) 4849 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/searchindex.js │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc-base/ │ │ │ -rw-r--r-- 0 root (0) root (0) 394 2020-04-16 07:33:15.000000 ./usr/share/doc-base/sphinxcontrib-programoutput-doc │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/doctools.js -> ../../../../javascript/sphinxdoc/1.0/doctools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/jquery.js -> ../../../../javascript/sphinxdoc/1.0/jquery.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/searchtools.js -> ../../../../javascript/sphinxdoc/1.0/searchtools.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/sidebar.js -> ../../../../javascript/sphinxdoc/1.0/sidebar.js │ │ │ lrwxrwxrwx 0 root (0) root (0) 0 2020-04-16 07:33:15.000000 ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/_static/underscore.js -> ../../../../javascript/sphinxdoc/1.0/underscore.js │ │ ├── ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/index.html │ │ │ @@ -126,15 +126,15 @@ │ │ │

System Message: ERROR/6 (/build/sphinxcontrib-programoutput-lAnMDq/sphinxcontrib-programoutput-0.16/doc/index.rst, line 106)

│ │ │

Command 'python --help' failed: [Errno 2] No such file or directory: 'python'

│ │ │ │ │ │ │ │ │
│ │ │

Command execution and shell expansion

│ │ │

Normally the command is splitted according to the POSIX shell syntax (see │ │ │ -shlex), and executed directly. Thus special shell features like │ │ │ +shlex), and executed directly. Thus special shell features like │ │ │ expansion of environment variables will not work:

│ │ │
.. command-output:: echo "$USER"
│ │ │  
│ │ │
│ │ │
$ echo "$USER"
│ │ │  $USER
│ │ │  
│ │ │ @@ -142,24 +142,24 @@ │ │ │

To enable these features, enable the shell option. With this option, the │ │ │ command is literally passed to the system shell:

│ │ │
.. command-output:: echo "$USER"
│ │ │     :shell:
│ │ │  
│ │ │
│ │ │
$ echo "$USER"
│ │ │ -buildd
│ │ │ +builduser
│ │ │  
│ │ │
│ │ │

Other shell features like process expansion consequently work, too:

│ │ │
.. command-output:: ls -l $(which grep)
│ │ │     :shell:
│ │ │  
│ │ │
│ │ │
$ ls -l $(which grep)
│ │ │ --rwxr-xr-x 1 root root 198976 Jan 29 09:31 /bin/grep
│ │ │ +-rwxr-xr-x 1 root root 198976 Jan 29  2020 /bin/grep
│ │ │  
│ │ │
│ │ │

Remember to use shell carefully to avoid unintented interpretation of shell │ │ │ syntax and swallowing of fatal errors!

│ │ │
│ │ │
│ │ │

Error handling

│ │ │ @@ -170,15 +170,15 @@ │ │ │ indicate an error. In some cases however, it may be reasonable to demonstrate │ │ │ failed programs. To avoid a (superfluous) warning in such a case, you can │ │ │ specify the expected return code of a command with the returncode option:

│ │ │
.. command-output:: python -c 'import sys; sys.exit(1)'
│ │ │     :returncode: 1
│ │ │  
│ │ │
│ │ │ -

The above command returns the exit code 1 (as given to sys.exit()), │ │ │ +

The above command returns the exit code 1 (as given to sys.exit()), │ │ │ but no warning will be emitted. On the contrary, a warning will be emitted, │ │ │ should the command return 0!

│ │ │
│ │ │

Note

│ │ │

Upon fatal errors which even prevent the execution of the command neither │ │ │ return code nor command output are available. In this case an error message │ │ │ is inserted into the document instead.

│ │ │ @@ -194,15 +194,15 @@ │ │ │

Reference

│ │ │
│ │ │
│ │ │ .. program-output:: command
│ │ │

Include the output of command in the documentation.

│ │ │

The output is formatted as literal text, without any syntax highlighting.

│ │ │

By default, the command is split according to the POSIX shell syntax (using │ │ │ -shlex.split()), and executed directly. Both standard output and │ │ │ +shlex.split()), and executed directly. Both standard output and │ │ │ standard error are captured from the invocation of command and included │ │ │ in the document. However, if the option shell is given, command is │ │ │ literally passed to the system shell. With the nostderr option, │ │ │ standard error is hidden from the output.

│ │ │

The working directory of the command can be configured with the cwd │ │ │ option. The argument of this option is a directory path, relative to the │ │ │ current source file. Absolute paths are interpreted as relative to the │ │ ├── ./usr/share/doc/python-sphinxcontrib.programoutput-doc/html/searchindex.js │ │ │ ├── js-beautify {} │ │ │ │ @@ -103,15 +103,15 @@ │ │ │ │ binari: 0, │ │ │ │ block: 0, │ │ │ │ both: 0, │ │ │ │ branch: 0, │ │ │ │ bsd: 0, │ │ │ │ bug: 0, │ │ │ │ build: 0, │ │ │ │ - buildd: 0, │ │ │ │ + buildus: 0, │ │ │ │ busi: 0, │ │ │ │ calledprocesserror: 0, │ │ │ │ can: 0, │ │ │ │ caption: 0, │ │ │ │ captur: 0, │ │ │ │ carefulli: 0, │ │ │ │ caus: 0,