def getSwapStats(self):
info_dict = {}<EOL>try:<EOL><INDENT>fp = open(swapsFile, '<STR_LIT:r>')<EOL>data = fp.read()<EOL>fp.close()<EOL><DEDENT>except:<EOL><INDENT>raise IOError('<STR_LIT>' % swapsFile)<EOL><DEDENT>lines = data.splitlines()<EOL>if len(lines) > <NUM_LIT:1>:<EOL><INDENT>colnames = [name.lower() for name in lines[<NUM_LIT:0>].split()]<EOL>for line in lines[<NUM_LIT:1>:]:<EOL><INDENT>cols = line.split()<EOL>info_dict[cols[<NUM_LIT:0>]] = dict(zip(colnames[<NUM_LIT:1>:], cols[<NUM_LIT:1>:]))<EOL><DEDENT><DEDENT>return info_dict<EOL>
Return information on swap partition and / or files.

            @return: Dictionary of stats.