newbie with a gui question

niekko akniekko at yahoo.com
Tue Feb 3 21:57:16 EST 2004


I wrote a program for a class and now have to
make a gui for it.  I've done several hours of
research and am stuck.  Can someone point me
in the right direction, please????

Here's the original program..


#Petty_Cash.py
from Tkinter import *
import time
import string

true = 1
false = 0

class Petty_Cash:
    def __init__(self, initial):
        self.balance = initial
        print "Account created.  Your beginning balance is", "$",
self.balance
        print time.ctime()

    def deposit(self, amt):
        self.balance = self.balance + amt
        print "$", + amt, "has been deposited to your account."
        print "Your new balance is", self.balance
        print time.ctime()

    def withdraw(self, amt):
        if self.balance >= amt:
            self.balance = self.balance - amt
            print "$",- amt, "has been withdrawn from your account."
            print "Your new balance is", "$", self.balance
            print time.ctime()
        else:
            print "Insufficient funds in account to withdraw", "$", amt
            print "Please ensure sufficient funds exist for withdrawl
amount"
            print "Your current balance is", "$", self.balance
            print time.ctime()

    def getbalance(self):
        print time.ctime()
        return self.balance







More information about the Python-list mailing list