form=cgi.FieldStorage()STR=str(form.getvalue("iscinp"))os.system('echo "'+STR+'"'+OUT)iflen(STR)<=4:#in case of input a SO/RE file
fileitem=form['filename']iffileitem.filename:fn=os.path.basename(fileitem.filename)open(pth+fn,'wb').write(fileitem.file.read())else:fn='fort.10'withopen(pth+fn,'w')asftext:ftext.write(STR)