shlex - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


shlex
NAME MODULE REFERENCE CLASSES FUNCTIONS DATA FILE
Help on module shlex:

NAME
    shlex - A lexical analyzer class for simple shell-like syntaxes.

MODULE REFERENCE
    https://docs.python.org/3.10/library/shlex.html

    The following documentation is automatically generated from the Python
    source files.  It may be incomplete, incorrect or include features that
    are considered implementation detail and may vary between Python
    implementations.  When in doubt, consult the module reference at the
    location listed above.

CLASSES
    builtins.object
        shlex

    class shlex(builtins.object)
     |  shlex(instream=None, infile=None, posix=False, punctuation_chars=False)
     |
     |  A lexical analyzer class for simple shell-like syntaxes.
     |
     |  Methods defined here:
     |
     |  __init__(self, instream=None, infile=None, posix=False, punctuation_chars=False)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __iter__(self)
     |
     |  __next__(self)
     |
     |  error_leader(self, infile=None, lineno=None)
     |      Emit a C-compiler-like, Emacs-friendly error-message leader.
     |
     |  get_token(self)
     |      Get a token from the input stream (or from stack if it's nonempty)
     |
     |  pop_source(self)
     |      Pop the input source stack.
     |
     |  push_source(self, newstream, newfile=None)
     |      Push an input source onto the lexer's input source stack.
     |
     |  push_token(self, tok)
     |      Push a token onto the stack popped by the get_token method
     |
     |  read_token(self)
     |
     |  sourcehook(self, newfile)
     |      Hook called on a filename to be sourced.
     |
     |  ----------------------------------------------------------------------
     |  Readonly properties defined here:
     |
     |  punctuation_chars
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    join(split_command)
        Return a shell-escaped string from *split_command*.

    quote(s)
        Return a shell-escaped version of the string *s*.

    split(s, comments=False, posix=True)
        Split the string *s* using shell-like syntax.

DATA
    __all__ = ['shlex', 'split', 'quote', 'join']

FILE
    /usr/lib/python3.10/shlex.py



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:15 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top