Exemplo n.º 1
0
import os
import tkinter as tk
from itertools import cycle
# https://pillow.readthedocs.io/en/3.0.x/handbook/tutorial.html
# https://pillow.readthedocs.io/en/stable/installation.html
# Pillow and PIL cannot co-exist in the same environment. Before installing Pillow, please uninstall PIL.
# Pillow >= 1.0 no longer supports “import Image”. Please use “from PIL import Image” instead.
from PIL import Image, ImageTk
from subprocess import call

import GUI_IO_util

GUI_size = '1000x600'

GUI_util.set_window(GUI_size, '', '', '')

window = GUI_util.window
'''
    OPTIONS FOR GRID https://www.tutorialspoint.com/python/tk_grid.htm
    This view uses Grid for layout. There are six columns in total. 
    Use widget.grid(row, column, rowspan=1, columnspan=1, padx=0, pady=0) for view layout
    where:
        row          The horizontal (x) position of the widget
        column       The vertical (y) position of the widget
        columnspan   The width of the widget, where columnspan=1 takes up 1/6 of the window width
                     and columnspan=6 takes up the whole window width
        rowspan      The height of the widget
        padx/pady    The horizontal/vertical padding around each widget
        sticky − What to do if the cell is larger than widget. 
                By default, with sticky='', widget is centered in its cell. 
Exemplo n.º 2
0
# The 6 values of config_option refer to:
#   software directory
#   input file
# 1 for CoNLL file
# 2 for TXT file
# 3 for csv file
# 4 for any type of file
# 5 for txt or html
# 6 for txt or csv
#   input dir
#   input secondary dir
#   output file
#   output dir
config_option = [0, 2, 1, 0, 0, 1]

GUI_util.set_window(GUI_size, GUI_label, config_filename, config_option)

# GUI CHANGES add following lines to every special GUI
# +3 is the number of lines starting at 1 of IO widgets
y_multiplier_integer = GUI_util.y_multiplier_integer + 2
window = GUI_util.window
config_input_output_options = GUI_util.config_input_output_options
config_filename = GUI_util.config_filename
inputFilename = GUI_util.inputFilename
input_main_dir_path = GUI_util.input_main_dir_path

GUI_util.GUI_top(config_input_output_options, config_filename)

# if GUI_util.softwareDir.get()=='':
#     GUI_util.select_softwareDir_button.config(state='disabled')
Exemplo n.º 3
0
# Written by Yuhang Feng November 2019
# Edited by Roberto Franzosi
import sys
import GUI_util
import IO_libraries_util
if IO_libraries_util.install_all_packages(GUI_util.window, "Excel_charts.py",
                                          ['os', 'tkinter']) == False:
    sys.exit(0)
import tkinter.messagebox as mb
import tkinter as tk
import GUI_util
import GUI_IO_util
import IO_files_util
import IO_user_interface_util
import Excel_util
import IO_csv_util
# RUN section ______________________________________________________________________________________________________________________________________________________

def run(input_file_name, output_dir, openOutputFiles, selected_series,
        column_xAxis_label_var, column_yAxis_label_var, count_var,
        column_yAxis_field_list, second_y_var, second_y_var_list,
        second_yAxis_label_var, chart_type, chart_type_list, chart_title,
        hover_var_list, hover_info_column_list):
    filesToOpen = []  # Store all files that are to be opened once finished
    if len(chart_type) == 0:
        mb.showwarning(
            title='Chart type error',
            message=
            "No chart type was specified (e.g., line, bubble). The chart cannot be created. Please, select a chart type and try again!"
        )