def part_datasheet(self, part, command=None, path=None):
result = self._e.parts_match(<EOL>queries=[{'<STR_LIT>': part}],<EOL>exact_only=True,<EOL>show_mpn=True,<EOL>show_datasheets=True,<EOL>include_datasheets=True<EOL>)<EOL>if result[<NUM_LIT:1>][<NUM_LIT:0>]['<STR_LIT>'] == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>")<EOL>return ReturnValues.NO_RESULTS<EOL><DEDENT>result = result[<NUM_LIT:1>][<NUM_LIT:0>]['<STR_LIT>'][<NUM_LIT:0>]<EOL>print("<STR_LIT>".format(result['<STR_LIT>']))<EOL>try:<EOL><INDENT>if len(result['<STR_LIT>']) > <NUM_LIT:0>:<EOL><INDENT>for datasheet in result['<STR_LIT>']:<EOL><INDENT>if not path:<EOL><INDENT>path = tempfile.mkdtemp()<EOL><DEDENT>out = path+'<STR_LIT:/>'+result['<STR_LIT>']+'<STR_LIT:->'+datasheet['<STR_LIT:url>'].split('<STR_LIT:/>')[-<NUM_LIT:1>]<EOL>download_file(datasheet['<STR_LIT:url>'], out)<EOL>print('<STR_LIT>'.format(out))<EOL>if command:<EOL><INDENT>subprocess.call([command, out])<EOL><DEDENT><DEDENT><DEDENT><DEDENT>finally:<EOL><INDENT>if not path:<EOL><INDENT>shutil.rmtree(path)<EOL><DEDENT><DEDENT>return ReturnValues.OK<EOL>
downloads and/or shows the datasheet of a given part

command: if set will use it to open the datasheet.
path: if set will download the file under that path.

if path is given alone, the file will only get downloaded,
if command is given alone, the file will be downloaded in a temporary
folder, which will be destroyed just after being opened.
if both path and command are given, the file will be downloaded and
stored in the chosen location.