I'm using libdmtx to read 2D codes from png files with this code:
#!/usr/bin/python
import os
import Tkinter
from Tkinter import *
from tkFileDialog import askopenfilename
top = Tkinter.Tk()
top.geometry("200x200")
content = StringVar()
label = Message( top, textvariable=content, width='180' )
content.set ("Choose file to read 2D code")
label.pack()
def selector():
filename = askopenfilename()
cmd = "dmtxread -n %s" % (filename)
res = Text(top)
res.insert (INSERT, os.system(cmd))
res.pack()
B = Tkinter.Button(top, text ="Choode file", command = selector)
B.pack()
top.mainloop()
Everything work fine, but in GUI I can't get a full output. There's just 0, but in console I get what is in 2D code. What should I do to get full output in GUI?