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 call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete or timeout, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example:: retcode = call(["ls", "-l"]) """ timeout = kwargs.pop('...
Run command with arguments. Wait for command to complete or timeout, then return the returncode attribute. The arguments are the same as for the Popen constructor. Example:: retcode = call(["ls", "-l"])
call
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def check_call(*popenargs, **kwargs): """Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute. The arguments are the same...
Run command with arguments. Wait for command to complete. If the exit code was zero then return, otherwise raise :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute. The arguments are the same as for the Popen constructor. Example:: ...
check_call
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output. If the exit code was non-zero it raises a :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute and output in the output attribute....
Run command with arguments and return its output. If the exit code was non-zero it raises a :exc:`CalledProcessError`. The ``CalledProcessError`` object will have the return code in the returncode attribute and output in the output attribute. The arguments are the same as for the Pop...
check_output
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. If the exit code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and output in the output attr...
Run command with arguments and return its output as a byte string. If the exit code was non-zero it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute and output in the output attribute. The arguments are the same as for th...
check_output
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def __init__(self, args, bufsize=None, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=_PLATFORM_DEFAULT_CLOSE_FDS, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0, threadpo...
Create new Popen instance. :param kwargs: *Only* allowed under Python 3; under Python 2, any unrecognized keyword arguments will result in a :exc:`TypeError`. Under Python 3, keyword arguments can include ``pass_fds``, ``start_new_session``, and ``restore_signals``.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def communicate(self, input=None, timeout=None): """Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no ...
Interact with process: Send data to stdin. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate. The optional input argument should be a string to be sent to the child process, or None, if no data should be sent to the child. communica...
communicate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin is None and stdout is None and stderr is None: return (None, None, None, None, None, None) ...
Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
_get_handles
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _make_inheritable(self, handle): """Return a duplicate of handle, which is inheritable""" return DuplicateHandle(GetCurrentProcess(), handle, GetCurrentProcess(), 0, 1, DUPLICATE_SAME_ACCESS)
Return a duplicate of handle, which is inheritable
_make_inheritable
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _find_w9xpopen(self): """Find and return absolute path to w9xpopen.exe""" w9xpopen = os.path.join(os.path.dirname(GetModuleFileName(0)), "w9xpopen.exe") if not os.path.exists(w9xpopen): # Eeek - file-not-found - possibly an embe...
Find and return absolute path to w9xpopen.exe
_find_w9xpopen
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _internal_poll(self): """Check if child process has terminated. Returns returncode attribute. """ if self.returncode is None: if WaitForSingleObject(self._handle, 0) == WAIT_OBJECT_0: self.returncode = GetExitCodeProcess(self._hand...
Check if child process has terminated. Returns returncode attribute.
_internal_poll
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def wait(self, timeout=None): """Wait for child process to terminate. Returns returncode attribute.""" if self.returncode is None: if not self._waiting: self._waiting = True self._wait() result = self.result.wait(ti...
Wait for child process to terminate. Returns returncode attribute.
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _get_handles(self, stdin, stdout, stderr): """Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ p2cread, p2cwrite = None, None c2pread, c2pwrite = None, None errread, errwrite = None, None ...
Construct and return tuple with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite
_get_handles
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def pipe_cloexec(self): """Create a pipe with FDs set CLOEXEC.""" # Pipes' FDs are set CLOEXEC by default because we don't want them # to be inherited by other subprocesses: the CLOEXEC flag is removed # from the child's FDs by _dup2(), between fork() and exec(). ...
Create a pipe with FDs set CLOEXEC.
pipe_cloexec
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def _internal_poll(self): """Check if child process has terminated. Returns returncode attribute. """ if self.returncode is None: if get_hub() is not getcurrent(): sig_pending = getattr(self._loop, 'sig_pending', True) ...
Check if child process has terminated. Returns returncode attribute.
_internal_poll
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def wait(self, timeout=None): """Wait for child process to terminate. Returns :attr:`returncode` attribute. :keyword timeout: The floating point number of seconds to wait. Under Python 2, this is a gevent extension, and we simply return if it expires...
Wait for child process to terminate. Returns :attr:`returncode` attribute. :keyword timeout: The floating point number of seconds to wait. Under Python 2, this is a gevent extension, and we simply return if it expires. Under Python 3, if this tim...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/subprocess.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/subprocess.py
MIT
def join(self): """Waits until all outstanding tasks have been completed.""" delay = 0.0005 while self.task_queue.unfinished_tasks > 0: sleep(delay) delay = min(delay * 2, .05)
Waits until all outstanding tasks have been completed.
join
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/threadpool.py
MIT
def spawn(self, func, *args, **kwargs): """ Add a new task to the threadpool that will run ``func(*args, **kwargs)``. Waits until a slot is available. Creates a new thread if necessary. :return: A :class:`gevent.event.AsyncResult`. """ while True: semaphore ...
Add a new task to the threadpool that will run ``func(*args, **kwargs)``. Waits until a slot is available. Creates a new thread if necessary. :return: A :class:`gevent.event.AsyncResult`.
spawn
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/threadpool.py
MIT
def apply_e(self, expected_errors, function, args=None, kwargs=None): """ .. deprecated:: 1.1a2 Identical to :meth:`apply`; the ``expected_errors`` argument is ignored. """ # Deprecated but never documented. In the past, before # self.apply() allowed all errors to be r...
.. deprecated:: 1.1a2 Identical to :meth:`apply`; the ``expected_errors`` argument is ignored.
apply_e
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/threadpool.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/threadpool.py
MIT
def start_new(cls, timeout=None, exception=None, ref=True): """Create a started :class:`Timeout`. This is a shortcut, the exact action depends on *timeout*'s type: * If *timeout* is a :class:`Timeout`, then call its :meth:`start` method if it's not already begun. * Otherwise,...
Create a started :class:`Timeout`. This is a shortcut, the exact action depends on *timeout*'s type: * If *timeout* is a :class:`Timeout`, then call its :meth:`start` method if it's not already begun. * Otherwise, create a new :class:`Timeout` instance, passing (*timeout*, *exception...
start_new
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/timeout.py
MIT
def __str__(self): """ >>> raise Timeout #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... Timeout """ if self.seconds is None: return '' suffix = '' if self.seconds == 1 else 's' if self.exception is None:...
>>> raise Timeout #doctest: +IGNORE_EXCEPTION_DETAIL Traceback (most recent call last): ... Timeout
__str__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/timeout.py
MIT
def with_timeout(seconds, function, *args, **kwds): """Wrap a call to *function* with a timeout; if the called function fails to return before the timeout, cancel it and return a flag value, provided by *timeout_value* keyword argument. If timeout expires but *timeout_value* is not provided, raise :cla...
Wrap a call to *function* with a timeout; if the called function fails to return before the timeout, cancel it and return a flag value, provided by *timeout_value* keyword argument. If timeout expires but *timeout_value* is not provided, raise :class:`Timeout`. Keyword argument *timeout_value* is not ...
with_timeout
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/timeout.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/timeout.py
MIT
def __init__(self, errors, func): """ Calling this makes a new function from *func*, such that it catches *errors* (an :exc:`BaseException` subclass, or a tuple of :exc:`BaseException` subclasses) and return it as a value. """ self.__errors = errors self.__func = ...
Calling this makes a new function from *func*, such that it catches *errors* (an :exc:`BaseException` subclass, or a tuple of :exc:`BaseException` subclasses) and return it as a value.
__init__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/util.py
MIT
def fromEnvironment(cls): """ Get as many of the platform-specific error translation objects as possible and return an instance of C{cls} created with them. """ try: from ctypes import WinError except ImportError: WinError = None try: ...
Get as many of the platform-specific error translation objects as possible and return an instance of C{cls} created with them.
fromEnvironment
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/win32util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/win32util.py
MIT
def formatError(self, errorcode): """ Returns the string associated with a Windows error message, such as the ones found in socket.error. Attempts direct lookup against the win32 API via ctypes and then pywin32 if available), then in the error table in the socket module, ...
Returns the string associated with a Windows error message, such as the ones found in socket.error. Attempts direct lookup against the win32 API via ctypes and then pywin32 if available), then in the error table in the socket module, then finally defaulting to C{os.strerror}. ...
formatError
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/win32util.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/win32util.py
MIT
def release(self): """ Release the semaphore, notifying any waiters if needed. """ self.counter += 1 self._start_notify() return self.counter
Release the semaphore, notifying any waiters if needed.
release
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def rawlink(self, callback): """ rawlink(callback) -> None Register a callback to call when a counter is more than zero. *callback* will be called in the :class:`Hub <gevent.hub.Hub>`, so it must not use blocking gevent API. *callback* will be passed one argument: this instance...
rawlink(callback) -> None Register a callback to call when a counter is more than zero. *callback* will be called in the :class:`Hub <gevent.hub.Hub>`, so it must not use blocking gevent API. *callback* will be passed one argument: this instance. This method is normally calle...
rawlink
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def unlink(self, callback): """ unlink(callback) -> None Remove the callback set by :meth:`rawlink`. This method is normally called automatically by :meth:`acquire` and :meth:`wait`; most code will not need to use it. """ try: self._links.remove(cal...
unlink(callback) -> None Remove the callback set by :meth:`rawlink`. This method is normally called automatically by :meth:`acquire` and :meth:`wait`; most code will not need to use it.
unlink
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def _do_wait(self, timeout): """ Wait for up to *timeout* seconds to expire. If timeout elapses, return the exception. Otherwise, return None. Raises timeout if a different timer expires. """ switch = getcurrent().switch self.rawlink(switch) try: ...
Wait for up to *timeout* seconds to expire. If timeout elapses, return the exception. Otherwise, return None. Raises timeout if a different timer expires.
_do_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def wait(self, timeout=None): """ wait(timeout=None) -> int Wait until it is possible to acquire this semaphore, or until the optional *timeout* elapses. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever if no timeout is ...
wait(timeout=None) -> int Wait until it is possible to acquire this semaphore, or until the optional *timeout* elapses. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever if no timeout is given. :keyword float timeout: I...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def acquire(self, blocking=True, timeout=None): """ acquire(blocking=True, timeout=None) -> bool Acquire the semaphore. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever (unless a timeout is given or blocking is set to...
acquire(blocking=True, timeout=None) -> bool Acquire the semaphore. .. caution:: If this semaphore was initialized with a size of 0, this method will block forever (unless a timeout is given or blocking is set to false). :keyword bool blocking: If True (the defa...
acquire
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_semaphore.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_semaphore.py
MIT
def _wait(self, watcher, timeout_exc=timeout('timed out')): """Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :f...
Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called, raise ``socket.error(EBADF, 'File descript...
_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket2.py
MIT
def __send_chunk(self, data_memory, flags, timeleft, end): """ Send the complete contents of ``data_memory`` before returning. This is the core loop around :meth:`send`. :param timeleft: Either ``None`` if there is no timeout involved, or a float indicating the timeout to use...
Send the complete contents of ``data_memory`` before returning. This is the core loop around :meth:`send`. :param timeleft: Either ``None`` if there is no timeout involved, or a float indicating the timeout to use. :param end: Either ``None`` if there is no timeout involved,...
__send_chunk
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket2.py
MIT
def __repr__(self): """Wrap __repr__() to reveal the real class name.""" try: s = _socket.socket.__repr__(self._sock) except Exception as ex: # Observed on Windows Py3.3, printing the repr of a socket # that just sufferred a ConnectionResetError [WinError 1005...
Wrap __repr__() to reveal the real class name.
__repr__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def _wait(self, watcher, timeout_exc=timeout('timed out')): """Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :f...
Block the current greenlet until *watcher* has pending events. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called, raise ``socket.error(EBADF, 'File descript...
_wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def dup(self): """dup() -> socket object Return a new socket object connected to the same system resource. """ fd = dup(self.fileno()) sock = self.__class__(self.family, self.type, self.proto, fileno=fd) sock.settimeout(self.gettimeout()) return sock
dup() -> socket object Return a new socket object connected to the same system resource.
dup
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def accept(self): """accept() -> (socket object, address info) Wait for an incoming connection. Return a new socket representing the connection, and the address of the client. For IP sockets, the address info is a pair (hostaddr, port). """ while True: try: ...
accept() -> (socket object, address info) Wait for an incoming connection. Return a new socket representing the connection, and the address of the client. For IP sockets, the address info is a pair (hostaddr, port).
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def makefile(self, mode="r", buffering=None, *, encoding=None, errors=None, newline=None): """Return an I/O stream connected to the socket The arguments are as for io.open() after the filename, except the only mode characters supported are 'r', 'w' and 'b'. The semantic...
Return an I/O stream connected to the socket The arguments are as for io.open() after the filename, except the only mode characters supported are 'r', 'w' and 'b'. The semantics are similar too.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def fromfd(fd, family, type, proto=0): """ fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket(). """ nfd = dup(fd) return socket(family, type, proto, nfd)
fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket().
fromfd
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def socketpair(family=None, type=SOCK_STREAM, proto=0): """socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the defau...
socketpair([family[, type[, proto]]]) -> (socket object, socket object) Create a pair of socket objects from the sockets returned by the platform socketpair() function. The arguments are the same as for socket() except the default family is AF_UNIX if defined on the platform; otherwise,...
socketpair
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socket3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socket3.py
MIT
def wait(io, timeout=None, timeout_exc=_NONE): """ Block the current greenlet until *io* is ready. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called on *io*...
Block the current greenlet until *io* is ready. If *timeout* is non-negative, then *timeout_exc* is raised after *timeout* second has passed. By default *timeout_exc* is ``socket.timeout('timed out')``. If :func:`cancel_wait` is called on *io* by another greenlet, raise an exception in this b...
wait
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socketcommon.py
MIT
def wait_read(fileno, timeout=None, timeout_exc=_NONE): """ Block the current greenlet until *fileno* is ready to read. For the meaning of the other parameters and possible exceptions, see :func:`wait`. .. seealso:: :func:`cancel_wait` """ io = get_hub().loop.io(fileno, 1) return wait...
Block the current greenlet until *fileno* is ready to read. For the meaning of the other parameters and possible exceptions, see :func:`wait`. .. seealso:: :func:`cancel_wait`
wait_read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socketcommon.py
MIT
def wait_write(fileno, timeout=None, timeout_exc=_NONE, event=_NONE): """ Block the current greenlet until *fileno* is ready to write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In ...
Block the current greenlet until *fileno* is ready to write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In the future, it may become an error. .. seealso:: :func:`cancel_wait` ...
wait_write
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socketcommon.py
MIT
def wait_readwrite(fileno, timeout=None, timeout_exc=_NONE, event=_NONE): """ Block the current greenlet until *fileno* is ready to read or write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this param...
Block the current greenlet until *fileno* is ready to read or write. For the meaning of the other parameters and possible exceptions, see :func:`wait`. :keyword event: Ignored. Applications should not pass this parameter. In the future, it may become an error. .. seealso:: :func:`canc...
wait_readwrite
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socketcommon.py
MIT
def getfqdn(name=''): """Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname from gethostname() is returned. """ ...
Get fully qualified domain name from name. An empty argument is interpreted as meaning the local host. First the hostname returned by gethostbyaddr() is checked, then possibly existing aliases. In case no FQDN is available, hostname from gethostname() is returned.
getfqdn
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_socketcommon.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_socketcommon.py
MIT
def read(self, len=1024): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" while True: try: return self._sslobj.read(len) except SSLError as ex: if ex.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs: ...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl2.py
MIT
def connect(self, addr): """Connects to remote ADDR, and then wraps the connection in an SSL channel.""" # Here we assume that the socket is client-side, and not # connected at the time of the call. We connect it, then wrap it. if self._sslobj: raise ValueError("atte...
Connects to remote ADDR, and then wraps the connection in an SSL channel.
connect
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl2.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" sock = self._sock while True: try: client_socket, ad...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl2.py
MIT
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" if not PYPY: self._makefile_refs += 1 # close=True so as to decrement the reference count when done with ...
Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl2.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl2.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl2.py
MIT
def read(self, len=1024, buffer=None): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" self._checkClosed() if not self._sslobj: raise ValueError("Read on closed or unwrapped SSL socket.") while True: try: if b...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def getpeercert(self, binary_form=False): """Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.""" self._checkClosed() s...
Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.
getpeercert
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def version(self): """Return a string identifying the protocol version used by the current SSL channel. """ if not self._sslobj: return None return self._sslobj.version()
Return a string identifying the protocol version used by the current SSL channel.
version
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" newsock, addr = socket.accept(self) newsock = self.context.wrap_socket(newsock,...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def get_channel_binding(self, cb_type="tls-unique"): """Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). """ if cb_type not i...
Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).
get_channel_binding
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_ssl3.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_ssl3.py
MIT
def create_default_context(purpose=Purpose.SERVER_AUTH, cafile=None, capath=None, cadata=None): """Create a SSLContext object with default settings. NOTE: The protocol and settings may change anytime without prior deprecation. The values represent a fair balance between max...
Create a SSLContext object with default settings. NOTE: The protocol and settings may change anytime without prior deprecation. The values represent a fair balance between maximum compatibility and security.
create_default_context
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def _create_unverified_context(protocol=PROTOCOL_SSLv23, cert_reqs=None, check_hostname=False, purpose=Purpose.SERVER_AUTH, certfile=None, keyfile=None, cafile=None, capath=None, cadata=None): """Create a SSLContext object for Python s...
Create a SSLContext object for Python stdlib modules All Python stdlib modules shall use this function to create SSLContext objects in order to keep common settings in one place. The configuration is less restrict than create_default_context()'s to increase backward compatibility.
_create_unverified_context
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def read(self, len=0, buffer=None): """Read up to LEN bytes and return them. Return zero-length string on EOF.""" self._checkClosed() if not self._sslobj: raise ValueError("Read on closed or unwrapped SSL socket.") while True: try: if buffe...
Read up to LEN bytes and return them. Return zero-length string on EOF.
read
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def getpeercert(self, binary_form=False): """Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.""" self._checkClosed() s...
Returns a formatted version of the data in the certificate provided by the other end of the SSL channel. Return None if no certificate was provided, {} if a certificate was provided, but not validated.
getpeercert
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def accept(self): """Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.""" newsock, addr = socket.accept(self) newsock = self.context.wrap_socket(newsock,...
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
accept
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def makefile(self, mode='r', bufsize=-1): """Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.""" if not PYPY: self._makefile_refs += 1 # close=True so as to decrement the reference count when done with ...
Make and return a file-like object that works with the SSL connection. Just use the code from the socket module.
makefile
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def get_channel_binding(self, cb_type="tls-unique"): """Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake). """ if cb_type not i...
Get channel binding data for current connection. Raise ValueError if the requested `cb_type` is not supported. Return bytes of the data or None if the data is not available (e.g. before the handshake).
get_channel_binding
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def version(self): """ Return a string identifying the protocol version used by the current SSL channel, or None if there is no established channel. """ if self._sslobj is None: return None return self._sslobj.version()
Return a string identifying the protocol version used by the current SSL channel, or None if there is no established channel.
version
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv23, ca_certs=None): """Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connect...
Retrieve the certificate from the server at the specified address, and return it as a PEM-encoded string. If 'ca_certs' is specified, validate the server cert against it. If 'ssl_version' is specified, use it in the connection attempt.
get_server_certificate
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_sslgte279.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_sslgte279.py
MIT
def _init_ugly_crap(): """This function implements a few ugly things so that we can patch the traceback objects. The function returned allows resetting `tb_next` on any python traceback object. Do not attempt to use this on non cpython interpreters """ import ctypes from types import Trace...
This function implements a few ugly things so that we can patch the traceback objects. The function returned allows resetting `tb_next` on any python traceback object. Do not attempt to use this on non cpython interpreters
_init_ugly_crap
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_tblib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_tblib.py
MIT
def tb_set_next(tb, next): """Set the tb_next attribute of a traceback object.""" if not (isinstance(tb, TracebackType) and (next is None or isinstance(next, TracebackType))): raise TypeError('tb_set_next arguments must be traceback objects') obj = _Traceback.from_add...
Set the tb_next attribute of a traceback object.
tb_set_next
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_tblib.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_tblib.py
MIT
def task_done(self): """Indicate that a formerly enqueued task is complete. Used by Queue consumer threads. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it ...
Indicate that a formerly enqueued task is complete. Used by Queue consumer threads. For each get() used to fetch a task, a subsequent call to task_done() tells the queue that the processing on the task is complete. If a join() is currently blocking, it will resume when all items ...
task_done
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def join(self): """Blocks until all items in the Queue have been gotten and processed. The count of unfinished tasks goes up whenever an item is added to the queue. The count goes down whenever a consumer thread calls task_done() to indicate the item was retrieved and all work on it is ...
Blocks until all items in the Queue have been gotten and processed. The count of unfinished tasks goes up whenever an item is added to the queue. The count goes down whenever a consumer thread calls task_done() to indicate the item was retrieved and all work on it is complete. When the...
join
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def qsize(self): """Return the approximate size of the queue (not reliable!).""" self.mutex.acquire() try: return self._qsize() finally: self.mutex.release()
Return the approximate size of the queue (not reliable!).
qsize
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def empty(self): """Return True if the queue is empty, False otherwise (not reliable!).""" self.mutex.acquire() try: return not self._qsize() finally: self.mutex.release()
Return True if the queue is empty, False otherwise (not reliable!).
empty
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def full(self): """Return True if the queue is full, False otherwise (not reliable!).""" self.mutex.acquire() try: if self.maxsize <= 0: return False if self.maxsize >= self._qsize(): return True finally: self.mutex.rele...
Return True if the queue is full, False otherwise (not reliable!).
full
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def put(self, item, block=True, timeout=None): """Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises ...
Put an item into the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until a free slot is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Full exception if no free slot was available within ...
put
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def get(self, block=True, timeout=None): """Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises ...
Remove and return an item from the queue. If optional args 'block' is true and 'timeout' is None (the default), block if necessary until an item is available. If 'timeout' is a positive number, it blocks at most 'timeout' seconds and raises the Empty exception if no item was available w...
get
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/gevent/_threading.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/gevent/_threading.py
MIT
def __new__(self, projparams=None, preserve_units=False, **kwargs): """ initialize a Proj class instance. Proj4 projection control parameters must either be given in a dictionary 'projparams' or as keyword arguments. See the proj documentation (http://trac.osgeo.org/proj/) for m...
initialize a Proj class instance. Proj4 projection control parameters must either be given in a dictionary 'projparams' or as keyword arguments. See the proj documentation (http://trac.osgeo.org/proj/) for more information about specifying projection parameters. Exampl...
__new__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def __call__(self, *args, **kw): #,lon,lat,inverse=False,radians=False,errcheck=False): """ Calling a Proj class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y native map projection coordinates (in meters). If optional keyword 'inverse' is True ...
Calling a Proj class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y native map projection coordinates (in meters). If optional keyword 'inverse' is True (default is False), the inverse transformation from x/y to lon/lat is performed. If optional ...
__call__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def transform(p1, p2, x, y, z=None, radians=False): """ x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False) Transform points between two coordinate systems defined by the Proj instances p1 and p2. The points x1,y1,z1 in the coordinate system defined by p1 are transformed to x2,y2,z2 in t...
x2, y2, z2 = transform(p1, p2, x1, y1, z1, radians=False) Transform points between two coordinate systems defined by the Proj instances p1 and p2. The points x1,y1,z1 in the coordinate system defined by p1 are transformed to x2,y2,z2 in the coordinate system defined by p2. z1 is optional, if...
transform
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def _copytobuffer(x): """ return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is true if input is a tuple,...
return a copy of x as an object that supports the python Buffer API (python array if input is float, list or tuple, numpy array if input is a numpy array). returns copyofx, isfloat, islist, istuple (islist is True if input is a list, istuple is true if input is a tuple, isfloat is true if input is ...
_copytobuffer
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def __new__(self, initstring=None, **kwargs): """ initialize a Geod class instance. Geodetic parameters for specifying the ellipsoid can be given in a dictionary 'initparams', as keyword arguments, or as as proj4 geod initialization string. Following is a list of the ell...
initialize a Geod class instance. Geodetic parameters for specifying the ellipsoid can be given in a dictionary 'initparams', as keyword arguments, or as as proj4 geod initialization string. Following is a list of the ellipsoids that may be defined using the 'ellps' key...
__new__
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def fwd(self, lons, lats, az, dist, radians=False): """ forward transformation - Returns longitudes, latitudes and back azimuths of terminus points given longitudes (lons) and latitudes (lats) of initial points, plus forward azimuths (az) and distances (dist). latitudes (...
forward transformation - Returns longitudes, latitudes and back azimuths of terminus points given longitudes (lons) and latitudes (lats) of initial points, plus forward azimuths (az) and distances (dist). latitudes (lats) of initial points, plus forward azimuths (az) and...
fwd
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def inv(self,lons1,lats1,lons2,lats2,radians=False): """ inverse transformation - Returns forward and back azimuths, plus distances between initial points (specified by lons1, lats1) and terminus points (specified by lons2, lats2). Works with numpy and regular python array objec...
inverse transformation - Returns forward and back azimuths, plus distances between initial points (specified by lons1, lats1) and terminus points (specified by lons2, lats2). Works with numpy and regular python array objects, python sequences and scalars. if radians=Tr...
inv
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def npts(self, lon1, lat1, lon2, lat2, npts, radians=False): """ Given a single initial point and terminus point (specified by python floats lon1,lat1 and lon2,lat2), returns a list of longitude/latitude pairs describing npts equally spaced intermediate points along the geodesic ...
Given a single initial point and terminus point (specified by python floats lon1,lat1 and lon2,lat2), returns a list of longitude/latitude pairs describing npts equally spaced intermediate points along the geodesic between the initial and terminus points. if radians=Tru...
npts
python
mchristopher/PokemonGo-DesktopMap
app/pylibs/win32/pyproj/__init__.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pylibs/win32/pyproj/__init__.py
MIT
def register(cls, subclass): """Register a virtual subclass of an ABC.""" if not isinstance(subclass, (type, types.ClassType)): raise TypeError("Can only register classes") if issubclass(subclass, cls): return # Already a subclass # Subtle: test for cycles *after...
Register a virtual subclass of an ABC.
register
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/abc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/abc.py
MIT
def _dump_registry(cls, file=None): """Debug helper to print the ABC registry.""" print >> file, "Class: %s.%s" % (cls.__module__, cls.__name__) print >> file, "Inv.counter: %s" % ABCMeta._abc_invalidation_counter for name in sorted(cls.__dict__.keys()): if name.startswith("_...
Debug helper to print the ABC registry.
_dump_registry
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/abc.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/abc.py
MIT
def open(file, flag='r', mode=0666): """Open or create database at path given by *file*. Optional argument *flag* can be 'r' (default) for read-only access, 'w' for read-write access of an existing database, 'c' for read-write access to a new or existing database, and 'n' for read-write access to a new...
Open or create database at path given by *file*. Optional argument *flag* can be 'r' (default) for read-only access, 'w' for read-write access of an existing database, 'c' for read-write access to a new or existing database, and 'n' for read-write access to a new database. Note: 'r' and 'w' fail i...
open
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/anydbm.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/anydbm.py
MIT
def error(self, message): """error(message: string) Prints a usage message incorporating the message to stderr and exits. If you override this in a subclass, it should not return -- it should either exit or raise an exception. """ self.print_usage(_sys.stderr) ...
error(message: string) Prints a usage message incorporating the message to stderr and exits. If you override this in a subclass, it should not return -- it should either exit or raise an exception.
error
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/argparse.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/argparse.py
MIT
def literal_eval(node_or_string): """ Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. """ _safe_names = {'None'...
Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None.
literal_eval
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def dump(node, annotate_fields=True, include_attributes=False): """ Return a formatted dump of the tree in *node*. This is mainly useful for debugging purposes. The returned string will show the names and the values for fields. This makes the code impossible to evaluate, so if evaluation is wante...
Return a formatted dump of the tree in *node*. This is mainly useful for debugging purposes. The returned string will show the names and the values for fields. This makes the code impossible to evaluate, so if evaluation is wanted *annotate_fields* must be set to False. Attributes such as line ...
dump
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def copy_location(new_node, old_node): """ Copy source location (`lineno` and `col_offset` attributes) from *old_node* to *new_node* if possible, and return *new_node*. """ for attr in 'lineno', 'col_offset': if attr in old_node._attributes and attr in new_node._attributes \ and h...
Copy source location (`lineno` and `col_offset` attributes) from *old_node* to *new_node* if possible, and return *new_node*.
copy_location
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def fix_missing_locations(node): """ When you compile a node tree with compile(), the compiler expects lineno and col_offset attributes for every node that supports them. This is rather tedious to fill in for generated nodes, so this helper adds these attributes recursively where not already set, b...
When you compile a node tree with compile(), the compiler expects lineno and col_offset attributes for every node that supports them. This is rather tedious to fill in for generated nodes, so this helper adds these attributes recursively where not already set, by setting them to the values of the ...
fix_missing_locations
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def increment_lineno(node, n=1): """ Increment the line number of each node in the tree starting at *node* by *n*. This is useful to "move code" to a different location in a file. """ for child in walk(node): if 'lineno' in child._attributes: child.lineno = getattr(child, 'lineno...
Increment the line number of each node in the tree starting at *node* by *n*. This is useful to "move code" to a different location in a file.
increment_lineno
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def iter_fields(node): """ Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*. """ for field in node._fields: try: yield field, getattr(node, field) except AttributeError: pass
Yield a tuple of ``(fieldname, value)`` for each field in ``node._fields`` that is present on *node*.
iter_fields
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def iter_child_nodes(node): """ Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes. """ for name, field in iter_fields(node): if isinstance(field, AST): yield field elif isinstance(field, list): ...
Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes.
iter_child_nodes
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def get_docstring(node, clean=True): """ Return the docstring for the given node or None if no docstring can be found. If the node provided does not have docstrings a TypeError will be raised. """ if not isinstance(node, (FunctionDef, ClassDef, Module)): raise TypeError("%r can't have d...
Return the docstring for the given node or None if no docstring can be found. If the node provided does not have docstrings a TypeError will be raised.
get_docstring
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def walk(node): """ Recursively yield all descendant nodes in the tree starting at *node* (including *node* itself), in no specified order. This is useful if you only want to modify nodes in place and don't care about the context. """ from collections import deque todo = deque([node]) w...
Recursively yield all descendant nodes in the tree starting at *node* (including *node* itself), in no specified order. This is useful if you only want to modify nodes in place and don't care about the context.
walk
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def generic_visit(self, node): """Called if no explicit visitor function exists for a node.""" for field, value in iter_fields(node): if isinstance(value, list): for item in value: if isinstance(item, AST): self.visit(item) ...
Called if no explicit visitor function exists for a node.
generic_visit
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/ast.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/ast.py
MIT
def readable (self): "predicate for inclusion in the readable for select()" # cannot use the old predicate, it violates the claim of the # set_terminator method. # return (len(self.ac_in_buffer) <= self.ac_in_buffer_size) return 1
predicate for inclusion in the readable for select()
readable
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/asynchat.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/asynchat.py
MIT
def writable (self): "predicate for inclusion in the writable for select()" return self.producer_fifo or (not self.connected)
predicate for inclusion in the writable for select()
writable
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/asynchat.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/asynchat.py
MIT
def _run_exitfuncs(): """run any registered exit functions _exithandlers is traversed in reverse order so functions are executed last in, first out. """ exc_info = None while _exithandlers: func, targs, kargs = _exithandlers.pop() try: func(*targs, **kargs) ...
run any registered exit functions _exithandlers is traversed in reverse order so functions are executed last in, first out.
_run_exitfuncs
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/atexit.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/atexit.py
MIT
def b64encode(s, altchars=None): """Encode a string using Base64. s is the string to encode. Optional altchars must be a string of at least length 2 (additional characters are ignored) which specifies an alternative alphabet for the '+' and '/' characters. This allows an application to e.g. gener...
Encode a string using Base64. s is the string to encode. Optional altchars must be a string of at least length 2 (additional characters are ignored) which specifies an alternative alphabet for the '+' and '/' characters. This allows an application to e.g. generate url or filesystem safe Base64 string...
b64encode
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/base64.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/base64.py
MIT
def b64decode(s, altchars=None): """Decode a Base64 encoded string. s is the string to decode. Optional altchars must be a string of at least length 2 (additional characters are ignored) which specifies the alternative alphabet used instead of the '+' and '/' characters. The decoded string is ret...
Decode a Base64 encoded string. s is the string to decode. Optional altchars must be a string of at least length 2 (additional characters are ignored) which specifies the alternative alphabet used instead of the '+' and '/' characters. The decoded string is returned. A TypeError is raised if s is ...
b64decode
python
mchristopher/PokemonGo-DesktopMap
app/pywin/Lib/base64.py
https://github.com/mchristopher/PokemonGo-DesktopMap/blob/master/app/pywin/Lib/base64.py
MIT