Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
GopherHandler Class Reference
Inheritance diagram for GopherHandler:
BaseHandler

Public Member Functions

def gopher_open
 
- Public Member Functions inherited from BaseHandler
def add_parent
 
def close
 

Additional Inherited Members

- Data Fields inherited from BaseHandler
 parent
 

Detailed Description

Definition at line 987 of file urllib2.py.

Member Function Documentation

def gopher_open (   self,
  req 
)

Definition at line 988 of file urllib2.py.

References urllib.noheaders(), gopherlib.send_query(), gopherlib.send_selector(), urllib.splitgophertype(), urllib.splitquery(), and rfc822.unquote().

989  def gopher_open(self, req):
990  host = req.get_host()
991  if not host:
992  raise GopherError('no host given')
993  host = unquote(host)
994  selector = req.get_selector()
995  type, selector = splitgophertype(selector)
996  selector, query = splitquery(selector)
997  selector = unquote(selector)
998  if query:
999  query = unquote(query)
1000  fp = gopherlib.send_query(selector, query, host)
1001  else:
1002  fp = gopherlib.send_selector(selector, host)
1003  return addinfourl(fp, noheaders(), req.get_full_url())
1004 
#bleck! don't use this yet

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