code: def defaultFile(self):
          
          filename = self.curframe.f_code.co_filename
          if filename == '<string>' and self.mainpyfile:
              filename = self.mainpyfile
          return filename
docs: Produce a reasonable default.