In [ ]:
def_lda = '''lda = {'''
field = " '#ATR':' '"
dda = 'lda'
comp = 'def_{} += field'.format(dda)
exec compile(comp, '', 'exec')
def_lda

In [ ]:
import json
from Util.warehouse import DDA
def_gda = '''gda = {'''
references = {}
dda = 'GLOBAL'
Using = 'g11111aa'
using = file(r'Convertidos\{}.txt'.format(Using)).read()
comp = 'def_{} += using'.format(DDA[dda])
exec compile(comp, '', 'exec')
filejson = file('Convertidos/{}.json'.format(Using)).read()
references.update(json.loads(filejson))
print def_gda
print references

In [ ]:
references[u'#TAB-TXT-TELA'][u'def']

In [ ]:
references[u'#TAB-TXT-TELA'][u'length']

In [ ]:
lda = {'#TELA':{'#CAMPO-ALFA': ' ', '#CAMPO-NUM': 123 }}
lda['#TELA']['#CAMPO-NUM']

In [ ]:
ancestors = ['#TELA']
ancestors.append('#CAMPO-ALFA') 
init = 123
lda = eval("""'{}'.format("['{}']" * len(ancestors))""").format(*ancestors)

In [ ]:
attrb = eval("""'{}'.format("['{}': " * len(ancestors))""").format(*ancestors)
attrb = attrb.replace('[','{').replace(']', '}')
attrb

In [ ]:
ref = eval("""'{}'.format("['{}']" * len(ancestors))""").format(*ancestors)
print ref

In [ ]:
import json
from Util.warehouse import DDA
def_lda = '''lda = {'''
references = {}
dda = 'LOCAL'
Using = 'L11111AA'
using = file(r'Convertidos\{}.txt'.format(Using)).read()
comp = 'def_{} += using'.format(DDA[dda])
exec compile(comp, '', 'exec')
filejson = file('Convertidos/{}.json'.format(Using)).read()
references.update(json.loads(filejson))
print def_lda
print references

In [20]:
i = None
print '>{}<'.format(i)


>None<