From 641d7a2b830f7455dbf3ee0228ff41fc79f08052 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 17 Jun 2013 20:22:28 +0200 Subject: m doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/argparser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/argparser.py b/src/argparser.py index d2078b2..618987c 100644 --- a/src/argparser.py +++ b/src/argparser.py @@ -70,6 +70,12 @@ class ArgParser(): @staticmethod def parent_name(levels = 1): + ''' + Gets the name of the parent process + + @param levels:int The number of parents to walk, 0 for self, and 1 for direct parent + @return :str? The name of the parent process, `None` if not found + ''' pid = os.readlink('/proc/self') lvl = levels while lvl > 1: -- cgit v1.2.3-70-g09d2