Package Bio :: Module NetCatch :: Class NetCatch
[hide private]
[frames] | no frames]

Class NetCatch

source code

Decorator for a dictionary of links. Each link is indexed by its label. Allows the user to select links of interest and read each selection into its own file. The filename is contructed by appending the label with an extension of html.

Files can be selected by index, range or label. The destination directory defaults to the current directory. The user can specify another dictionary by passing a list of path segments to the constructor.

net_catch = NetCatch() net_catch = NetCatch( [ 'amylase', 'species' ] ) net_catch.get_all_urls() net_catch.get_urls_by_label( [ 'pig', 'dog', 'cow' ] ) net_catch.get_urls_by_index( [ 1, 4, 6, 9 ] ) net_catch.get_urls_by_range( 2, 5 )

Instance Methods [hide private]
 
__init__(self, path_segments=[]) source code
 
_build_path(self) source code
 
__str__(self) source code
 
import_dict(self, href_dict) source code
 
add_url(self, label, url) source code
 
get_all_urls(self) source code
 
get_urls_by_label(self, labels) source code
 
get_urls_by_index(self, indices) source code
 
get_urls_by_range(self, low, hi) source code