diff options
| author | Tim Peters <tim.peters@gmail.com> | 2001-01-17 08:48:39 +0000 |
|---|---|---|
| committer | Tim Peters <tim.peters@gmail.com> | 2001-01-17 08:48:39 +0000 |
| commit | 9d16f67d9e947bc9da237e0347e60ce6991a1ada (patch) | |
| tree | b22614038c9da9aaf5489c3a446e4859f194fa90 /Lib | |
| parent | db733a769ab01e863fcb494eea47f2eff1004e65 (diff) | |
| download | cpython-9d16f67d9e947bc9da237e0347e60ce6991a1ada.tar.gz | |
Whitespace normalization.
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/shlex.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/shlex.py b/Lib/shlex.py index 2d7d68a79a..d90a0b9dc4 100644 --- a/Lib/shlex.py +++ b/Lib/shlex.py @@ -1,14 +1,14 @@ """A lexical analyzer class for simple shell-like syntaxes.""" -# Module and documentation by Eric S. Raymond, 21 Dec 1998 +# Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 -# push_source() and pop_source() made explicit by ESR, January 2001. +# push_source() and pop_source() made explicit by ESR, January 2001. import os.path import sys class shlex: - "A lexical analyzer class for simple shell-like syntaxes." + "A lexical analyzer class for simple shell-like syntaxes." def __init__(self, instream=None, infile=None): if instream: self.instream = instream @@ -101,7 +101,7 @@ class shlex: self.lineno = self.lineno + 1 if self.debug >= 3: print "shlex: in state", repr(self.state), \ - "I see character:", repr(nextchar) + "I see character:", repr(nextchar) if self.state is None: self.token = '' # past end of file break @@ -136,14 +136,14 @@ class shlex: if nextchar == self.state: self.state = ' ' break - elif not nextchar: # end of file + elif not nextchar: # end of file if self.debug >= 2: print "shlex: I see EOF in quotes state" # XXX what error should be raised here? raise ValueError, "No closing quotation" elif self.state == 'a': if not nextchar: - self.state = None # end of file + self.state = None # end of file break elif nextchar in self.whitespace: if self.debug >= 2: @@ -194,7 +194,7 @@ class shlex: return "\"%s\", line %d: " % (infile, lineno) -if __name__ == '__main__': +if __name__ == '__main__': if len(sys.argv) == 1: lexer = shlex() else: |
