Note
Go to the end to download the full example code. or to run this example in your browser via JupyterLite or Binder
Usingsys.argv
in examples#
This example demonstrates the use of sys.argv
in example .py
files.
By default, all example .py
files will be run by Sphinx-Gallery without any arguments. Notice below that sys.argv
is a list consisting of only the file name. Further, any arguments added will take on the default value.
This behavior can be changed by using the reset_argv option in the sphinx configuration, see Passing command line arguments to example scripts.
sys.argv: ['/home/circleci/project/examples/plot_7_sys_argv.py'] parsed args: Namespace(option='default')
Total running time of the script: (0 minutes 0.235 seconds)
Estimated memory usage: 193 MB
Gallery generated by Sphinx-Gallery
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4