<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hey all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>How do I fix the following error:</DIV>
<DIV>&lt;begin error&gt;</DIV>
<DIV>File to load: passcard.txt</DIV>
<DIV>&nbsp;</DIV>
<DIV>Traceback (most recent call last):<BR>&nbsp; File 
"D:\Python24\password.py", line 82, in -toplevel-<BR>&nbsp;&nbsp;&nbsp; 
load_file(sitelist,filename)<BR>&nbsp; File "D:\Python24\password.py", line 51, 
in load_file<BR>&nbsp;&nbsp;&nbsp; [site,ID,passcard] = 
string.split(in_line,",")<BR>&nbsp; File "D:\Python24\lib\string.py", line 292, 
in split<BR>&nbsp;&nbsp;&nbsp; return s.split(sep, maxsplit)<BR>AttributeError: 
'list' object has no attribute 'split'</DIV>
<DIV>&lt;end error&gt;</DIV>
<DIV>&lt;begin&nbsp;code&gt;</DIV>
<DIV>#This is for a password protected program to store passwords.<BR>import 
string<BR>password = "hello"<BR>sitelist = {}</DIV>
<DIV>&nbsp;</DIV>
<DIV>def main_menu():<BR>&nbsp;&nbsp;&nbsp; print "1) Add a login info 
card"<BR>&nbsp;&nbsp;&nbsp; print "2) Lookup a login info 
card"<BR>&nbsp;&nbsp;&nbsp; print "3) Remove a login info 
card"<BR>&nbsp;&nbsp;&nbsp; print "4) Print Login info 
list"<BR>&nbsp;&nbsp;&nbsp; print "5) Load info"<BR>&nbsp;&nbsp;&nbsp; print "6) 
Save info"<BR>&nbsp;&nbsp;&nbsp; print "9) Exit"</DIV>
<DIV>&nbsp;</DIV>
<DIV>def add_site():<BR>&nbsp;&nbsp;&nbsp; print "Add a login info 
card"<BR>&nbsp;&nbsp;&nbsp; site = raw_input("Site: ")<BR>&nbsp;&nbsp;&nbsp; ID 
= raw_input("User ID: ")<BR>&nbsp;&nbsp;&nbsp; passcard = raw_input("Password: 
")<BR>&nbsp;&nbsp;&nbsp; sitelist[site] = [ID,passcard]</DIV>
<DIV>&nbsp;</DIV>
<DIV>def lookup_site():<BR>&nbsp;&nbsp;&nbsp; print "Lookup a login info 
card"<BR>&nbsp;&nbsp;&nbsp; site = raw_input("Site: ")<BR>&nbsp;&nbsp;&nbsp; if 
sitelist.has_key(site):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "The 
ID is: ",sitlist[site][0]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print 
"The password is: ",sitelist[site][1]<BR>&nbsp;&nbsp;&nbsp; 
else:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print site," was not 
found."</DIV>
<DIV>&nbsp;</DIV>
<DIV>def remove_site():<BR>&nbsp;&nbsp;&nbsp;&nbsp; print "Remove a login info 
card"<BR>&nbsp;&nbsp;&nbsp;&nbsp; site = raw_input("Site: 
")<BR>&nbsp;&nbsp;&nbsp;&nbsp; if 
sitelist.has_key(site):<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; del 
sitelist[site]<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
else:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print site," was not 
found."</DIV>
<DIV>&nbsp;</DIV>
<DIV>def print_login_info():<BR>&nbsp;&nbsp;&nbsp; print "Login 
Info"<BR>&nbsp;&nbsp;&nbsp; for site in 
sitelist.keys():<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "Site: 
",site," \tID: ",sitelist[site][0]," \tPassword: ",sitelist[site][1],"\n"</DIV>
<DIV>&nbsp;</DIV>
<DIV>def load_file(sitelist,filename):<BR>&nbsp;&nbsp;&nbsp; in_file = 
open(filename,"r")<BR>&nbsp;&nbsp;&nbsp; while 
1:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in_line = 
in_file.readlines()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if in_line == 
"":<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in_line = 
in_line[:-1]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [site,ID,passcard] = 
string.split(in_line,",")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
sitelist[site] = sitelist</DIV>
<DIV>&nbsp;</DIV>
<DIV>def save_file(sitelist,filename):<BR>&nbsp;&nbsp;&nbsp; out_file = 
open(filename,"w")<BR>&nbsp;&nbsp;&nbsp; for site in 
sitelist.keys():<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]+"\n")<BR>&nbsp;&nbsp;&nbsp; 
out_file.close()</DIV>
<DIV>&nbsp;</DIV>
<DIV>print "The Password Program"<BR>print "By Nathan Pinno"<BR>print<BR>answer 
= raw_input("What is the password? ")<BR>while password != 
answer:<BR>&nbsp;&nbsp;&nbsp; print "The password is 
incorrect."<BR>&nbsp;&nbsp;&nbsp; answer = raw_input("What is the password? 
")</DIV>
<DIV>&nbsp;</DIV>
<DIV>print "Welcome to the second half of the program."<BR>while 
1:<BR>&nbsp;&nbsp;&nbsp; main_menu()<BR>&nbsp;&nbsp;&nbsp; menu_choice = 
int(raw_input("Choose an option (1-6, or 9: "))<BR>&nbsp;&nbsp;&nbsp; if 
menu_choice == 1:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
add_site()<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
2:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
lookup_site()<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
3:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
remove_site()<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
4:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
print_login_info()<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
5:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = raw_input("File to 
load: ")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
load_file(sitelist,filename)<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
6:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; filename = raw_input("Filename 
to save as: ")<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
save_file(sitelist,filename)<BR>&nbsp;&nbsp;&nbsp; elif menu_choice == 
9:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break<BR>&nbsp;&nbsp;&nbsp; 
else:<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; print "That's not an 
option!"<BR>print "Have a nice day!"<BR>&lt;end code&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks in advance,</DIV>
<DIV>Nathan Pinno,<BR></DIV></BODY></HTML>