Created
June 18, 2020 09:11
-
-
Save remisarrailh/e091b40bf12b1dfa42540ddae65193ec to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from tkinter import * | |
from functools import partial | |
from PIL import Image, ImageTk | |
import subprocess | |
def install(name): | |
subprocess.run([".\\avrdude\\avrdude.exe", "-cusbasp", "-pt85", "-b19200", "-Uflash:w:games/"+name+".hex"]) | |
root = Tk() | |
root.title("Tiny Joypad Installer") #Title | |
canvas = Canvas(root, width = 300, height = 200) | |
canvas.pack() | |
load = Image.open("games/tinygilbert.ino.tiny8.jpg") | |
render = ImageTk.PhotoImage(load) | |
canvas.create_image(0,0, anchor=NW, image=render) | |
Button(text="Install",command=partial(install,("tinygilbert.ino.tiny8"))).pack() | |
canvas2 = Canvas(root, width = 300, height = 200) | |
canvas2.pack() | |
load2 = Image.open("games/tinyarkanoid.jpg") | |
render2 = ImageTk.PhotoImage(load2) | |
canvas2.create_image(0,0, anchor=NW, image=render2) | |
Button(text="Install",command=partial(install,("tinyarkanoid"))).pack() | |
try: | |
root.mainloop() | |
except: | |
print("Application was forced to stop") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment