-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
43 lines (29 loc) · 927 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import sys
#from parsers import *
from nitrile.latex.latex import latex
import logging
log = logging.getLogger()
verbosity =2
ch = logging.StreamHandler(sys.stdout)
if verbosity==1:
log.setLevel(logging.INFO)
ch.setLevel(logging.INFO)
elif verbosity==2:
log.setLevel(logging.DEBUG)
ch.setLevel(logging.DEBUG)
elif verbosity>=3:
log.setLevel(logging.NOTSET)
ch.setLevel(logging.NOTSET)
formatter = logging.Formatter('%(name)s:%(levelname)s:%(message)s')
ch.setFormatter(formatter)
logging.getLogger('nitrile').addHandler(ch)
errout = logging.StreamHandler(sys.stdout)
errout.setLevel(logging.WARN)
errout.setFormatter(logging.Formatter('%(message)s'))
logging.getLogger('errout').addHandler(errout)
#r = RootParser('symbols.tex')
#r = RootParser('intro.tex')
#input = latex('intro.tex',{})
input = latex('symbols.tex',{})
#print r._Parser__tolkens
#r.GetNode().pprint()