Im making GUI with PyGTK. Im stuck with updating content in gtk.TreeView(), its reading from json. I want to add a new position in json and update the set_model(new content). I will update the file from three places (add content, delete content, rename content). So problem occurs when the changing is made in different modules. Don't know how to access the set_model from another module, so when I change the content the gtk.ScrolledWindow (it is placed in gtk.Window) it displays the updated content. I think the problem is associated with autorefreshing(timer?) or iterating (forgot the names of functions) but not for sure. When the whole program was in one class it was easy to implement changes but hard to read, now (many modules) it is easy to read but hard to maintain. I will appreciate any answer.
Update:
class Catalogs(object):
def _init_(self):
self.the_tree = gtk.TreeView()
<read from json>
self.new_list.append(output from json)
self.the_tree.set_model(self.new_list)
print'new_list content will be printed but not displayed in window'
self.window = gtk.ScrolledWindow()
self.window.add(self.the_tree)