@abul4fia/

RequiredDimpledUsers

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
atb_rootlayout = {"width":"","height":"","background-color":""}
atb_region = {"id":"","top":"","bottom":"", "left":"", "right":""}
atb_img = {"src":"", "region":"", "begin":"", "dur":""}
atb_audio = {"src":"", "begin":"", "dur":""}
atb_textstream = {"src":"", "region":""}
etiquetas ={"root-layout": atb_rootlayout,"region": atb_region,
                  "img": atb_img,"audio": atb_audio, 
                  "textstream": atb_textstream}        

def inEtiqueta(name, attrs):
    if name in etiquetas:
        for atb in etiquetas[name]:
            etiquetas[name][atb] =attrs.get(atb, "")

print(etiquetas)

inEtiqueta("NoExiste", "hola")
print(etiquetas) # Sale lo mismo de antes

inEtiqueta("region", {"top": 10, "bottom": 20})
print(etiquetas) # Ha cambiado