Most viewed recipes tagged "group"http://code.activestate.com/recipes/tags/group/views/2012-11-02T04:01:06-07:00ActiveState Code Recipesunix subprocess wrapper (Python)
2008-07-29T07:11:17-07:00Pádraig Bradyhttp://code.activestate.com/recipes/users/1890175/http://code.activestate.com/recipes/576387-unix-subprocess-wrapper/
<p style="color: grey">
Python
recipe 576387
by <a href="/recipes/users/1890175/">Pádraig Brady</a>
(<a href="/recipes/tags/group/">group</a>, <a href="/recipes/tags/popen/">popen</a>, <a href="/recipes/tags/subprocess/">subprocess</a>, <a href="/recipes/tags/unix/">unix</a>).
Revision 2.
</p>
<p>I have used this for ages to control child processes (and all their children). Some of the existing subprocess module was based on this, but I find this simpler for my uses at least.</p>
<h4>Example:</h4>
<pre class="prettyprint"><code>import subProcess
process = subProcess.subProcess("your shell command")
process.read() #timeout is optional
handle(process.outdata, process.errdata)
del(process)
</code></pre>
reshape a sequence (Python)
2012-11-02T04:01:06-07:00Chris Smithhttp://code.activestate.com/recipes/users/2725752/http://code.activestate.com/recipes/578262-reshape-a-sequence/
<p style="color: grey">
Python
recipe 578262
by <a href="/recipes/users/2725752/">Chris Smith</a>
(<a href="/recipes/tags/group/">group</a>, <a href="/recipes/tags/reshape/">reshape</a>, <a href="/recipes/tags/sequence/">sequence</a>).
Revision 4.
</p>
<p>This function accepts a sequence and a template of how the sequence should be reshaped. </p>
Get additional group IDs for Unix user (pwd/grp modules) (Python)
2011-06-03T02:14:18-07:00realityexistshttp://code.activestate.com/recipes/users/4178189/http://code.activestate.com/recipes/577733-get-additional-group-ids-for-unix-user-pwdgrp-modu/
<p style="color: grey">
Python
recipe 577733
by <a href="/recipes/users/4178189/">realityexists</a>
(<a href="/recipes/tags/group/">group</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/passwd/">passwd</a>, <a href="/recipes/tags/security/">security</a>, <a href="/recipes/tags/unix/">unix</a>).
</p>
<p>The Python stdlib pwd module provides an easy way to get the primary group ID, but no way to get additional group IDs. This is a simple function that returns the additional group IDs for a given username.</p>