def getProcessCommandLineStr(pid):
try:<EOL><INDENT>with open('<STR_LIT>' %(int(pid),), '<STR_LIT:r>') as f:<EOL><INDENT>cmdline = f.read()<EOL><DEDENT>return cmdline.replace('<STR_LIT:\x00>', '<STR_LIT:U+0020>')<EOL><DEDENT>except:<EOL><INDENT>return None<EOL><DEDENT>
getProcessCommandLineStr - Gets a the commandline (program + arguments) of a given pid

@param pid <int> - Process ID

@return - None if process not found or can't be determined. Otherwise a string of commandline.

@note Caution, args may have spaces in them, and you cannot surmise from this method. If you care (like trying to replay a command), use getProcessCommandLineList instead