code: def relworkdir(self):
          
          if getattr(self, "workdir", None) is None:
              return None
          try:
              return os.path.relpath(self.workdir)
          except OSError:
              # current working directory may not be defined!
              return self.workdir
docs: Return a relative version of the workdir