예제 #1
0
def open():
    application = wxPySimpleApp()
    dialog = wxFileDialog(None, style=wxOPEN)

    if dialog.ShowModal() == wxID_OK:
        print "Selected:", dialog.GetPath()
        return str(dialog.GetPath())

    # The user did not select anything

    else:
        print "Nothing was selected."
예제 #2
0
파일: file.py 프로젝트: badbytes/pymeg
def save(text=None, suffix='*', filter='*'):
    application = wxPySimpleApp()
    if text == None: text = "Select a save file name"
    dialog = wxFileDialog(None, text, os.getcwd(), suffix, filter, wxSAVE)
    l = []
    if dialog.ShowModal() == wxID_OK:
        for i in range(0, len(dialog.GetPaths())):
            l.append(str(dialog.GetPaths()[i]))
        print 'Selected:', l
        return l[0]
    else:
       print 'Nothing was choosen'
    dialog.Destroy()
예제 #3
0
파일: file.py 프로젝트: badbytes/pymeg
def open():
    application = wxPySimpleApp()
    dialog = wxFileDialog(None, "Select a file(s)", os.getcwd(), "*", "*", wxMULTIPLE)
    l = []
    if dialog.ShowModal() == wxID_OK:
        dialog.Destroy()
        for i in range(0, len(dialog.GetPaths())):
            l.append(str(dialog.GetPaths()[i]))
        print 'Selected:', l
        return l
    else:
       print 'Nothing was selected.'
    dialog.Destroy()
예제 #4
0
파일: table.py 프로젝트: lbaehren/lofarsoft
 def browse (self):
     try:
         import wxPython
     except ImportError:
         print 'wx not available'
         return
     from wxPython.wx import wxPySimpleApp
     import sys
     app = wxPySimpleApp()
     from wxtablebrowser import CasaTestFrame
     frame = CasaTestFrame(None, sys.stdout, self)
     frame.Show(True)
     app.MainLoop()
예제 #5
0
 def browse(self):
     try:
         import wxPython
     except ImportError:
         print 'wx not available'
         return
     from wxPython.wx import wxPySimpleApp
     import sys
     app = wxPySimpleApp()
     from wxtablebrowser import CasaTestFrame
     frame = CasaTestFrame(None, sys.stdout, self)
     frame.Show(True)
     app.MainLoop()
예제 #6
0
파일: fileopen.py 프로젝트: badbytes/pymeg
def open():
    
    application = wxPySimpleApp()
    #dialog = wxFileDialog ( None, style = wxOPEN )
    dialog = wxFileDialog(None, "Select a file(s)", os.getcwd(), "*", "*", wxMULTIPLE)
    l = []
    if dialog.ShowModal() == wxID_OK:
        #print 'Selected:', dialog.GetPaths()
        #return eval(str(dialog.GetPaths()))
        for i in range(0, len(dialog.GetPaths())):
            l.append(str(dialog.GetPaths()[i]))
        print 'Selected:', l
        return l

    # The user did not select anything

    else:
       print 'Nothing was selected.'

    # Destroy the dialog

    dialog.Destroy()
예제 #7
0
파일: wx1.py 프로젝트: kliegeois/progs
#! /usr/bin/env python
# -*- coding: latin-1 -*-

from wxPython.wx import wxPySimpleApp, wxFrame
app = wxPySimpleApp()
frame = wxFrame(None, -1, "Hello World")
frame.Show(1)
app.MainLoop()
예제 #8
0
파일: aksyshell.py 프로젝트: svanzoest/aksy
                 InterpClass=None, *args, **kwds):
        wx.SplitterWindow.__init__(self, parent, id, pos, size, style, name)
        self.shell = py.shell.Shell(parent=self, introText=intro,
                           locals=locals, InterpClass=Interpreter,
                           *args, **kwds)

        self.editor = self.shell
        self.notebook = wx.Notebook(parent=self, id=-1)
        #self.filling = py.filling.Filling(parent=self.notebook,
        #                       rootObject=rootObject,
        #                       rootLabel=rootLabel,
        #                       rootIsNamespace=rootIsNamespace)
        # Add aksy vars
        self.shell.interp.introText = intro
        self.shell.interp.copyright = '' 
        self.shell.interp.locals['z48'] = rootObject
        
        # Add programs, samples, multis in memory
        # self.notebook.AddPage(page=self.filling, text='Namespace', select=True)
        self.SplitHorizontally(self.shell, self.notebook, 300)
        self.SetMinimumPaneSize(1)

if __name__ == '__main__':
    app = wxPySimpleApp()
    frame = Frame(None, "Aksy")
    root = Devices.get_instance('mock_z48')
    win = AksyShell(
            frame, intro=intro, rootLabel="Z48",
            rootIsNamespace=True, rootObject=root)
    app.MainLoop()