11-14-2009, 12:13 AM
Release Notes:
1.1
I'm looking for a new name for this script, please help me think of a good one.
1.1
- First release
- Allows you to keep track of your employee's and their salaries
- Schedule added
- You can clear your lists
Code:
import os,platform
def menu():
clearer()
print "##################################### "
print "# Nevets04's Company Management # "
print "##################################### "
print ' '
print "1) Schedule "
print "2) Salaries "
z = int(raw_input("What do you want to do?: "))
if z == 1:
schedule()
elif z == 2:
salary()
def clearer():
systemver=platform.release()
if systemver=='XP':
os.system("cls")
elif systemver=='Vista':
os.system("clear")
else:
os.system("clear")
clearer()
def add(b):
clearer()
c = int(raw_input("How much is %s paid an hour?: $" % b))
clearer()
d = int(raw_input("How many hours does %s work a day?: " % b))
clearer()
d2 = int(raw_input("How many days does %s work a week?: " % b))
clearer()
e = (c * d) * d2
q = "%s: $%s" %(b,e)
q = "".join(q)
print q
print "1) Yes"
print "2) No"
f = int(raw_input("Do you want to save this?: "))
if f == 1:
x = open('Employee.txt', 'a')
x.write(q)
x.write('\n')
x.close()
menu()
elif f == 2:
menu()
else:
menu()
def salary():
clearer()
print "1) Add Employee"
print "2) View Employees"
print "3) Clear Employees"
a = int(raw_input("What do you want to do?: "))
if a == 1:
add(raw_input("Employee Name: "))
elif a == 2:
clearer()
f = open("Employee.txt", 'r')
for line in f:
print line,
raw_input("Press Enter To Continue")
menu()
elif a == 3:
os.remove("Employee.txt")
menu()
else:
print "Invalid Option"
def schedule():
clearer()
print "1) Add an Event"
print "2) View Shedule"
print "3) Clear Schedule"
ask = int(raw_input("What do you want to do: "))
if ask == 1:
a = raw_input("When is the event?: ")
b = raw_input("What is the event?: ")
q = "%s: %s" %(a,b)
q = "".join(q)
print q
print "1) Yes"
print "2) No"
f = int(raw_input("Do you want to save this?: "))
if f == 1:
c = open('schedule.txt', 'a')
c.write(q)
c.write("\n")
c.close()
menu()
if f == 2:
menu()
else:
menu()
elif ask == 2:
clearer()
f = open("schedule.txt", 'r')
for line in f:
print line,
raw_input("Press Enter To Continue")
menu()
elif ask == 3:
os.remove("schedule.txt")
menu()
menu()
I'm looking for a new name for this script, please help me think of a good one.