Skip to content

Instantly share code, notes, and snippets.

View israel-dryer's full-sized avatar

Israel Dryer israel-dryer

View GitHub Profile
@israel-dryer
israel-dryer / wordwrap_example.py
Last active September 5, 2020 08:45
How to disable word-wrap in PySimpleGUI output
import PySimpleGUI as sg
# create output element
output = sg.Output(size=(50, 15))
# button to initiate text printing
button = sg.Button('Print long text', key='-BTN-')
# set the layout
layout = [[output], [button]]
@israel-dryer
israel-dryer / simple_clock_psg.py
Created July 31, 2020 18:01
Simple clock update for PySimpleGUI
"""
A simple clock demonstration in PySimpleGUI
>> YouTube Comments Response <<
"""
import PySimpleGUI as sg
from datetime import datetime
layout = [[sg.Text(text=datetime.now().strftime('%I:%M:%S'), key='-CLOCK-')]]
@israel-dryer
israel-dryer / docx_term_search.py
Created July 21, 2020 18:32
Quick and direct search for term inside docx file
"""
A quick and dirty search within the contents of a docx file
Author: Israel Dryer
Modified: 2020-07-21
"""
from zipfile import ZipFile
# file path
doc_path = 'senior_paper.docx'