GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • 5.11.1 shlex Objects

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — 5.11 shlex -- Simple lexical analysis

Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 5.10.1 Cmd Objects Up: 5. Miscellaneous Services Next: 5.11.1 shlex Objects

5.11 shlex -- Simple lexical analysis

New in version 1.5.2.

The shlex class makes it easy to write lexical analyzers for simple syntaxes resembling that of the Unix shell. This will often be useful for writing minilanguages, e.g. in run control files for Python applications.

shlex ([stream[, file]])
A shlex instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to read characters from. It must be a file- or stream-like object with read() and readline() methods. If no argument is given, input will be taken from sys.stdin. The second optional argument is a filename string, which sets the initial value of the infile member. If the stream argument is omitted or equal to sys.stdin, this second argument defaults to ``stdin''.

See Also:

Module ConfigParser:
Parser for configuration files similar to the Windows .ini files.


Subsections
  • 5.11.1 shlex Objects


Previous Page Up One Level Next Page Python Library Reference Contents Module Index Index
Previous: 5.10.1 Cmd Objects Up: 5. Miscellaneous Services Next: 5.11.1 shlex Objects

See About this document... for information on suggesting changes.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.