code
stringlengths
66
870k
docstring
stringlengths
19
26.7k
func_name
stringlengths
1
138
language
stringclasses
1 value
repo
stringlengths
7
68
path
stringlengths
5
324
url
stringlengths
46
389
license
stringclasses
7 values
def reset(self): """Reset this instance. Loses all unprocessed data.""" self.rawdata = '' self.lasttag = '???' self.interesting = interesting_normal self.cdata_elem = None markupbase.ParserBase.reset(self)
Reset this instance. Loses all unprocessed data.
reset
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/HTMLParser.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/HTMLParser.py
MIT
def addheader(self, key, value): """Add header for field key handling repeats.""" prev = self.dict.get(key) if prev is None: self.dict[key] = value else: combined = ", ".join((prev, value)) self.dict[key] = combined
Add header for field key handling repeats.
addheader
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def addcontinue(self, key, more): """Add more field data from a continuation line.""" prev = self.dict[key] self.dict[key] = prev + "\n " + more
Add more field data from a continuation line.
addcontinue
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def readheaders(self): """Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an a...
Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an attempt is made to backspace over i...
readheaders
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads. Normally, we have a blocking socket, but a read() can be interrupted by a signal (resulting in a partial read). Note that we cannot distinguish between EOF and an interrupt when zero ...
Read the number of bytes requested, compensating for partial reads. Normally, we have a blocking socket, but a read() can be interrupted by a signal (resulting in a partial read). Note that we cannot distinguish between EOF and an interrupt when zero bytes have been read. IncompleteRea...
_safe_read
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def getheaders(self): """Return list of (header, value) tuples.""" if self.msg is None: raise ResponseNotReady() return self.msg.items()
Return list of (header, value) tuples.
getheaders
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def set_tunnel(self, host, port=None, headers=None): """ Set up host and port for HTTP CONNECT tunnelling. In a connection that uses HTTP Connect tunneling, the host passed to the constructor is used as proxy server that relays all communication to the endpoint passed to set_tunnel. Thi...
Set up host and port for HTTP CONNECT tunnelling. In a connection that uses HTTP Connect tunneling, the host passed to the constructor is used as proxy server that relays all communication to the endpoint passed to set_tunnel. This is done by sending a HTTP CONNECT request to the proxy...
set_tunnel
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def connect(self): """Connect to the host and port specified in __init__.""" self.sock = self._create_connection((self.host,self.port), self.timeout, self.source_address) if self._tunnel_host: self._tunnel()
Connect to the host and port specified in __init__.
connect
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def close(self): """Close the connection to the HTTP server.""" self.__state = _CS_IDLE try: sock = self.sock if sock: self.sock = None sock.close() # close it manually... there may be other refs finally: response = se...
Close the connection to the HTTP server.
close
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def _send_output(self, message_body=None): """Send the currently buffered request and clear the buffer. Appends an extra \\r\\n to the buffer. A message_body may be specified, to be appended to the request. """ self._buffer.extend(("", "")) msg = "\r\n".join(self._buffer...
Send the currently buffered request and clear the buffer. Appends an extra \r\n to the buffer. A message_body may be specified, to be appended to the request.
_send_output
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): """Send a request to the server. `method' specifies an HTTP request method, e.g. 'GET'. `url' specifies the object being requested, e.g. '/index.html'. `skip_host' if True does not add automatically a 'Host:' header...
Send a request to the server. `method' specifies an HTTP request method, e.g. 'GET'. `url' specifies the object being requested, e.g. '/index.html'. `skip_host' if True does not add automatically a 'Host:' header `skip_accept_encoding' if True does not add automatically an 'A...
putrequest
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def putheader(self, header, *values): """Send a request header line to the server. For example: h.putheader('Accept', 'text/html') """ if self.__state != _CS_REQ_STARTED: raise CannotSendHeader() header = '%s' % header if not _is_legal_header_name(header): ...
Send a request header line to the server. For example: h.putheader('Accept', 'text/html')
putheader
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def endheaders(self, message_body=None): """Indicate that the last header line has been sent to the server. This method sends the request to the server. The optional message_body argument can be used to pass a message body associated with the request. The message body will be sent in ...
Indicate that the last header line has been sent to the server. This method sends the request to the server. The optional message_body argument can be used to pass a message body associated with the request. The message body will be sent in the same packet as the message headers if it...
endheaders
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def getresponse(self, buffering=False): "Get the response from the server." # if a prior response has been completed, then forget about it. if self.__response and self.__response.isclosed(): self.__response = None # # if a prior response exists, then it must be comp...
Get the response from the server.
getresponse
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def __init__(self, host='', port=None, strict=None): "Provide a default host, since the superclass requires one." # some joker passed 0 explicitly, meaning default port if port == 0: port = None # Note that we may pass an empty string as the host; this will raise # ...
Provide a default host, since the superclass requires one.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def connect(self, host=None, port=None): "Accept arguments to set the host/port, since the superclass doesn't." if host is not None: (self._conn.host, self._conn.port) = self._conn._get_hostport(host, port) self._conn.connect()
Accept arguments to set the host/port, since the superclass doesn't.
connect
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def getreply(self, buffering=False): """Compat definition since superclass does not define it. Returns a tuple consisting of: - server status code (e.g. '200' if all goes well) - server "reason" corresponding to status code - any RFC822 headers in the response from the server ...
Compat definition since superclass does not define it. Returns a tuple consisting of: - server status code (e.g. '200' if all goes well) - server "reason" corresponding to status code - any RFC822 headers in the response from the server
getreply
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def connect(self): "Connect to a host on a given (SSL) port." HTTPConnection.connect(self) if self._tunnel_host: server_hostname = self._tunnel_host else: server_hostname = self.host self.sock = self._context.wrap_socket(self...
Connect to a host on a given (SSL) port.
connect
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/httplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/httplib.py
MIT
def open(self, host = '', port = IMAP4_PORT): """Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host = host self.port = port ...
Setup connection to remote server on "host:port" (default: localhost:standard IMAP4 port). This connection will be used by the routines: read, readline, send, shutdown.
open
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def recent(self): """Return most recent 'RECENT' responses if any exist, else prompt server for an update using the 'NOOP' command. (typ, [data]) = <instance>.recent() 'data' is None if no new messages, else list of RECENT responses, most recent last. """ name =...
Return most recent 'RECENT' responses if any exist, else prompt server for an update using the 'NOOP' command. (typ, [data]) = <instance>.recent() 'data' is None if no new messages, else list of RECENT responses, most recent last.
recent
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def append(self, mailbox, flags, date_time, message): """Append message to named mailbox. (typ, [data]) = <instance>.append(mailbox, flags, date_time, message) All args except `message' can be None. """ name = 'APPEND' if not mailbox: mailbox = 'INBO...
Append message to named mailbox. (typ, [data]) = <instance>.append(mailbox, flags, date_time, message) All args except `message' can be None.
append
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def authenticate(self, mechanism, authobject): """Authenticate command - requires response processing. 'mechanism' specifies which authentication mechanism is to be used - it must appear in <instance>.capabilities in the form AUTH=<mechanism>. 'authobject' must be a callable ob...
Authenticate command - requires response processing. 'mechanism' specifies which authentication mechanism is to be used - it must appear in <instance>.capabilities in the form AUTH=<mechanism>. 'authobject' must be a callable object: data = authobject(response) ...
authenticate
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def capability(self): """(typ, [data]) = <instance>.capability() Fetch capabilities list from server.""" name = 'CAPABILITY' typ, dat = self._simple_command(name) return self._untagged_response(typ, dat, name)
(typ, [data]) = <instance>.capability() Fetch capabilities list from server.
capability
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def close(self): """Close currently selected mailbox. Deleted messages are removed from writable mailbox. This is the recommended command before 'LOGOUT'. (typ, [data]) = <instance>.close() """ try: typ, dat = self._simple_command('CLOSE') finally: ...
Close currently selected mailbox. Deleted messages are removed from writable mailbox. This is the recommended command before 'LOGOUT'. (typ, [data]) = <instance>.close()
close
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def expunge(self): """Permanently remove deleted items from selected mailbox. Generates 'EXPUNGE' response for each deleted message. (typ, [data]) = <instance>.expunge() 'data' is list of 'EXPUNGE'd message numbers in order received. """ name = 'EXPUNGE' typ, d...
Permanently remove deleted items from selected mailbox. Generates 'EXPUNGE' response for each deleted message. (typ, [data]) = <instance>.expunge() 'data' is list of 'EXPUNGE'd message numbers in order received.
expunge
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def fetch(self, message_set, message_parts): """Fetch (parts of) messages. (typ, [data, ...]) = <instance>.fetch(message_set, message_parts) 'message_parts' should be a string of selected parts enclosed in parentheses, eg: "(UID BODY[TEXT])". 'data' are tuples of message part ...
Fetch (parts of) messages. (typ, [data, ...]) = <instance>.fetch(message_set, message_parts) 'message_parts' should be a string of selected parts enclosed in parentheses, eg: "(UID BODY[TEXT])". 'data' are tuples of message part envelope and data.
fetch
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def getacl(self, mailbox): """Get the ACLs for a mailbox. (typ, [data]) = <instance>.getacl(mailbox) """ typ, dat = self._simple_command('GETACL', mailbox) return self._untagged_response(typ, dat, 'ACL')
Get the ACLs for a mailbox. (typ, [data]) = <instance>.getacl(mailbox)
getacl
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def getannotation(self, mailbox, entry, attribute): """(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute) Retrieve ANNOTATIONs.""" typ, dat = self._simple_command('GETANNOTATION', mailbox, entry, attribute) return self._untagged_response(typ, dat, 'ANNOTATION')
(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute) Retrieve ANNOTATIONs.
getannotation
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def getquotaroot(self, mailbox): """Get the list of quota roots for the named mailbox. (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox) """ typ, dat = self._simple_command('GETQUOTAROOT', mailbox) typ, quota = self._untagged_response(typ, d...
Get the list of quota roots for the named mailbox. (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)
getquotaroot
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def list(self, directory='""', pattern='*'): """List mailbox names in directory matching pattern. (typ, [data]) = <instance>.list(directory='""', pattern='*') 'data' is list of LIST responses. """ name = 'LIST' typ, dat = self._simple_command(name, directory, pattern) ...
List mailbox names in directory matching pattern. (typ, [data]) = <instance>.list(directory='""', pattern='*') 'data' is list of LIST responses.
list
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def login(self, user, password): """Identify client using plaintext password. (typ, [data]) = <instance>.login(user, password) NB: 'password' will be quoted. """ typ, dat = self._simple_command('LOGIN', user, self._quote(password)) if typ != 'OK': raise self...
Identify client using plaintext password. (typ, [data]) = <instance>.login(user, password) NB: 'password' will be quoted.
login
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def login_cram_md5(self, user, password): """ Force use of CRAM-MD5 authentication. (typ, [data]) = <instance>.login_cram_md5(user, password) """ self.user, self.password = user, password return self.authenticate('CRAM-MD5', self._CRAM_MD5_AUTH)
Force use of CRAM-MD5 authentication. (typ, [data]) = <instance>.login_cram_md5(user, password)
login_cram_md5
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def _CRAM_MD5_AUTH(self, challenge): """ Authobject to use with CRAM-MD5 authentication. """ import hmac return self.user + " " + hmac.HMAC(self.password, challenge).hexdigest()
Authobject to use with CRAM-MD5 authentication.
_CRAM_MD5_AUTH
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def logout(self): """Shutdown connection to server. (typ, [data]) = <instance>.logout() Returns server 'BYE' response. """ self.state = 'LOGOUT' try: typ, dat = self._simple_command('LOGOUT') except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]] self....
Shutdown connection to server. (typ, [data]) = <instance>.logout() Returns server 'BYE' response.
logout
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def lsub(self, directory='""', pattern='*'): """List 'subscribed' mailbox names in directory matching pattern. (typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*') 'data' are tuples of message part envelope and data. """ name = 'LSUB' typ, dat = self._simpl...
List 'subscribed' mailbox names in directory matching pattern. (typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*') 'data' are tuples of message part envelope and data.
lsub
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def myrights(self, mailbox): """Show my ACLs for a mailbox (i.e. the rights that I have on mailbox). (typ, [data]) = <instance>.myrights(mailbox) """ typ,dat = self._simple_command('MYRIGHTS', mailbox) return self._untagged_response(typ, dat, 'MYRIGHTS')
Show my ACLs for a mailbox (i.e. the rights that I have on mailbox). (typ, [data]) = <instance>.myrights(mailbox)
myrights
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def namespace(self): """ Returns IMAP namespaces ala rfc2342 (typ, [data, ...]) = <instance>.namespace() """ name = 'NAMESPACE' typ, dat = self._simple_command(name) return self._untagged_response(typ, dat, name)
Returns IMAP namespaces ala rfc2342 (typ, [data, ...]) = <instance>.namespace()
namespace
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def noop(self): """Send NOOP command. (typ, [data]) = <instance>.noop() """ if __debug__: if self.debug >= 3: self._dump_ur(self.untagged_responses) return self._simple_command('NOOP')
Send NOOP command. (typ, [data]) = <instance>.noop()
noop
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def partial(self, message_num, message_part, start, length): """Fetch truncated part of a message. (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length) 'data' is tuple of message part envelope and data. """ name = 'PARTIAL' typ, dat = self._...
Fetch truncated part of a message. (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length) 'data' is tuple of message part envelope and data.
partial
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def proxyauth(self, user): """Assume authentication as "user". Allows an authorised administrator to proxy into any user's mailbox. (typ, [data]) = <instance>.proxyauth(user) """ name = 'PROXYAUTH' return self._simple_command('PROXYAUTH', user)
Assume authentication as "user". Allows an authorised administrator to proxy into any user's mailbox. (typ, [data]) = <instance>.proxyauth(user)
proxyauth
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def search(self, charset, *criteria): """Search mailbox for matching messages. (typ, [data]) = <instance>.search(charset, criterion, ...) 'data' is space separated list of matching message numbers. """ name = 'SEARCH' if charset: typ, dat = self._simple_comm...
Search mailbox for matching messages. (typ, [data]) = <instance>.search(charset, criterion, ...) 'data' is space separated list of matching message numbers.
search
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def select(self, mailbox='INBOX', readonly=False): """Select a mailbox. Flush all untagged responses. (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False) 'data' is count of messages in mailbox ('EXISTS' response). Mandated responses are ('FLAGS', 'EXISTS', 'REC...
Select a mailbox. Flush all untagged responses. (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False) 'data' is count of messages in mailbox ('EXISTS' response). Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so other responses should be obt...
select
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def setannotation(self, *args): """(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+) Set ANNOTATIONs.""" typ, dat = self._simple_command('SETANNOTATION', *args) return self._untagged_response(typ, dat, 'ANNOTATION')
(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+) Set ANNOTATIONs.
setannotation
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def sort(self, sort_criteria, charset, *search_criteria): """IMAP4rev1 extension SORT command. (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...) """ name = 'SORT' #if not name in self.capabilities: # Let the server decide! # raise s...
IMAP4rev1 extension SORT command. (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
sort
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def status(self, mailbox, names): """Request named status conditions for mailbox. (typ, [data]) = <instance>.status(mailbox, names) """ name = 'STATUS' #if self.PROTOCOL_VERSION == 'IMAP4': # Let the server decide! # raise self.error('%s unimplemented in IMAP4 (obta...
Request named status conditions for mailbox. (typ, [data]) = <instance>.status(mailbox, names)
status
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def store(self, message_set, command, flags): """Alters flag dispositions for messages in mailbox. (typ, [data]) = <instance>.store(message_set, command, flags) """ if (flags[0],flags[-1]) != ('(',')'): flags = '(%s)' % flags # Avoid quoting the flags typ, dat = sel...
Alters flag dispositions for messages in mailbox. (typ, [data]) = <instance>.store(message_set, command, flags)
store
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def thread(self, threading_algorithm, charset, *search_criteria): """IMAPrev1 extension THREAD command. (type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...) """ name = 'THREAD' typ, dat = self._simple_command(name, threading_algorithm, charset, ...
IMAPrev1 extension THREAD command. (type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...)
thread
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def uid(self, command, *args): """Execute "command arg ..." with messages identified by UID, rather than message number. (typ, [data]) = <instance>.uid(command, arg1, arg2, ...) Returns response appropriate to 'command'. """ command = command.upper() if ...
Execute "command arg ..." with messages identified by UID, rather than message number. (typ, [data]) = <instance>.uid(command, arg1, arg2, ...) Returns response appropriate to 'command'.
uid
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def xatom(self, name, *args): """Allow simple extension commands notified by server in CAPABILITY response. Assumes command is legal in current state. (typ, [data]) = <instance>.xatom(name, arg, ...) Returns response appropriate to extension command `name'. """...
Allow simple extension commands notified by server in CAPABILITY response. Assumes command is legal in current state. (typ, [data]) = <instance>.xatom(name, arg, ...) Returns response appropriate to extension command `name'.
xatom
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def open(self, host = '', port = IMAP4_SSL_PORT): """Setup connection to remote server on "host:port". (default: localhost:standard IMAP4 SSL port). This connection will be used by the routines: read, readline, send, shutdown. """ self.host...
Setup connection to remote server on "host:port". (default: localhost:standard IMAP4 SSL port). This connection will be used by the routines: read, readline, send, shutdown.
open
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def open(self, host = None, port = None): """Setup a stream connection. This connection will be used by the routines: read, readline, send, shutdown. """ self.host = None # For compatibility with parent class self.port = None self.sock = None se...
Setup a stream connection. This connection will be used by the routines: read, readline, send, shutdown.
open
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def Internaldate2tuple(resp): """Parse an IMAP4 INTERNALDATE string. Return corresponding local time. The return value is a time.struct_time instance or None if the string has wrong format. """ mo = InternalDate.match(resp) if not mo: return None mon = Mon2num[mo.group('mon')] ...
Parse an IMAP4 INTERNALDATE string. Return corresponding local time. The return value is a time.struct_time instance or None if the string has wrong format.
Internaldate2tuple
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def ParseFlags(resp): """Convert IMAP4 flags response to python tuple.""" mo = Flags.match(resp) if not mo: return () return tuple(mo.group('flags').split())
Convert IMAP4 flags response to python tuple.
ParseFlags
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def Time2Internaldate(date_time): """Convert date_time to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'. The date_time argument can be a number (int or float) representing seconds since epoch (as returned by time.time()), a 9-tuple representing local tim...
Convert date_time to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'. The date_time argument can be a number (int or float) representing seconds since epoch (as returned by time.time()), a 9-tuple representing local time (as returned by time.localtime()), or a ...
Time2Internaldate
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imaplib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imaplib.py
MIT
def install(self, namespace=vars(__builtin__)): "Install this ImportManager into the specified namespace." if isinstance(namespace, _ModuleType): namespace = vars(namespace) # Note: we have no notion of "chaining" # Record the previous import hook, then install our own. ...
Install this ImportManager into the specified namespace.
install
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _import_hook(self, fqname, globals=None, locals=None, fromlist=None): """Python calls this hook to locate and import a module.""" parts = fqname.split('.') # determine the context of this import parent = self._determine_import_context(globals) # if there is a parent, then ...
Python calls this hook to locate and import a module.
_import_hook
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _determine_import_context(self, globals): """Returns the context in which a module should be imported. The context could be a loaded (package) module and the imported module will be looked for within that package. The context could also be None, meaning there is no context -- the mo...
Returns the context in which a module should be imported. The context could be a loaded (package) module and the imported module will be looked for within that package. The context could also be None, meaning there is no context -- the module should be looked for as a "top-level" module...
_determine_import_context
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _reload_hook(self, module): "Python calls this hook to reload a module." # reloading of a module may or may not be possible (depending on the # importer), but at least we can validate that it's ours to reload importer = module.__dict__.get('__importer__') if not importer: ...
Python calls this hook to reload a module.
_reload_hook
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _load_tail(self, m, parts): """Import the rest of the modules, down from the top-level module. Returns the last module in the dotted list of modules. """ for part in parts: fqname = "%s.%s" % (m.__name__, part) m = self._import_one(m, part, fqname) ...
Import the rest of the modules, down from the top-level module. Returns the last module in the dotted list of modules.
_load_tail
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _import_fromlist(self, package, fromlist): 'Import any sub-modules in the "from" list.' # if '*' is present in the fromlist, then look for the '__all__' # variable to find additional items (modules) to import. if '*' in fromlist: fromlist = list(fromlist) + \ ...
Import any sub-modules in the "from" list.
_import_fromlist
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _do_import(self, parent, parts, fromlist): """Attempt to import the module relative to parent. This method is used when the import context specifies that <self> imported the parent module. """ top_name = parts[0] top_fqname = parent.__name__ + '.' + top_name ...
Attempt to import the module relative to parent. This method is used when the import context specifies that <self> imported the parent module.
_do_import
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _compile(pathname, timestamp): """Compile (and cache) a Python source file. The file specified by <pathname> is compiled to a code object and returned. Presuming the appropriate privileges exist, the bytecodes will be saved back to the filesystem for future imports. The source file's modif...
Compile (and cache) a Python source file. The file specified by <pathname> is compiled to a code object and returned. Presuming the appropriate privileges exist, the bytecodes will be saved back to the filesystem for future imports. The source file's modification timestamp must be provided as a Lo...
_compile
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _os_bootstrap(): "Set up 'os' module replacement functions for use during import bootstrap." names = sys.builtin_module_names join = None if 'posix' in names: sep = '/' from posix import stat elif 'nt' in names: sep = '\\' from nt import stat elif 'dos' in n...
Set up 'os' module replacement functions for use during import bootstrap.
_os_bootstrap
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _os_path_isdir(pathname): "Local replacement for os.path.isdir()." try: s = _os_stat(pathname) except OSError: return None return (s.st_mode & 0170000) == 0040000
Local replacement for os.path.isdir().
_os_path_isdir
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def _timestamp(pathname): "Return the file modification time as a Long." try: s = _os_stat(pathname) except OSError: return None return long(s.st_mtime)
Return the file modification time as a Long.
_timestamp
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/imputil.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/imputil.py
MIT
def ismethoddescriptor(object): """Return true if the object is a method descriptor. But not if ismethod() or isclass() or isfunction() are true. This is new in Python 2.2, and, for example, is true of int.__add__. An object passing this test has a __get__ attribute but not a __set__ attribute, bu...
Return true if the object is a method descriptor. But not if ismethod() or isclass() or isfunction() are true. This is new in Python 2.2, and, for example, is true of int.__add__. An object passing this test has a __get__ attribute but not a __set__ attribute, but beyond that the set of attributes var...
ismethoddescriptor
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def isgeneratorfunction(object): """Return true if the object is a user-defined generator function. Generator function objects provides same attributes as functions. See help(isfunction) for attributes listing.""" return bool((isfunction(object) or ismethod(object)) and object.func_cod...
Return true if the object is a user-defined generator function. Generator function objects provides same attributes as functions. See help(isfunction) for attributes listing.
isgeneratorfunction
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def isroutine(object): """Return true if the object is any kind of function or method.""" return (isbuiltin(object) or isfunction(object) or ismethod(object) or ismethoddescriptor(object))
Return true if the object is any kind of function or method.
isroutine
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getmembers(object, predicate=None): """Return all members of an object as (name, value) pairs sorted by name. Optionally, only return members that satisfy a given predicate.""" results = [] for key in dir(object): try: value = getattr(object, key) except AttributeError: ...
Return all members of an object as (name, value) pairs sorted by name. Optionally, only return members that satisfy a given predicate.
getmembers
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def classify_class_attrs(cls): """Return list of attribute-descriptor tuples. For each name in dir(cls), the return list contains a 4-tuple with these elements: 0. The name (a string). 1. The kind of attribute this is, one of these strings: 'class method' created via cla...
Return list of attribute-descriptor tuples. For each name in dir(cls), the return list contains a 4-tuple with these elements: 0. The name (a string). 1. The kind of attribute this is, one of these strings: 'class method' created via classmethod() 'static meth...
classify_class_attrs
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getmro(cls): "Return tuple of base classes (including cls) in method resolution order." if hasattr(cls, "__mro__"): return cls.__mro__ else: result = [] _searchbases(cls, result) return tuple(result)
Return tuple of base classes (including cls) in method resolution order.
getmro
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def indentsize(line): """Return the indent size, in spaces, at the start of a line of text.""" expline = string.expandtabs(line) return len(expline) - len(string.lstrip(expline))
Return the indent size, in spaces, at the start of a line of text.
indentsize
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getdoc(object): """Get the documentation string for an object. All tabs are expanded to spaces. To clean up docstrings that are indented to line up with blocks of code, any whitespace than can be uniformly removed from the second line onwards is removed.""" try: doc = object.__doc__ ...
Get the documentation string for an object. All tabs are expanded to spaces. To clean up docstrings that are indented to line up with blocks of code, any whitespace than can be uniformly removed from the second line onwards is removed.
getdoc
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def cleandoc(doc): """Clean up indentation from docstrings. Any whitespace that can be uniformly removed from the second line onwards is removed.""" try: lines = string.split(string.expandtabs(doc), '\n') except UnicodeError: return None else: # Find minimum indentation ...
Clean up indentation from docstrings. Any whitespace that can be uniformly removed from the second line onwards is removed.
cleandoc
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getfile(object): """Work out which source or compiled file an object was defined in.""" if ismodule(object): if hasattr(object, '__file__'): return object.__file__ raise TypeError('{!r} is a built-in module'.format(object)) if isclass(object): object = sys.modules.get...
Work out which source or compiled file an object was defined in.
getfile
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getmoduleinfo(path): """Get the module name, suffix, mode, and module type for a given file.""" filename = os.path.basename(path) suffixes = map(lambda info: (-len(info[0]), info[0], info[1], info[2]), imp.get_suffixes()) suffixes.sort() # try longest suffixes ...
Get the module name, suffix, mode, and module type for a given file.
getmoduleinfo
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getmodulename(path): """Return the module name for a given file, or None.""" info = getmoduleinfo(path) if info: return info[0]
Return the module name for a given file, or None.
getmodulename
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getsourcefile(object): """Return the filename that can be used to locate an object's source. Return None if no way can be identified to get the source. """ filename = getfile(object) if string.lower(filename[-4:]) in ('.pyc', '.pyo'): filename = filename[:-4] + '.py' for suffix, mode...
Return the filename that can be used to locate an object's source. Return None if no way can be identified to get the source.
getsourcefile
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getabsfile(object, _filename=None): """Return an absolute path to the source or compiled file for an object. The idea is for each object to have a unique origin, so this routine normalizes the result as much as possible.""" if _filename is None: _filename = getsourcefile(object) or getfile(...
Return an absolute path to the source or compiled file for an object. The idea is for each object to have a unique origin, so this routine normalizes the result as much as possible.
getabsfile
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getmodule(object, _filename=None): """Return the module an object was defined in, or None if not found.""" if ismodule(object): return object if hasattr(object, '__module__'): return sys.modules.get(object.__module__) # Try the filename to modulename cache if _filename is not Non...
Return the module an object was defined in, or None if not found.
getmodule
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. ...
Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is raised if th...
findsource
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getcomments(object): """Get lines of comments immediately preceding an object's source code. Returns None when source can't be found. """ try: lines, lnum = findsource(object) except (IOError, TypeError): return None if ismodule(object): # Look for a comment block a...
Get lines of comments immediately preceding an object's source code. Returns None when source can't be found.
getcomments
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getblock(lines): """Extract the block of code at the top of the given list of lines.""" blockfinder = BlockFinder() try: tokenize.tokenize(iter(lines).next, blockfinder.tokeneater) except (EndOfBlock, IndentationError): pass return lines[:blockfinder.last]
Extract the block of code at the top of the given list of lines.
getblock
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getsourcelines(object): """Return a list of source lines and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of the lines corresponding to the object and the line number indicates whe...
Return a list of source lines and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of the lines corresponding to the object and the line number indicates where in the original source file ...
getsourcelines
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getsource(object): """Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An IOError is raised if the source code cannot be retrieved.""" lines, lnum = getsou...
Return the text of the source code for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a single string. An IOError is raised if the source code cannot be retrieved.
getsource
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getclasstree(classes, unique=0): """Arrange the given list of classes into a hierarchy of nested lists. Where a nested list appears, it contains classes derived from the class whose entry immediately precedes the list. Each entry is a 2-tuple containing a class and a tuple of its base classes. If...
Arrange the given list of classes into a hierarchy of nested lists. Where a nested list appears, it contains classes derived from the class whose entry immediately precedes the list. Each entry is a 2-tuple containing a class and a tuple of its base classes. If the 'unique' argument is true, exactly ...
getclasstree
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getargs(co): """Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.""" if not is...
Get information about the arguments accepted by a code object. Three things are returned: (args, varargs, varkw), where 'args' is a list of argument names (possibly containing nested lists), and 'varargs' and 'varkw' are the names of the * and ** arguments or None.
getargs
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getargspec(func): """Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'de...
Get the names and default values of a function's arguments. A tuple of four things is returned: (args, varargs, varkw, defaults). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'defaults' is an n-tuple of the ...
getargspec
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getargvalues(frame): """Get information about arguments passed into a particular frame. A tuple of four things is returned: (args, varargs, varkw, locals). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. ...
Get information about arguments passed into a particular frame. A tuple of four things is returned: (args, varargs, varkw, locals). 'args' is a list of the argument names (it may contain nested lists). 'varargs' and 'varkw' are the names of the * and ** arguments or None. 'locals' is the locals diction...
getargvalues
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def strseq(object, convert, join=joinseq): """Recursively walk a sequence, stringifying each element.""" if type(object) in (list, tuple): return join(map(lambda o, c=convert, j=join: strseq(o, c, j), object)) else: return convert(object)
Recursively walk a sequence, stringifying each element.
strseq
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def formatargspec(args, varargs=None, varkw=None, defaults=None, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format...
Format an argument spec from the 4 values returned by getargspec. The first four arguments are (args, varargs, varkw, defaults). The other four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional functi...
formatargspec
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def formatargvalues(args, varargs, varkw, locals, formatarg=str, formatvarargs=lambda name: '*' + name, formatvarkw=lambda name: '**' + name, formatvalue=lambda value: '=' + repr(value), join=joinseq): """Format an a...
Format an argument spec from the 4 values returned by getargvalues. The first four arguments are (args, varargs, varkw, locals). The next four arguments are the corresponding optional formatting functions that are called to turn names and values into strings. The ninth argument is an optional functio...
formatargvalues
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getcallargs(func, *positional, **named): """Get the mapping of arguments to values. A dict is returned, with keys the function argument names (including the names of the * and ** arguments, if any), and values the respective bound values from 'positional' and 'named'.""" args, varargs, varkw, d...
Get the mapping of arguments to values. A dict is returned, with keys the function argument names (including the names of the * and ** arguments, if any), and values the respective bound values from 'positional' and 'named'.
getcallargs
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getframeinfo(frame, context=1): """Get information about a frame or traceback object. A tuple of five things is returned: the filename, the line number of the current line, the function name, a list of lines of context from the source code, and the index of the current line within that list. Th...
Get information about a frame or traceback object. A tuple of five things is returned: the filename, the line number of the current line, the function name, a list of lines of context from the source code, and the index of the current line within that list. The optional second argument specifies the nu...
getframeinfo
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getouterframes(frame, context=1): """Get a list of records for a frame and all higher (calling) frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.""" framelist = [] while frame: framelist.append((f...
Get a list of records for a frame and all higher (calling) frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.
getouterframes
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getinnerframes(tb, context=1): """Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.""" framelist = [] while tb: framelist.append((tb.tb_...
Get a list of records for a traceback's frame and all lower frames. Each record contains a frame object, filename, line number, function name, a list of lines of context, and index within the context.
getinnerframes
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/inspect.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/inspect.py
MIT
def getlines(filename, module_globals=None): """Get the lines for a file from the cache. Update the cache if it doesn't contain an entry for this file already.""" if filename in cache: return cache[filename][2] try: return updatecache(filename, module_globals) except MemoryError: ...
Get the lines for a file from the cache. Update the cache if it doesn't contain an entry for this file already.
getlines
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/linecache.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/linecache.py
MIT
def checkcache(filename=None): """Discard cache entries that are out of date. (This is not checked upon each call!)""" if filename is None: filenames = cache.keys() else: if filename in cache: filenames = [filename] else: return for filename in filen...
Discard cache entries that are out of date. (This is not checked upon each call!)
checkcache
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/linecache.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/linecache.py
MIT
def updatecache(filename, module_globals=None): """Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.""" if filename in cache: del cache[filename] if not filename or (filename.startswith('<') and filen...
Update a cache entry and return its list of lines. If something's wrong, print a message, discard the cache entry, and return an empty list.
updatecache
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/linecache.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/linecache.py
MIT
def localeconv(): """ localeconv() -> dict. Returns numeric and monetary locale-specific parameters. """ # 'C' locale default values return {'grouping': [127], 'currency_symbol': '', 'n_sign_posn': 127, 'p_cs_precedes': 127, ...
localeconv() -> dict. Returns numeric and monetary locale-specific parameters.
localeconv
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/locale.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/locale.py
MIT