<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def FilePrinter(filename, mode='a', closing=True):
 path = os.path.abspath(os.path.expanduser(filename)) """ Opens the given file and returns a printer to it. """

    f = open(path, mode)
    return Printer(f, closing)