Ejemplo n.º 1
0
            self.root, ttk.Treeview, True, True)
        self.pane.add(self.treeview_scrolled)
        self.treeview.heading('#0', text='Document Tree')

        self.object_frame = tkinter.Frame(self.pane, bg='lightgrey')
        self.object_frame.grid()
        self.pane.add(self.object_frame)

        self.parent_label = tkinter.Label(
            self.object_frame, text='Key :', foreground='blue', anchor=tkinter.W)
        self.parent_label.grid(column=0, row=0)

        self.parent_name = tkinter.Entry(self.object_frame)
        self.parent_name.grid(column=1, row=0, sticky=tkinter.EW)
        self.parent_name.config(state=tkinter.DISABLED)

        self.item_text, self.item_text_scrolled = self.create_scrolled(
            self.object_frame, tkinter.Text, True, True)
        self.extend_bindtags(self.item_text)

        self.item_text_scrolled.grid(
            column=0, row=1, columnspan=2, sticky=tkinter.NSEW)

        self.grid_weights(self.object_frame, [0, 1], [0, 1])

        self.grid_weights(self.root, [0, 1], [1])


if __name__ == '__main__':
    GUIApplication.main(JSONEdit)
Ejemplo n.º 2
0
        self.context_menu = menu

    def create_widgets(self):
        self.create_menu()
        self.create_context_menu()

        self.treeview, self.treeview_scrolled = self.create_scrolled(
            self.root, ttk.Treeview, True, True)
        self.treeview_scrolled.grid(column=0, row=0, sticky=tkinter.NSEW)

        self.object_frame = tkinter.Frame(self.root, bg='lightgrey')
        self.object_frame.grid()
        self.object_frame.grid(column=1, row=0, sticky=tkinter.NSEW)

        self.item_text, self.item_text_scrolled = self.create_scrolled(
            self.object_frame, tkinter.Text, True, True)
        self.extend_bindtags(self.item_text)

        self.item_text_scrolled.grid(column=0,
                                     row=0,
                                     columnspan=2,
                                     sticky=tkinter.NSEW)

        self.grid_weights(self.object_frame, [1], [1])

        self.grid_weights(self.root, [0, 1], [1])


if __name__ == '__main__':
    GUIApplication.main(Template)
Ejemplo n.º 3
0
    def cmd_delete_phase_2(self):
        self.r.delete(self.old_key)
        self.r.bgsave()
        self.cmd_list_keys()
        self.clear_select_key()
        self.cmd_delete_finally()

    def cmd_delete_finally(self, focusOutEvent=None):
        self.object_set_as.config(state=tkinter.NORMAL)
        self.object_set.config(state=tkinter.NORMAL)
        self.object_delete.config(text='Delete')
        self.object_delete.config(command=self.cmd_delete)
        self.object_delete.unbind("<FocusOut>")

    def clear_select_key(self):
        self.key_entry.config(state=tkinter.NORMAL)
        self.key_entry.delete(0, tkinter.END)
        self.key_entry.config(state=tkinter.DISABLED)
        self.object_view.delete(1.0, tkinter.END)

    def key_index(self):
        selection = self.key_list.curselection()
        if len(selection) == 0:
            return -1
        index = int(selection[0])
        return index


if __name__ == '__main__':
    GUIApplication.main(RedisConnect)
Ejemplo n.º 4
0
			logFiles = Logging.Tee("encode", sys.stdout, captureOutput)
			sys.stdout = logFiles
			sys.stderr = logFiles
			Logging.outfile = logFiles

		if doInterpret:
			import pstats
			p = pstats.Stats('prof.log')
			p.sort_stats('time', 'cum').print_stats(.5, 'init')
			sys.exit(0)

		conf.setConfigItem("CleanExit", "General", "False")
		conf.writeSettings()
		if not app:
			import GUIApplication
			app = GUIApplication.BXDGUIApplication(0)
		toRemove = []
		if doBatch:
			app.setFilters(filterList, filterParams)
			
		for datafile in dataFiles:
			if os.path.isdir(datafile):
				toRemove.append(datafile)
		for fileToBeRemoved in toRemove:
			dataFiles.remove(fileToBeRemoved)


		if doProfile and profile:
			profile.run('app.run(dataFiles, scriptFile)', 'prof.log')
		else:
			params = {}