zget package¶
Module contents¶
zget.get(filename[, output, reporthook, timeout]) |
Receive and save a file using the zget protocol. |
zget.put(filename[, output, interface, ...]) |
Send a file using the zget protocol. |
zget.TimeoutException([msg]) |
Exception raised when a timeout was hit. |
Module reference¶
-
zget.get(filename, output=None, reporthook=None, timeout=None)¶ Receive and save a file using the zget protocol.
Parameters: filename : string
The filename to be transferred
output : string
The filename to save to. Optional.
reporthook : callable
A hook that will be called during transfer. Handy for watching the transfer. See
urllib.urlretrievefor callback parameters. Optional.timeout : int
Seconds to wait until process is aborted. A running transfer is not aborted even when timeout was hit. Optional.
Raises: TimeoutException
When a timeout occurred.
-
zget.put(filename, output=None, interface=None, address=None, port=None, reporthook=None, timeout=None)¶ Send a file using the zget protocol.
Parameters: filename : string
The filename to be transferred
output : string
The alias to share on the network. Optional. If empty, the input filename will be used.
interface : string
The network interface to use. Optional.
address : string
The network address to use. Optional.
port : int
The network port to use. Optional.
reporthook : callable
A hook that will be called during transfer. Handy for watching the transfer. See
urllib.urlretrievefor callback parameters. Optional.timeout : int
Seconds to wait until process is aborted. A running transfer is not aborted even when timeout was hit. Optional.
Raises: TimeoutException
When a timeout occurred.
-
exception
zget.TimeoutException(msg=u'Timeout.')¶ Bases:
exceptions.ExceptionException raised when a timeout was hit.