Ejemplo n.º 1
0
def unloop(l=default_loop):
	for cb in shutdown_callbacks:
		if cb.alive():
			cb()

	if pyev.version()[1] < '4.00': l.unloop()
	else: l.stop()
Ejemplo n.º 2
0
 def _pyev_version(self):
     if hasattr(pyev, 'version'):
         return pyev.version()
     else:
         pyev_ver = pyev.__version__
         libev_ver = ".".join(str(p) for p in pyev.abi_version())
         return (pyev_ver, libev_ver)
Ejemplo n.º 3
0
 def _pyev_version(self):
     if hasattr(pyev, 'version'):
         return pyev.version()
     else:
         pyev_ver = pyev.__version__
         libev_ver = ".".join(str(p) for p in pyev.abi_version())
         return (pyev_ver, libev_ver)
Ejemplo n.º 4
0
 def describe(self):
     return "libev/pyev (%s/%s) backend=%s" % (
         pyev.version()
         + (
             {1: "select()", 2: "poll()", 4: "epoll()", 8: "kqueue()", 16: "/dev/poll", 32: "event ports"}.get(
                 self._ev_loop.backend, "UNKNOWN"
             ),
         )
     )
Ejemplo n.º 5
0
 def describe(self):
     return "libev/pyev (%s/%s) backend=%s" % (
         pyev.version() + ({
             1: "select()",
             2: "poll()",
             4: "epoll()",
             8: "kqueue()",
             16: "/dev/poll",
             32: "event ports",
         }.get(self._ev_loop.backend, "UNKNOWN"), ))
Ejemplo n.º 6
0
def loop(l=default_loop):
	sigint_watcher = pyev.Signal(signal.SIGINT, default_loop, _sigint_cb)
	sigint_watcher.start()

	try:	
		if pyev.version()[1] < '4.00': l.loop()
		else: l.start()
	except OSError, e:
		traceback.print_exc()
		print 'oserror', e, e.args
Ejemplo n.º 7
0
# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'pyev'
copyright = u'2011, Malek Hadj-Ali'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
#version = '0.7.0'
# The full version, including alpha/beta/rc tags.
#release = '0.7.0-4.04'
version = pyev.version()[0]
release = '-'.join(pyev.version())

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []
Ejemplo n.º 8
0
Archivo: conf.py Proyecto: rim99/pyev
# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'pyev'
copyright = u'2011, Malek Hadj-Ali'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
#version = '0.7.0'
# The full version, including alpha/beta/rc tags.
#release = '0.7.0-4.04'
version = pyev.version()[0]
release = '-'.join(pyev.version())

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = []