Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
RuleLine Class Reference

Public Member Functions

def __init__
 
def applies_to
 
def __str__
 

Data Fields

 path
 
 allowance
 

Detailed Description

A rule line is a single "Allow:" (allowance==1) or "Disallow:"
   (allowance==0) followed by a path.

Definition at line 146 of file robotparser.py.

Constructor & Destructor Documentation

def __init__ (   self,
  path,
  allowance 
)

Definition at line 149 of file robotparser.py.

150  def __init__(self, path, allowance):
151  self.path = urllib.quote(path)
152  self.allowance = allowance

Member Function Documentation

def __str__ (   self)

Definition at line 156 of file robotparser.py.

References RuleLine.allowance, RobotFileParser.path, MH.path, and RuleLine.path.

157  def __str__(self):
158  return (self.allowance and "Allow" or "Disallow")+": "+self.path
159 
def applies_to (   self,
  filename 
)

Definition at line 153 of file robotparser.py.

References RobotFileParser.path, MH.path, and RuleLine.path.

154  def applies_to(self, filename):
155  return self.path=="*" or re.match(self.path, filename)

Field Documentation

allowance

Definition at line 151 of file robotparser.py.

path

Definition at line 150 of file robotparser.py.


The documentation for this class was generated from the following file: