예제 #1
0
 def open_2(self, dt=0):    
     self.busy = False
     path = gui.open_file(type_list = ['yaml'])
     graphics.main_window.set_fullscreen(True)
     if path == None: return
     pyglet.clock.schedule_once(self.open_3, 0.5, path)
     self.busy = True
예제 #2
0
 def open_2(self, dt=0):    
     self.busy = False
     path = gui.open_file(type_list = resources.supported_image_formats)
     if path == None or os.path.splitext(path)[1][1:] not in resources.supported_image_formats:
         self.dialog_fail()
         return
     if not settings.settings['fullscreen']:
         self.open_3(0,path)
         return
     graphics.main_window.set_fullscreen(settings.settings['fullscreen'])
     pyglet.clock.schedule_once(self.open_3, 0.5, path)
     self.busy = True
예제 #3
0
    def examinar(self):
        filename = entrada
        wildcard = [
            "Planillas Excel (*.xlsx)|*.xlsx",
            "Archivos CSV (*.csv)|*.csv",
            "Archivos XML (*.xml)|*.xml",
            "Archivos TXT (*.txt)|*.txt",
            "Archivos DBF (*.dbf)|*.dbf",
            "Archivos JSON (*.json)|*.json",
        ]
        if entrada.endswith("xml"):
            wildcard.sort(reverse=True)

        result = gui.open_file('Abrir', 'datos', filename, '|'.join(wildcard))
        if not result:
            return
        self.paths = [result]
예제 #4
0
        
    f1 = wx.Frame(None, pos=(600, 25), size=(300, 300), title="GUI Inspector")
    f2 = wx.Frame(None, pos=(600, 350), size=(300, 300), 
                        title="GUI Property Editor")
    propeditor = PropertyEditorPanel(f2, log)
    inspector = InspectorPanel(f1, propeditor, log)
    
    # create a toolbox 
    frame = wx.Frame(None, pos=(0, 25), size=(80, 600), title="GUI Toolbox")
    tb = ToolBox(frame)

    if len(sys.argv) > 1:
        filename = sys.argv[1]
    else:
        # let the user choose the file to edit:
        filename = gui.open_file("Select the file to edit", ".", "sample.pyw")
        if not filename:
            exit()
    
    vars = {}
    if filename.endswith(".rsrc.py"):
        # load the resource file (do not bind the controller event handlers)
        objs = gui.load(filename, controller=False)
    else:
        # exec a normal python file
        execfile(filename, vars)
        root = None
        objs = vars.values()
    for value in objs:
        if not isinstance(value, gui.Window):
            continue
예제 #5
0
        
    f1 = wx.Frame(None, pos=(600, 25), size=(300, 300), title="GUI Inspector")
    f2 = wx.Frame(None, pos=(600, 350), size=(300, 300), 
                        title="GUI Property Editor")
    propeditor = PropertyEditorPanel(f2, log)
    inspector = InspectorPanel(f1, propeditor, log)
    
    # create a toolbox 
    frame = wx.Frame(None, pos=(0, 25), size=(80, 600), title="GUI Toolbox")
    tb = ToolBox(frame)

    if len(sys.argv) > 1:
        filename = sys.argv[1]
    else:
        # let the user choose the file to edit:
        filename = gui.open_file("Select the file to edit", ".", "sample.pyw")
        if not filename:
            exit()
    
    vars = {}
    if filename.endswith(".rsrc.py"):
        # load the resource file (do not bind the controller event handlers)
        objs = gui.load(filename=filename, controller=False)
    else:
        # exec a normal python file
        execfile(filename, vars)
        root = None
        objs = vars.values()
    for value in objs:
        if not isinstance(value, gui.Window):
            continue
예제 #6
0
	def choose_image(self, evt):
		self.imgfile = gui.open_file("select the file")
		print self.imgfile
		mywin['notebook']['tab_message']['filename'].value = self.imgfile
예제 #7
0
 def open(self):
     path = gui.open_file(type_list = ['yaml'])
     if path == None: return
     level.load(path)