'Produce a reasonable default.'

def defaultFile(self):

    filename = self.curframe.f_code.co_filename
    if ((filename == '<string>') and self.mainpyfile):
        filename = self.mainpyfile
    return filename
