parameters: (self)
return_statement: return raw
docstring: Get a token from the input stream (or from stack if it's nonempty)
docstring_summary: Get a token from the input stream (or from stack if it's nonempty)
docstring_tokens: Get a token from the input stream ( or from stack if it s nonempty )
function: def get_token(self):
          "Get a token from the input stream (or from stack if it's nonempty)"
          if self.pushback:
              tok = self.pushback.popleft()
              if self.debug >= 1:
                  print("shlex: popping token " + repr(tok))
              return tok
          # No pushback.  Get a token.
          raw = self.read_token()
          # Handle inclusions
          if self.source is not None:
              while raw == self.source:
                  spec = self.sourcehook(self.read_token())
                  if spec:
                      (newfile, newstream) = spec
                      self.push_source(newstream, newfile)
                  raw = self.get_token()
          # Maybe we got EOF instead?
          while raw == self.eof:
              if not self.filestack:
                  return self.eof
              else:
                  self.pop_source()
                  raw = self.get_token()
          # Neither inclusion nor EOF
          if self.debug >= 1:
              if raw != self.eof:
                  print("shlex: token=" + repr(raw))
              else:
                  print("shlex: token=EOF")
          return raw
function_tokens: def get_token ( self ) : if self . pushback : tok = self . pushback . popleft ( ) if self . debug >= 1 : print ( "shlex: popping token " + repr ( tok ) ) return tok # No pushback.  Get a token. raw = self . read_token ( ) # Handle inclusions if self . source is not None : while raw == self . source : spec = self . sourcehook ( self . read_token ( ) ) if spec : ( newfile , newstream ) = spec self . push_source ( newstream , newfile ) raw = self . get_token ( ) # Maybe we got EOF instead? while raw == self . eof : if not self . filestack : return self . eof else : self . pop_source ( ) raw = self . get_token ( ) # Neither inclusion nor EOF if self . debug >= 1 : if raw != self . eof : print ( "shlex: token=" + repr ( raw ) ) else : print ( "shlex: token=EOF" ) return raw