1
0
mirror of https://github.com/Melon-Bread/EagleJab synced 2024-11-24 20:28:19 -05:00

Switched out confirmation file dialog to use tk

This commit is contained in:
Rain Clark 2015-05-01 17:05:22 -04:00
parent cd655cf1d3
commit c8cc5dc373

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
import os, argparse, socket, sys, struct, easygui import os, argparse, socket, sys, struct, easygui
import tkinter.messagebox import tkinter.messagebox, tkinter.filedialog
# New & improved args parsing # New & improved args parsing
parser = argparse.ArgumentParser(description='Sends .CIA files to the 3DS via FBI') parser = argparse.ArgumentParser(description='Sends .CIA files to the 3DS via FBI')
@ -13,8 +13,8 @@ args = parser.parse_args()
if args.cia: if args.cia:
cia = args.cia[0] cia = args.cia[0]
else: else:
cia = easygui.fileopenbox("Choose CIA to Send", "Falcon Punch", default="/", filetypes=["*.cia", "*.*"], cia = tkinter.filedialog.askopenfilename(title="Falcon Punch - Choose CIA to Send", initialdir="/",
multiple=False) defaultextension=".cia", filetypes=[("CIA File", "*.cia")], multiple=False)
statinfo = os.stat(cia) statinfo = os.stat(cia)
fbiinfo = struct.pack('!q', statinfo.st_size) fbiinfo = struct.pack('!q', statinfo.st_size)