def _boottime_linux():
global __boottime<EOL>try:<EOL><INDENT>f = open('<STR_LIT>', '<STR_LIT:r>')<EOL>for line in f:<EOL><INDENT>if line.startswith('<STR_LIT>'):<EOL><INDENT>__boottime = int(line.split()[<NUM_LIT:1>])<EOL><DEDENT><DEDENT>if datetime is None:<EOL><INDENT>raise NotImplementedError('<STR_LIT>')<EOL><DEDENT>return datetime.fromtimestamp(__boottime)<EOL><DEDENT>except (IOError, IndexError):<EOL><INDENT>return None<EOL><DEDENT>
A way to figure out the boot time directly on Linux.