add docstring, fix up imports (style), add keyword expansion
authorAlec Warner <antarus@gentoo.org>
Sun, 22 Jul 2007 22:18:34 +0000 (22:18 -0000)
committerAlec Warner <antarus@gentoo.org>
Sun, 22 Jul 2007 22:18:34 +0000 (22:18 -0000)
svn path=/main/trunk/; revision=7361

pym/portage/sets/shell.py

index 2383dba81cf1463e94698f398f2eb39ea29e1d8b..6a84918a7fbc250c3711758ae28d4c877943e5cd 100644 (file)
@@ -2,11 +2,25 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-import subprocess, os
+import subprocess
+import os
 
 from portage.sets import PackageSet
 
 class CommandOutputSet(PackageSet):
+       """This class creates a PackageSet from the output of a shell command.
+          The shell command should produce one atom per line, that is:
+
+          >>> atom1
+              atom2
+              ...
+              atomN
+
+          Args:
+            name: A string that identifies the set.
+            command: A string or sequence identifying the command to run
+            (see the subprocess.Popen documentaion for the format)
+       """
        _operations = ["merge", "unmerge"]
 
        def __init__(self, name, command):