Table of Contents

Class: NetCatch Bio/NetCatch.py

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 )

Methods   
__init__
__str__
_build_path
add_url
get_all_urls
get_urls_by_index
get_urls_by_label
get_urls_by_range
import_dict
  __init__ 
__init__ ( self,  path_segments=[] )

  __str__ 
__str__ ( self )

  _build_path 
_build_path ( self )

  add_url 
add_url (
        self,
        label,
        url,
        )

  get_all_urls 
get_all_urls ( self )

  get_urls_by_index 
get_urls_by_index ( self,  indices )

  get_urls_by_label 
get_urls_by_label ( self,  labels )

  get_urls_by_range 
get_urls_by_range (
        self,
        low,
        hi,
        )

  import_dict 
import_dict ( self,  href_dict )


Table of Contents

This document was automatically generated on Mon Jul 1 12:02:43 2002 by HappyDoc version 2.0.1