32 lines
853 B
Python
Executable File
32 lines
853 B
Python
Executable File
#!/usr/bin/env python
|
|
#-*- coding: utf-8 -*-
|
|
# pyrharckade 2 is a simple pygame front for PIMAME
|
|
# version: 2.0A
|
|
# guillaume@tuxme.net
|
|
# GPL Licence
|
|
|
|
from Tkinter import *
|
|
import os
|
|
FILE='../ROM_CONFIG_FILES.csv'
|
|
def SaveFile():
|
|
open(FILE, "w").write(text.get(0., END))
|
|
|
|
TkBackupFile = Tk()
|
|
TkBackupFile.title('ROM_CONFIG_FILES.csv Editor')
|
|
BoutonSave = Button(TkBackupFile, text ='Save',command=SaveFile)
|
|
BoutonQuit = Button(TkBackupFile, text ='Quit',command=TkBackupFile.quit)
|
|
|
|
BoutonSave.grid(row =0, column =0)
|
|
BoutonSave.configure()
|
|
BoutonQuit.grid(row =0, column =1)
|
|
BoutonQuit.configure()
|
|
|
|
text = Text()
|
|
if os.path.exists(FILE):
|
|
text.insert(1.,open(FILE,'r').read())
|
|
else:
|
|
text.insert(1.,open(FILE,'w+').read())
|
|
text.grid(row=1, column=0, columnspan=25, sticky=N, padx=2, pady=2)
|
|
entree = Entry(TkBackupFile)
|
|
TkBackupFile.mainloop()
|