Hi, I have the following code to replace a string. It used to work before, but now it is not working any more(the string is not replaced). Can you please help?
<script>source_include='D:\\Silk\\Apps\\Harmony\\Include_Harmony.inc'</script> <stafcmd name="'Check if the automation test finish successfully'"> <location>'local'</location> <service>'FS'</service> <request>'GET FILE %s ' % source_include</request> </stafcmd> <script> import re result=STAFResult str_to_find= "O:\\FAST\\Harmony\\{VERSIONSTRING}" str_to_replace="C:/Program Files (x86)/Fekete/Harmony 2011/" result=re.sub(str_to_find,str_to_replace,result) outfile='%s/Cindy.inc' % "C:" txtfh=open(outfile,'w') </script> <iterate var="line" in="result"> <script> txtfh.write(line) txtfh.close() </script> </iterate> Thanks, Cindy
Include_Harmony.inc
Description: Include_Harmony.inc
------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________ staf-users mailing list staf-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/staf-users