<div dir="ltr"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">Ahoj, mám tady takovém Python script, který jsem zkopíroval z netu a funguje mi dobře.</span><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">Dělá přesně to co jsem po něm chtěl, najde a nahradí například tohle:</span><font color="#000000" style="box-sizing:border-box;font-family:Inter,sans-serif;font-size:14px"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">(re.compile(r'dog'), 'cat'), ale já bych teď potřeboval aby mi například z "<CISLO>1000</CISLO>" udělal dělení tisícovkou a nahradil to za <font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">"<CISLO>1.000</CISLO>"</font></font></font></font><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><font color="#000000" style="box-sizing:border-box;font-family:Inter,sans-serif;font-size:14px"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">Šlo by to nějak zakomponovat do tohoto scriptu? Vůbec si s tím nevím rady.</font></font></font></font><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><font color="#000000" style="box-sizing:border-box;font-family:Inter,sans-serif;font-size:14px"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">Zkoušel jsem tohle:</font></font></font></font><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><font color="#000000" style="box-sizing:border-box;font-family:Inter,sans-serif;font-size:14px"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">(re.compile(r'<font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><CISLO>(\d\d\d\d)</CISLO></font></font>'), '<font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><CISLO>\\1</CISLO></font></font>'),</font></font></font></font></font></font><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">to prošlo, ale bezezměny, pochopitelně. Pak jsem zkoušel různě:</span><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><font color="#000000" style="box-sizing:border-box;font-family:Inter,sans-serif;font-size:14px"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box">(re.compile(r'<font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><CISLO>(\d\d\d\d)</CISLO></font></font>'), '<font color="#000000" style="box-sizing:border-box"><font face=""IBM Plex Sans", sans-serif" style="box-sizing:border-box"><CISLO>\\1 // 1000</CISLO></font></font>'),</font></font></font></font></font></font></font></font><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">a různé další variace, ale nic mi neprošlo :(</span><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">Mohl bych požádat o pomoc zkušenější?</span><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><span style="color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px;background-color:rgb(253,253,253)">Moc Děkuji Ston3</span><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><br style="box-sizing:border-box;color:rgb(51,51,51);font-family:Inter,sans-serif;font-size:14px"><div class="gmail-bbcode_container" style="box-sizing:border-box;margin:25px 0px;padding:20px 30px;border:1px solid rgb(230,230,230);font-family:Inter,sans-serif;font-size:14px;font-stretch:inherit;line-height:inherit;vertical-align:baseline;background-color:rgb(245,245,245);color:rgb(51,51,51)"><div class="gmail-bbcode_description" style="box-sizing:border-box;margin:0px 0px 10px;padding:0px 0px 10px;border-width:0px 0px 1px;border-bottom-style:solid;border-bottom-color:rgb(230,230,230);font-family:inherit;font-size:13px;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;text-transform:uppercase">KÓD:</div><pre class="gmail-bbcode_code gmail-prettyprint" style="box-sizing:border-box;overflow:auto scroll;margin-top:0px;margin-bottom:0px;padding:2px;border:1px solid rgb(136,136,136);font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;height:372px"><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">import</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> re<br style="box-sizing:border-box"><br style="box-sizing:border-box">path </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">"/Users/mypath/testData"</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">myfiles </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">listdir</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box"></span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># its much faster if you compile your regexes before you</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box"></span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># actually use them in a loop</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">REGEXES </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">[(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">re</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">compile</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">r</span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'dog'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">),</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'cat'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">),</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">          </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">re</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">compile</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">r</span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'123'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">),</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'789'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)]</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box"></span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">for</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> f </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">in</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> myfiles</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">:</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># split the filename and file extension for use in</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># renaming the output file</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    file_name</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> file_extension </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">splitext</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">f</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    generated_output_file </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> file_name </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">+</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">"_regex"</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">+</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> file_extension<br style="box-sizing:border-box"><br style="box-sizing:border-box">    </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># As l4mpi said ... if odt is zipped, you'd need to unzip it first</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># re.search is slower than a simple if statement</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">    </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">if</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> file_extension </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">in</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'.txt'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'.doc'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'.odt'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'.htm'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">'.html'</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">):</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box"><br style="box-sizing:border-box">        </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># Declare input and output files, open them,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">        </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># and start working on each line.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">        input_file </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">join</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> f</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">        output_file </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> os</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">join</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">path</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> generated_output_file</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box"><br style="box-sizing:border-box">        </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">with</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> open</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">input_file</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">"r"</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">as</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">fi</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> open</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">output_file</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-str" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,136,0)">"w"</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">as</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> fo</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">:</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">            </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">for</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> line </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">in</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">fi</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">:</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">                </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">for</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> search</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> replace </span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">in</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> REGEXES</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">:</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">                    line </span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">=</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> search</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-kwd" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,136)">sub</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">replace</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">,</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"> line</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">                fo</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">.</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">write</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">(</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)">line</span><span class="gmail-pun" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(102,102,0)">)</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">        </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># both the input and output files are closed automatically</span><span class="gmail-pln" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(0,0,0)"><br style="box-sizing:border-box">        </span><span class="gmail-com" style="box-sizing:border-box;margin:0px;padding:0px;border:0px;font-family:inherit;font-size:inherit;font-style:inherit;font-variant-caps:inherit;font-stretch:inherit;line-height:inherit;vertical-align:baseline;color:rgb(136,0,0)"># after the with statement closes</span></pre></div></div>