import sys title = sys.argv[1] filehandle = open ( 'dir.html', 'w') filehandle.write ( ''' '''+title+''' This is body ''' ) filehandle.close()