Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Get Command Line Arguments In Python

python
import sys 
  
  total_arguments = len(sys.argv)

  print(f"Number of arguments: {total_arguments}")
  print(f"Argument List: {sys.argv}")

#+RESULTS : : Number of arguments : 1 : Argument List : ['']

TODO : write up how the args work where the python executable is always in the first spot (and verify that's the case even if you call it with something like ` bash - c `