How do I continue after the error?
cdalten at gmail.com
Thu Jun 4 21:26:49 EDT 2009
Let's say I have a list of 5 files. Now lets say that one of the files
reads nude333.txt instead of nude3.txt. When this happens, the program
generates an error and quits. What I want it to do is just skip over
the bad file and continue on with the next one. Below is the actual
code. It only works on the local bbs that I hang out on. Sorry. I
couldn't think of the simple case that could isolate my problem.
#The original code was written by Mr.Pardue, which sounds a lot like
import telnetlib, os
my_porn_collection = ["nude.txt", "nude2.txt", "nude333.txt",
path = 'porn/'
#my_porn_collection = 
for infile in glob.glob( os.path.join(path, '*.txt*')):
f = open(some_naked_bitches, "r")
art = f.read()
user = raw_input("\nUsername: ")
password = raw_input("Password: ")
def enter_party(user, password):
now = telnetlib.Telnet("m-net.arbornet.org")
print "\nEntered username.."
now.write(user + "\n")
now.write(password + "\n" )
print "Entered pass.."
print "Entered into party.."
for some_titty_porn in my_porn_collection:
bitch_please = generate(some_titty_porn)
if __name__ == "__main__":
More information about the Python-list