Package Halberd :: Module util |
[show private | hide private]
[frames | no frames]

## Module Halberd.util

Miscellaneous functions.

Function Summary
`tuple` | ``addresses`(host)` Get the network addresses to which a given host resolves to.
`str` | ``hostname`(url)` Get the hostname part of an URL.
| `utctime()`

Variable Summary
`str` | `table`: Translation table for normalizing strings.

Function Details

### addresses(host) Get the network addresses to which a given host resolves to. Parameters: `host` - Hostname we want to resolve. (type=`str`) Returns: Network addresses. (type=`tuple`)

### hostname(url) Get the hostname part of an URL. Parameters: `url` - A valid URL (must be preceded by scheme://). (type=`str`) Returns: Hostname corresponding to the URL or the empty string in case of failure. (type=`str`)

Variable Details

    ### table Translation table for normalizing strings. Type: `str` Value:
        '________________________________________________0123456789_______ABCD\
        EFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz________________\
        ______________________________________________________________________\
        _______________________________________________'

Generated by Epydoc 2.1 on Wed Jul 18 22:25:57 2007 | http://epydoc.sf.net