def get_upload_pipeline(in_fd, out_fd, rate_limit=None, gpg_key=None, lzop=True):
 commands = []
 if (rate_limit is not None):
  commands.append(PipeViewerRateLimitFilter(rate_limit))
 if lzop:
  commands.append(LZOCompressionFilter())
 if (gpg_key is not None):
  commands.append(GPGEncryptionFilter(gpg_key))
 return Pipeline(commands, in_fd, out_fd)

def get_upload_pipeline ( in_fd , out_fd , rate_limit = None , gpg_key = None , lzop = True ) : commands = [ ] if ( rate_limit is not None ) : commands . append ( PipeViewerRateLimitFilter ( rate_limit ) ) if lzop : commands . append ( LZOCompressionFilter ( ) ) if ( gpg_key is not None ) : commands . append ( GPGEncryptionFilter ( gpg_key ) ) return Pipeline ( commands , in_fd , out_fd )
create a unix pipeline to process a file for uploading .