How to use the easygui.codebox function in easygui

To help you get started, we’ve selected a few easygui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mattb112885 / clusterDbAnalysis / gui / SingleGeneAnalysis.py View on Github external
def _get_presence_absence_table(self):
        (pa_file, pa_fname) = self._createTemporaryFile(delete=True)
        cluster = self._getClusterId()
        cmd = 'db_getPresenceAbsenceTable.py -r %s -c %s > %s 2> /dev/null' %(self.accumulated_data['runid'], cluster, pa_fname)
        print cmd
        os.system(cmd)
        pa_table = [ line.strip('\r\n').split('\t') for line in pa_file ] 
        text = self._print_readable_table(pa_table)
        easygui.codebox(text=text)
        output_file = self._save_file_dialogs(extension="txt")
        if output_file is not None:
            self._save_text(text, output_file)
            self._success_dialog(output_file)
        return True
    def _make_crude_alignment(self):
github mattb112885 / clusterDbAnalysis / gui / SingleGeneAnalysis.py View on Github external
def _make_crude_alignment(self):
        (aln_file, aln_fname) = self._createTemporaryFile(delete=True)
        cluster = self._getClusterId()
        cmd = 'makeTabDelimitedRow.py %s %s | db_makeClusterAlignment.py -m mafft_linsi -n | Gblocks_wrapper.py | db_replaceGeneNameWithAnnotation.py -a -o > %s 2> /dev/null' \
            %(self.accumulated_data['runid'], cluster, aln_fname)
        print cmd
        os.system(cmd)
        text = ''.join( [ line for line in aln_file ] )
        easygui.codebox(text=text)
        output_file = self._save_file_dialogs(extension="fasta")
        if output_file is not None:
            self._save_text(text, output_file)
            self._success_dialog(output_file)
        return True
    def _make_crude_tree(self, replacename = True):
github endolith / waveform_analysis / scripts / wave_analyzer.py View on Github external
def display(header, results):
    """
    Display header string and list of result lines
    """
    if displayer == 'easygui':
        title = 'Waveform properties'
        easygui.codebox(header, title, '\n'.join(results))
    else:
        print('No EasyGUI; printing output to console\n')
        print(header)
        print('-----------------')
        print('\n'.join(results))
github mattb112885 / clusterDbAnalysis / gui / SingleGeneAnalysis.py View on Github external
def _get_cluster_geneinfo(self):
        clusterid = self._getClusterId()
        genelist = getGenesInCluster(self.accumulated_data['runid'], clusterid, self.sqlite_cursor)
        geneinfo = getGeneInfo(genelist, self.sqlite_cursor)
        geneinfo.insert(0, self._geneInfoHeader())
        text = self._print_readable_table(geneinfo, header=True)
        easygui.codebox(text=text)
        output_file = self._save_file_dialogs(extension="txt")
        if output_file is not None:
            self._save_text(text, output_file)
            self._success_dialog(output_file)
        return True
    def _get_cluster_fasta(self, amino=True):
github decalage2 / oletools / oletools / ezhexviewer.py View on Github external
def hexview_data (data, msg='', title='ezhexviewer', length=16, startindex=0):
    hex = hexdump3(data, length=length, startindex=startindex)
    easygui.codebox(msg=msg, title=title, text=hex)
github mattb112885 / clusterDbAnalysis / gui / SingleGeneAnalysis.py View on Github external
def _get_cluster_blast(self):
        clusterid = self._getClusterId()
        genelist = getGenesInCluster(self.accumulated_data['runid'], clusterid, self.sqlite_cursor)
        blast = getBlastResultsBetweenSpecificGenes(genelist, self.sqlite_cursor)
        blast.insert(0, self._blastHeader())
        text = self._print_readable_table(blast, header=True)
        easygui.codebox(text=text)
        output_file = self._save_file_dialogs(extension="txt")
        if output_file is not None:
            self._save_text(text, output_file)
            self._success_dialog(output_file)
        return True
    def _get_cluster_geneinfo(self):
github fievelmousekewitz / EpicorAutoPilot / EpicorAutoPilot.py View on Github external
def Choice_Run_Tabanalys():
    #Run Tabanalys and clean into CSV file
    now = datetime.datetime.now()
    TabAnalysFile = PilotApp.Settings['EpicorDBDir'] + r'\TabAnalys.tmp'
    TabCSVFile = PilotApp.Settings['EpicorDBDir'] + r'\TabAnalys ' + str(now.year) + '-' + str(now.month) + '-' + str(now.day) + '.csv'
    easygui.msgbox('This may take a few, please be patient.')
    Command(PilotApp.Settings['OpenEdgeDir'] + r'\bin\proutil.bat ' + PilotApp.Settings['EpicorDBDir'] + '\\' + PilotApp.Settings['Database Name'] + ' -C tabanalys > ' + TabAnalysFile).run()
    #print PilotApp.Settings['OpenEdgeDir'] + '\\bin\\proutil.bat ' + PilotApp.Settings['EpicorDBDir'] + '\\' + PilotApp.Settings['Database Name'] + ' -C tabanalys > ' + TabAnalysFile
    tabtmp = open(TabAnalysFile)
    tabcontents = tabtmp.readlines()
    easygui.codebox('Contents','Contents',tabcontents)
    tabtmp.close()
    CleanTabAnalys(TabAnalysFile,TabCSVFile)
    easygui.msgbox('Saved csv (w/ headers) file to ' + TabCSVFile)

easygui

EasyGUI is a module for very simple, very easy GUI programming in Python. EasyGUI is different from other GUI generators in that EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by simple function calls.

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

61 / 100
Full package analysis