Package fcp :: Module pseudopythonparser :: Class Parser
[hide private]
[frames] | no frames]

Class Parser

source code

Instance Methods [hide private]
 
__init__(self)
Reads config files in Pseudo-Python-Syntax.
source code
 
parse(self, text) source code
 
jsonload(self, text) source code
 
checkandprocessunprocessed(self)
Check if the rest of self.unprocessed finishes the line.
source code
 
readline(self, line)
Read one line of text.
source code
Properties [hide private]
  unparsedstring
Join and return self.unparsed as a string.
Method Details [hide private]

__init__(self)
(Constructor)

source code 

Reads config files in Pseudo-Python-Syntax.

>>> p = Parser()
>>> p.parse("a = 1")
{'a': 1}
>>> p = Parser()
>>> p.parse("b = [1,2,3,'a']")
{'b': [1, 2, 3, u'a']}
>>> p = Parser()
>>> p.parse('''c = [ { 'a': 1,
...   'b': "c",
...   'd': [1, 2, 3, None, False, True, "e"]}]
...   ''')
{'c': [{u'a': 1, u'b': u'c', u'd': [1, 2, 3, None, False, True, u'e']}]}

Property Details [hide private]

unparsedstring

Join and return self.unparsed as a string.

Get Method:
unreachable.unparsedstring(self) - Join and return self.unparsed as a string.