{
  "id": "python-shlex-table",
  "kind": "table",
  "slug": "python-shlex",
  "iil_id": null,
  "note_url": "https://iinventedlight.com/library/notes/python-shlex/",
  "title": "Python shlex - split shell-like strings and quote arguments safely",
  "columns": [
    "name",
    "source",
    "detail"
  ],
  "rows": [
    {
      "name": "split(s, comments=False, posix=True)",
      "source": "Python docs",
      "detail": "a list of tokens; comments are not parsed unless comments=True"
    },
    {
      "name": "join(split_command)",
      "source": "Python docs",
      "detail": "the tokens joined into one shell-escaped string, the inverse of split()"
    },
    {
      "name": "quote(s)",
      "source": "Python docs",
      "detail": "a shell-escaped version of the string, safe as one token in a shell command line"
    },
    {
      "name": "split()",
      "source": "Python docs",
      "detail": "operates in POSIX mode by default; posix=False switches to non-POSIX mode."
    }
  ],
  "related_slugs": [
    "python-argparse",
    "python-pathlib"
  ],
  "license": "CC-BY-4.0",
  "source_license": "PSF-2.0 (Python docs); PSF-2.0 (python/cpython (GitHub)); prose restates cited source lines in own words",
  "as_of": "2026-11-18",
  "status": "fill-draft-20261118",
  "note": "Restated from the note's GREEN sources; check those sources before relying on a value."
}