def wxapp_converter(): """Standalon application.""" app = awx.App() frame = ConverterFrame(None) frame.Show() app.SetTopWindow(frame) return app
def wxapp_showfiles(filenames=None, dirpath=None, walk=True, wildcard=None): """ Standalone applications that reads the content of the files specified in input and show them in a notebook. Args: filenames: List of files to show in the notebook. Defaults to an empty list. dirpath: Directory to scan for additional files. walk: Used only if dirpath is not None. If True, we scan all the files contained within dirpath and we add them to the list if their name match the regular expression given in wildcard. wildcard: String with regular expressions separated by |. Only the files matching one of the regular expressions will be showed. example: wildcard="*.nc|*.txt" shows only the files whose extension is in ["nc", "txt"]. Returns: `wxpython` application. """ app = awx.App() frame = TextNotebookFrame.from_files_and_dir(None, filenames=filenames, dirpath=dirpath, walk=walk, wildcard=wildcard) frame.Show() return app
def wxapp_comparison(dirpaths=None, filepaths=None, wildcard=None): app = awx.App() frame = ComparisonFrame(None, dirpaths=dirpaths, filepaths=filepaths, wildcard=wildcard) frame.Show() return app
def wxapp_listbrowser(dirpaths=None, filepaths=None, wildcard=""): """Standalone application ListBroweser.""" app = awx.App() frame = FileListFrame(None, dirpaths=dirpaths, filepaths=filepaths, wildcard=wildcard) frame.Show() return app
def wxapp_dirbrowser(dirpath): """Standalone application.for DirBrowser.""" if dirpath is None: dirpath = " " else: dirpath = os.path.abspath(dirpath) app = awx.App() frame = DirBrowserFrame(None, dir=dirpath) frame.Show() return app
def wxapp_structure_converter(obj): """ Standalong WX application for structure conversion. Args: obj: Structure object, filename or object with a structure attribute. """ app = awx.App() frame = StructureConverterFrame(None, obj) app.SetTopWindow(frame) frame.Show() return app
def wxapp_scissors(filepath): app = awx.App() ScissorsBuilderFrame(None, filepath).Show() return app
def wxapp_flow_viewer(works): """Standalone application for `FlowViewerFrame`.""" app = awx.App() FlowViewerFrame(None, works).Show() return app
def wxapp_fftprof(): """Stand alone application.""" app = awx.App() frame = FFTProfFrame(None) frame.Show() return app
Only the files matching one of the regular expressions will be showed. example: wildcard="*.nc|*.txt" shows only the files whose extension is in ["nc", "txt"]. Returns: `wxpython` application. """ app = awx.App() frame = TextNotebookFrame.from_files_and_dir(None, filenames=filenames, dirpath=dirpath, walk=walk, wildcard=wildcard) frame.Show() return app if __name__ == "__main__": app = awx.App() frame = EditorNotebookFrame() #frame = wx.Frame(None, -1) #notebook = EditorNotebook(frame) for filename in ["editor.py", "__init__.py"]: frame.bufferCreate(filename=filename) #Editor(frame) frame.Show() #frame = EditorFrame() #frame.bufferCreate(file.path) #frame = EditorNotebookFrame(filename=file.path) app.MainLoop()