import IMS


subfiler = IMS.SubFiler()

def CloseSub(code,date,status,note=""):
	thisSub=IMS.NodeToSubmission(subfiler.getXML(code))
	print thisSub
	thisSub.Close(date,status,note)
	subfiler.replace(code,thisSub.toElement())
	
	subfiler.Save()
	
CloseSub("Abys20060829","Sep 10, 06",'Reject',"Well received, but decided against it")