def get_portable_base():
 if isportable:
  return os.path.dirname(os.path.dirname(os.environ['CALIBRE_PORTABLE_BUILD']))

def get_portable_base ( ) : if isportable : return os . path . dirname ( os . path . dirname ( os . environ [ 'CALIBRE_PORTABLE_BUILD' ] ) )
return path to the directory that contains calibre-portable .