def download(self, output="<STR_LIT>", outputFile="<STR_LIT>", silent=True):
image = urllib.urlopen(self.imageLink).read()<EOL>if output != "<STR_LIT>":<EOL><INDENT>output = os.path.abspath(os.path.expanduser(output))<EOL><DEDENT>if output == "<STR_LIT>" or not os.path.exists(output):<EOL><INDENT>output = os.path.expanduser(os.path.join("<STR_LIT>", "<STR_LIT>"))<EOL>if not os.path.exists(output):<EOL><INDENT>os.mkdir(output)<EOL><DEDENT><DEDENT>if outputFile == "<STR_LIT>":<EOL><INDENT>outputFile = "<STR_LIT>" + str(self.number) + "<STR_LIT:->" + self.imageName<EOL><DEDENT>output = os.path.join(output, outputFile)<EOL>try:<EOL><INDENT>download = open(output, '<STR_LIT:wb>')<EOL><DEDENT>except:<EOL><INDENT>if not silent:<EOL><INDENT>print("<STR_LIT>" + output)<EOL><DEDENT>return "<STR_LIT>"<EOL><DEDENT>download.write(image)<EOL>download.close()<EOL>return output<EOL>
Downloads the image of the comic onto your computer.

                Arguments:
                        output: the output directory where comics will be downloaded to. The
                        default argument for 'output is the empty string; if the empty
                        string is passed, it defaults to a "Downloads" directory in your home folder
                        (this directory will be created if it does not exist).

                        outputFile: the filename that will be written. If the empty string
                        is passed, outputFile will default to a string of the form xkcd-(comic number)-(image filename),
                        so for example, xkcd-1691-optimization.png.

                        silent: boolean, defaults to True. If set to False, an error will be printed
                        to standard output should the provided integer argument not be valid.

                Returns the path to the downloaded file, or an empty string in the event
                of failure.