~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to pypy/module/select/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Package initialisation
 
2
from pypy.interpreter.mixedmodule import MixedModule
 
3
import sys
 
4
 
 
5
class Module(MixedModule):
 
6
    appleveldefs = {
 
7
        'error': 'app_select.error',
 
8
        'select': 'app_select.select',
 
9
    }
 
10
 
 
11
    interpleveldefs = {
 
12
        'poll'  :  'interp_select.poll',
 
13
    }
 
14
 
 
15
    def buildloaders(cls):
 
16
        from pypy.module.select import ctypes_select as _c 
 
17
        for constant, value in _c.constants.iteritems():
 
18
            Module.interpleveldefs[constant] = "space.wrap(%r)" % value
 
19
        super(Module, cls).buildloaders()
 
20
    buildloaders = classmethod(buildloaders)
 
21