# # ;-) # import cPickle from boxtypes import * import pyneheaders def loader(uid, user): """ Load the box. We don't know what type it is yet. """ f = open(uid+".fol", "r") version = cPickle.load(f) type = cPickle.load(f) f.close() if type == "MAILBOX": box = mailbox.mailbox(user, uid) elif type == "NNTPBOX": box = nntpbox.nntpbox(user, uid) elif type == "NEWSGROUP": box = nntpbox.newsgroup(user, uid) elif type == "OUTBOX": box = outbox.outbox(user, uid) elif type == "STOREBOX": box = storebox.storebox(user, uid) else: print "Error: Unknown box type ", type return None return box