Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Functions | |
def | type_to_name |
def | send_selector |
def | send_query |
def | path_to_selector |
def | path_to_datatype_name |
def | get_directory |
def | get_textfile |
def | get_alt_textfile |
def | get_binary |
def | get_alt_binary |
def | test |
Variables | |
list | __all__ = ["send_selector","send_query"] |
string | DEF_SELECTOR = '1/' |
string | DEF_HOST = 'gopher.micro.umn.edu' |
int | DEF_PORT = 70 |
string | A_TEXT = '0' |
string | A_MENU = '1' |
string | A_CSO = '2' |
string | A_ERROR = '3' |
string | A_MACBINHEX = '4' |
string | A_PCBINHEX = '5' |
string | A_UUENCODED = '6' |
string | A_INDEX = '7' |
string | A_TELNET = '8' |
string | A_BINARY = '9' |
string | A_DUPLICATE = '+' |
string | A_SOUND = 's' |
string | A_EVENT = 'e' |
string | A_CALENDAR = 'c' |
string | A_HTML = 'h' |
string | A_TN3270 = 'T' |
string | A_MIME = 'M' |
string | A_IMAGE = 'I' |
string | A_WHOIS = 'w' |
string | A_QUERY = 'q' |
string | A_GIF = 'g' |
string | A_WWW = 'w' |
string | A_PLUS_IMAGE = ':' |
string | A_PLUS_MOVIE = ';' |
string | A_PLUS_SOUND = '<' |
tuple | _names = dir() |
dictionary | _type_to_name_map = {} |
string | CRLF = '\r\n' |
string | TAB = '\t' |
Gopher protocol client interface.
def gopherlib.get_alt_binary | ( | f, | |
func, | |||
blocksize | |||
) |
def gopherlib.get_alt_textfile | ( | f, | |
func | |||
) |
Get a text file and pass each line to a function, with trailing CRLF stripped.
Definition at line 134 of file gopherlib.py.
def gopherlib.get_binary | ( | f) |
def gopherlib.get_directory | ( | f) |
Get a directory in the form of a list of entries.
Definition at line 96 of file gopherlib.py.
References dospath.split().
def gopherlib.get_textfile | ( | f) |
Get a text file as a list of lines, with trailing CRLF stripped.
Definition at line 128 of file gopherlib.py.
References get_alt_textfile().
def gopherlib.path_to_datatype_name | ( | path) |
Takes a path as returned by urlparse and maps it to a string. See section 3.4 of RFC 1738 for details.
Definition at line 84 of file gopherlib.py.
References type_to_name().
def gopherlib.path_to_selector | ( | path) |
Takes a path as returned by urlparse and returns the appropriate selector.
Definition at line 77 of file gopherlib.py.
def gopherlib.send_query | ( | selector, | |
query, | |||
host, | |||
port = 0 |
|||
) |
Send a selector and a query string.
Definition at line 73 of file gopherlib.py.
References send_selector().
def gopherlib.send_selector | ( | selector, | |
host, | |||
port = 0 |
|||
) |
Send a selector to a given host and port, return a file with the reply.
Definition at line 56 of file gopherlib.py.
References socket.socket().
def gopherlib.test | ( | ) |
Trivial test program.
Definition at line 164 of file gopherlib.py.
References get_binary(), get_directory(), get_textfile(), getopt.getopt(), send_query(), and send_selector().
def gopherlib.type_to_name | ( | gtype) |
Map all file types to strings; unknown types become TYPE='x'.
Definition at line 41 of file gopherlib.py.
list __all__ = ["send_selector","send_query"] |
Definition at line 3 of file gopherlib.py.
tuple _names = dir() |
Definition at line 39 of file gopherlib.py.
dictionary _type_to_name_map = {} |
Definition at line 40 of file gopherlib.py.
string A_BINARY = '9' |
Definition at line 20 of file gopherlib.py.
string A_CALENDAR = 'c' |
Definition at line 24 of file gopherlib.py.
string A_CSO = '2' |
Definition at line 13 of file gopherlib.py.
string A_DUPLICATE = '+' |
Definition at line 21 of file gopherlib.py.
string A_ERROR = '3' |
Definition at line 14 of file gopherlib.py.
string A_EVENT = 'e' |
Definition at line 23 of file gopherlib.py.
string A_GIF = 'g' |
Definition at line 31 of file gopherlib.py.
string A_HTML = 'h' |
Definition at line 25 of file gopherlib.py.
string A_IMAGE = 'I' |
Definition at line 28 of file gopherlib.py.
string A_INDEX = '7' |
Definition at line 18 of file gopherlib.py.
string A_MACBINHEX = '4' |
Definition at line 15 of file gopherlib.py.
string A_MENU = '1' |
Definition at line 12 of file gopherlib.py.
string A_MIME = 'M' |
Definition at line 27 of file gopherlib.py.
string A_PCBINHEX = '5' |
Definition at line 16 of file gopherlib.py.
string A_PLUS_IMAGE = ':' |
Definition at line 34 of file gopherlib.py.
string A_PLUS_MOVIE = ';' |
Definition at line 35 of file gopherlib.py.
string A_PLUS_SOUND = '<' |
Definition at line 36 of file gopherlib.py.
string A_QUERY = 'q' |
Definition at line 30 of file gopherlib.py.
string A_SOUND = 's' |
Definition at line 22 of file gopherlib.py.
string A_TELNET = '8' |
Definition at line 19 of file gopherlib.py.
string A_TEXT = '0' |
Definition at line 11 of file gopherlib.py.
string A_TN3270 = 'T' |
Definition at line 26 of file gopherlib.py.
string A_UUENCODED = '6' |
Definition at line 17 of file gopherlib.py.
string A_WHOIS = 'w' |
Definition at line 29 of file gopherlib.py.
string A_WWW = 'w' |
Definition at line 33 of file gopherlib.py.
string CRLF = '\r\n' |
Definition at line 53 of file gopherlib.py.
string DEF_HOST = 'gopher.micro.umn.edu' |
Definition at line 7 of file gopherlib.py.
int DEF_PORT = 70 |
Definition at line 8 of file gopherlib.py.
string DEF_SELECTOR = '1/' |
Definition at line 6 of file gopherlib.py.
string TAB = '\t' |
Definition at line 54 of file gopherlib.py.