This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#windows | |
import win32clipboard | |
''' | |
NO MORE manually adding \ into your Windows paths!! | |
python ConvPathOnClipboard.py | |
Windows program converts the text on the clipboard into a fully escaped and 'paste-able' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
# ------------------------ Hash code generator ------------------------ | |
# use this code to generate your hashcode based on your password | |
# then paste the hash code into the variable secret_password_hash | |
# in the program you wish to password protect, copy and paste the lower 1/2 of this program. | |
password = input('Enter password to create hash: ') | |
try: | |
password_utf = password.encode('utf-8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
from Tkinter import * # from x import * is bad practice | |
from ttk import * | |
# http://tkinter.unpythonic.net/wiki/VerticalScrolledFrame | |
class VerticalScrolledFrame(Frame): | |
"""A pure Tkinter scrollable frame that actually works! | |
* Use the 'interior' attribute to place widgets inside the scrollable frame |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PySimpleGUI as sg | |
sg.SetOptions(button_color=sg.COLOR_SYSTEM_DEFAULT) | |
frame = [[sg.Radio('This ARG', group_id=1)], | |
[sg.Radio('That ARG', group_id=1)], | |
[sg.Radio('Both ARG', group_id=1)]] | |
col2 = [[sg.SimpleButton('Clear')], | |
[sg.SimpleButton('Go!')]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PySimpleGUI as sg | |
# The Window layout definition | |
# Pay close attention to the two Input Elements, they each have a key identifier | |
layout = [ [sg.Text('Test Program For StackOverflow') ], | |
[sg.T('Enter stuff here'), sg.Input(key='_in_')], | |
[sg.T('and it will show up here'), sg.Input(key='_out_')], | |
[ sg.Button('OK')] ] | |
# Make a window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import sys | |
if sys.version_info[0] >= 3: | |
import PySimpleGUI as sg | |
else: | |
import PySimpleGUI27 as sg | |
import os | |
import signal | |
import psutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
if sys.version_info[0] >= 3: | |
import PySimpleGUI as sg | |
else: | |
import PySimpleGUI27 as sg | |
import cv2 as cv | |
from PIL import Image | |
import io | |
from sys import exit as exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PySimpleGUI as sg | |
import random | |
# The callback functions | |
def answer_correct(): | |
print('answer is correct') | |
words = [('1', 'one'), ('2', 'two'), ('3', 'three'), ('4', 'four'), ('5', 'five'), ('6', 'six')] | |
answer_1 = words[0][1] | |
answer_2 = words[1][1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PySimpleGUI as sg | |
import os | |
import chess | |
import chess.pgn | |
import copy | |
import time | |
button_names = ('close', 'cookbook', 'cpu', 'github', 'pysimplegui', 'run', 'storage', 'timer') | |
CHESS_PATH = '.' # path to the chess pieces |
OlderNewer