Popular recipes tagged "split" but not "python"http://code.activestate.com/recipes/tags/split-python/2013-08-13T11:29:44-07:00ActiveState Code RecipesSplit string sample (Batch)
2013-08-13T11:29:44-07:00greg zakharovhttp://code.activestate.com/recipes/users/4184115/http://code.activestate.com/recipes/578638-split-string-sample/
<p style="color: grey">
Batch
recipe 578638
by <a href="/recipes/users/4184115/">greg zakharov</a>
(<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/string/">string</a>).
</p>
<p>Target: we have a task to split the string ("this is a string") on the characters. Possible solution:</p>
Split Up Text File by Line Count (Python)
2012-02-19T23:40:47-08:00Andrew Yurisichhttp://code.activestate.com/recipes/users/4180867/http://code.activestate.com/recipes/578045-split-up-text-file-by-line-count/
<p style="color: grey">
Python
recipe 578045
by <a href="/recipes/users/4180867/">Andrew Yurisich</a>
(<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/text_files/">text_files</a>).
Revision 5.
</p>
<p>Splits a large text file into smaller ones, based on line count. Original file is unmodified.</p>
<p>Resulting text files are stored in the same directory as the original file.</p>
<p>Useful for breaking up text based logs or blocks of email logins into smaller parts.</p>
Python Easily Packetize / Slice / Chunk Text (Python)
2011-09-30T05:34:57-07:00__nerohttp://code.activestate.com/recipes/users/4177968/http://code.activestate.com/recipes/577885-python-easily-packetize-slice-chunk-text/
<p style="color: grey">
Python
recipe 577885
by <a href="/recipes/users/4177968/">__nero</a>
(<a href="/recipes/tags/chunk/">chunk</a>, <a href="/recipes/tags/packetize/">packetize</a>, <a href="/recipes/tags/regex/">regex</a>, <a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/udp/">udp</a>).
</p>
<p>I needed to chunk up some text to send over UDP and didn't want to have messy for loops with an if condition for size and then the little bit left over. All that struck me as very messy. I then thought of the re module and came up with a very simple solution to chunk up data.</p>
Split Strings w/ Multiple Separators (Python)
2011-03-20T20:33:13-07:00Kenneth Reitzhttp://code.activestate.com/recipes/users/4177394/http://code.activestate.com/recipes/577616-split-strings-w-multiple-separators/
<p style="color: grey">
Python
recipe 577616
by <a href="/recipes/users/4177394/">Kenneth Reitz</a>
(<a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/string_parsing/">string_parsing</a>).
Revision 5.
</p>
<p>Splits strings with multiple separators instead of one (e.g. <code>str.split()</code>).</p>
Script para transformar videos compatibles con reproductor MP4 (Python)
2010-04-30T18:23:39-07:00jrovegnohttp://code.activestate.com/recipes/users/4170207/http://code.activestate.com/recipes/577210-script-para-transformar-videos-compatibles-con-rep/
<p style="color: grey">
Python
recipe 577210
by <a href="/recipes/users/4170207/">jrovegno</a>
(<a href="/recipes/tags/ffmpge/">ffmpge</a>, <a href="/recipes/tags/mencoder/">mencoder</a>, <a href="/recipes/tags/split/">split</a>, <a href="/recipes/tags/video/">video</a>).
Revision 3.
</p>
<p>Script para transformar videos compatibles con reproductor MP4:
MP4 2GB FUJITEL 80MP4TV2 MP4-TV (AVIConverter_320X240_20FPS_EN Setup.exe)
Requiere:
- ffmpeg - mencoder
Extras:
Divide video en partes de 10 min
Agrega subtÃtulos si existe el archivo file_name.srt
Uso:
avi2mp4 file_name.avi</p>
Path entire split & commonprefix (Python)
2011-04-06T20:29:46-07:00Maxime Fontenierhttp://code.activestate.com/recipes/users/4172150/http://code.activestate.com/recipes/577016-path-entire-split-commonprefix/
<p style="color: grey">
Python
recipe 577016
by <a href="/recipes/users/4172150/">Maxime Fontenier</a>
(<a href="/recipes/tags/commonprefix/">commonprefix</a>, <a href="/recipes/tags/path/">path</a>, <a href="/recipes/tags/split/">split</a>).
Revision 5.
</p>
<p>This recipe is a kind of extension to os.path
It offers an entire split function and a true commonprefix for paths.</p>