Package ternate :: Module utils
[hide private]
[frames] | no frames]

Module utils

source code

utils.py

Misc utilities for ternate

General purpose helper functions and classes for ternate

License: GPL-2

Classes [hide private]
  NotFoundError
File not found
Functions [hide private]
string
fetch_file(url, proxy=None)
Download file by URL
source code
Variables [hide private]
  LOG = logging.getLogger('ternate')
  COLOR = {'black': '\x1b[30m', 'blink': '\x1b[5m', 'blue': '\x1...
Function Details [hide private]

fetch_file(url, proxy=None)

source code 

Download file by URL

Parameters:
  • url (string) - URL of a file
  • proxy (string) - URL of HTTP Proxy
Returns: string
File

Variables Details [hide private]

COLOR

Value:
{'black': '\x1b[30m',
 'blink': '\x1b[5m',
 'blue': '\x1b[34m',
 'bold': '\x1b[1m',
 'cyan': '\x1b[36m',
 'green': '\x1b[32m',
 'magenta': '\x1b[35m',
 'normal': '\x1b[0m',
...