Popular recipes tagged "os" but not "generate"http://code.activestate.com/recipes/tags/os-generate/2014-02-08T22:12:24-08:00ActiveState Code RecipesIndexing text files with Python (Python)
2014-02-08T22:12:24-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578828-indexing-text-files-with-python/
<p style="color: grey">
Python
recipe 578828
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/os/">os</a>).
</p>
<p>This recipe shows how to process a text file in order to create an index of the words in it. The index created is a separate text file, and consists of one entry (which is one line) per unique word in the file. The first item in the line is the word itself, and the subsequent items are the line numbers on which that word occurs in the text file being processed. The words and line numbers are separated by spaces.</p>
Run some command every x seconds (Python)
2013-09-24T13:26:19-07:00Rutger Saalminkhttp://code.activestate.com/recipes/users/4187940/http://code.activestate.com/recipes/578673-run-some-command-every-x-seconds/
<p style="color: grey">
Python
recipe 578673
by <a href="/recipes/users/4187940/">Rutger Saalmink</a>
(<a href="/recipes/tags/command/">command</a>, <a href="/recipes/tags/iterative/">iterative</a>, <a href="/recipes/tags/os/">os</a>, <a href="/recipes/tags/run/">run</a>).
</p>
<p>Sometimes it comes in handy to run some command every minute or hour. For example, have some process check your ip address every minute with 'ifconfig' or run some purgescript at midnight through 'sqlplus.exe @purge_aux_table'.</p>