Python GUI Text Editor App

preview_player
Показать описание
Python GUI Text Editor App

This is a simple, basic GUI text editor. Glean from it what you can, and grow in knowledge. Good luck.
Рекомендации по теме
Комментарии
Автор

You drive the point home. Showing how to have the title bar containing the name of the file you opened is a great golden nugget. You know it would have taken me forever to figure out how to carry out that code. Thank you.

MaxGoddur
Автор

yo yo wazzup dawgs really caught me by surprise

flyingdutchman
Автор

I'm creating a editor i have loaded files in to a listbox made it to double click and open it, i want to execute the py scripts with a interactive shell like idle and sublime text has so output is in a window, was wondering if you knew of a way to do this. i have written code to run the script, but the code window does not take focus and hides behind my code.Thank you .

larrycash
Автор

Code for this Program, good luck:

from tkinter import *
rt = Tk()

global tt


def odf(): # open da file
global xf
tt.delete(1.0, END)
rt.title("")

rt.title(xf)
tt.insert(END, open(xf).read())


def sdf(): # save da file
sv=tt.get(1.0, END)
f=open(xf, 'wt')
f.write(sv)
f.close()



b1=Button(rt, text="Open File", width=10, command = odf)
b1.grid(row=0, column=0)

b2=Button(rt, text="Save File", width=10, command = sdf)
b2.grid(row=0, column=1)

tt=Text(rt, state='normal', height=15, width=60)
tt.grid(row=1, column=0, rowspan=6, columnspan=6)

hobokengar