Saturday, July 27, 2013

BARE BONES TEXT EDITOR

I created a simple letter viewer for work. All it does is open the letter, but it can save changes too. I'm going to add it to my letter writing program at work.
from Tkinter import *
#A bare bones editor to view or make changes to a letter if needed.

def save_changes():
    f=open('theletter.txt','w')
    theletter=textwindow.get("1.0",END)
    f.write(theletter)
    f.close()
    print("Edits saved ")

def loadletter():
    f=open('theletter.txt','r')
   
    for line in f:
        textwindow.insert("30.0",line)#change the 30 to match file length
   
root=Tk()

textwindow=Text(root,background='white')
textwindow.pack()
btn=Button(root,text='Save changes',command=save_changes)
btn.pack()

loadletter()

root.mainloop()
 

Saturday, July 6, 2013

I DID IT!

I made an HTML form and then used PHP to get the data from it, and store the data into a SQL database! This is so cool!




Wednesday, July 3, 2013

SWITCHED FROM PYTHON TO PHP!

I created this prototype using PHP and HTML, and I want to get it on the server at work. It will make things simpler for the staff at the office, and for me too!

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.