def test_window(self): """Test window creation.""" log.log_setup() # Start logging. app = gu.MainWindow(None, 'hello') # Creates a text window containing the word 'hello'. app.title('Analysis') app.grid_config() # Set up a text object widget in the grid. app.colourise_text(app.raw, 'snow', 'blue', 'highlight') # Colour the text blue with a white background and highlights. app.mainloop()
def test_scrollbar(self): """Test the scrollbar works.""" log.log_setup() # Start logging. app = gu.MainWindow(None, 'hello' * 1000) # Creates a text window containing the word 'hello'. app.title('Analysis') app.grid_config() # Set up a text object widget in the grid. app.text.insert(tk.END, app.raw) app.scrollbar() app.mainloop()
def test_wordcolour(self): """Test highlighting words in a given colour.""" log.log_setup() # Start logging. text = 'I was about to go shopping, but it was raining. So I decided to stay at home instead.' app = gu.MainWindow(None, text) app.title('Prose analysis') app.grid_config() ws = wc.WordSet(text) app.highlight_words('was', ws) app.mainloop()
"""Main execution file.""" import log import gui_windows as gu import gui_startscreen as sc import spacy as sp log.log_setup() # Start logging. print('test') sph = sc.StartScreen(None) sph.title('Loading...') sph.iconbitmap(r'icons//clay_icon.ico') sph.start_grid_config() sph.update() import gui_windows as gu sph.update() #sph.after(3000, start_mainscreen) core = sp.load("en_core_web_md") # Load in the medium sized dataset (may take a moment). sph.destroy() app = gu.MainWindow(None, core) # Creates an empty text window. app.title('clay') app.iconbitmap(r'icons//clay_icon.ico')