[Tutor] I need help with saving to files
Matthews James
cooler12001@yahoo.com
Thu, 22 Mar 2001 00:37:07 -0800 (PST)
This is what i need help on
#####################################################
# File: JacksRecords.py
def print_slip():
print '_______________________________'
print ' ',Name,', ',Date
print 'EMP # CAT IN'
print Empnum,' ',CAT,' ',FIRSTIN
print ' IN OUT'
print ' ',FIRSTIN,' ',FIRSTOUT
print ' IN'
print ' ',SECIN
print ' IN OUT'
print ' ',SECIN,' ',SECOUT
print '-------------------------------'
Name = raw_input("What is the employees name: ")
Date = raw_input("What is the Date: ")
Empnum = input("What is the Employees Number: ")
CAT = input("What is the CAT number: ")
FIRSTIN = raw_input("What time did (he, she) come in:
")
FIRSTOUT = raw_input("What time did (he, she) go on
break: ")
SECIN = raw_input("What time did (he, she) come in
from break: ")
SECOUT = raw_input("What time did (he, she) clock out
to go home: ")
print_slip()
#####################################################
I want to beable to save 'print_slip()' to a file
and then add more to that same file.
I also want it to look like this when it saves the
file
_____________________________________________
John Doe, 3/21/2001
EMP # CAT IN
4578 1 7:54
IN OUT
7:45 8:25
IN
8:55
IN OUT
8:55 23:54
---------------------------------------------
I really dont know that much about python
and i was wondering if anyone could help me
out on this.
I am going to use it so that i will not have
to keep all my time slips from work.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/