def uncommented_lines(filename, use_sudo=False):
 func = (run_as_root if use_sudo else run)
 res = func(('cat %s' % quote(filename)), quiet=True)
 if res.succeeded:
  return [line for line in res.splitlines() if (line and (not line.startswith('#')))]
 else:
  return []

def uncommented_lines ( filename , use_sudo = False ) : func = ( run_as_root if use_sudo else run ) res = func ( ( 'cat %s' % quote ( filename ) ) , quiet = True ) if res . succeeded : return [ line for line in res . splitlines ( ) if ( line and ( not line . startswith ( '#' ) ) ) ] else : return [ ]
get the lines of a remote file .