def realpath_with_context(path, context):
 if (not os.path.isabs(path)):
  assert context.workdir
  path = os.path.join(context.workdir, os.path.normpath(path))
 return path

def realpath_with_context ( path , context ) : if ( not os . path . isabs ( path ) ) : assert context . workdir path = os . path . join ( context . workdir , os . path . normpath ( path ) ) return path
convert a path into its realpath: * for relative path: use :attr:context .