Update of /cvsroot/freevo/kaa/base/src/notifier
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14320

Modified Files:
        __init__.py callback.py 
Log Message:
remove select_notifier, use notifier.init before importing kaa

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/kaa/base/src/notifier/__init__.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** __init__.py 14 Jul 2005 00:11:52 -0000      1.12
--- __init__.py 14 Jul 2005 08:40:49 -0000      1.13
***************
*** 42,46 ****
  from callback import Callback, WeakCallback, Timer, WeakTimer, OneShotTimer, \
                       WeakOneShotTimer, SocketDispatcher, 
WeakSocketDispatcher,\
!                      Signal
  from kaa.base import utils
  
--- 42,46 ----
  from callback import Callback, WeakCallback, Timer, WeakTimer, OneShotTimer, \
                       WeakOneShotTimer, SocketDispatcher, 
WeakSocketDispatcher,\
!                      Signal, IO_READ, IO_WRITE, IO_EXCEPT, notifier
  from kaa.base import utils
  
***************
*** 80,103 ****
  
  
- 
- def select_notifier(type):
-     """
-     Select a notifier module. This only needs to be called when pyNotifier
-     is used and not the notifier should be something else than the generic
-     one. The variables for the different notifier are not available in this
-     wrapper.
-     """
-     wrapper.select_notifier(type)
- 
-     global IO_READ
-     global IO_WRITE
-     global IO_EXCEPT
- 
-     IO_READ   = notifier.IO_READ
-     IO_WRITE  = notifier.IO_WRITE
-     IO_EXCEPT = notifier.IO_EXCEPT
- 
- 
- 
  def shutdown():
      """
--- 80,83 ----
***************
*** 118,122 ****
      is raised or sys.exit is called.
      """
- 
      # Sets a default root level logger if none exists.
      logger = logging.getLogger()
--- 98,101 ----

Index: callback.py
===================================================================
RCS file: /cvsroot/freevo/kaa/base/src/notifier/callback.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** callback.py 14 Jul 2005 00:57:39 -0000      1.8
--- callback.py 14 Jul 2005 08:40:49 -0000      1.9
***************
*** 31,35 ****
  
  __all__ = [ 'Callback', 'WeakCallback', 'Timer', 'WeakTimer', 'OneShotTimer',
!             'WeakOneShotTimer', 'SocketDispatcher', 'WeakSocketDispatcher' ]
  
  import _weakref
--- 31,36 ----
  
  __all__ = [ 'Callback', 'WeakCallback', 'Timer', 'WeakTimer', 'OneShotTimer',
!             'WeakOneShotTimer', 'SocketDispatcher', 'WeakSocketDispatcher',
!             'IO_READ', 'IO_WRITE', 'IO_EXCEPT', 'notifier' ]
  
  import _weakref
***************
*** 39,44 ****
      # try to import pyNotifier
      import notifier
!     # init pyNotifier with the generic notifier
!     notifier.init(notifier.GENERIC)
      use_pynotifier = True
  
--- 40,46 ----
      # try to import pyNotifier
      import notifier
!     if not notifier.loop:
!         # init pyNotifier with the generic notifier
!         notifier.init(notifier.GENERIC)
      use_pynotifier = True
  
***************
*** 52,73 ****
  IO_EXCEPT = notifier.IO_EXCEPT
  
- def select_notifier(type):
-     """
-     Select a new notifier.
-     """
-     if not use_pynotifier:
-         raise AttributeError('pyNotifier not installed')
-     if type == notifier.GENERIC:
-         raise AttributeError('generic notifier already running')
-     notifier.init(type)
- 
-     global IO_READ
-     global IO_WRITE
-     global IO_EXCEPT
- 
-     IO_READ   = notifier.IO_READ
-     IO_WRITE  = notifier.IO_WRITE
-     IO_EXCEPT = notifier.IO_EXCEPT
- 
  
  def weakref_data(data, destroy_cb = None):
--- 54,57 ----
***************
*** 243,254 ****
  
  
!     def register(self, fd, condition = None):
          if self.active():
              return
! 
!         if condition == None:
!             self._id = notifier.addSocket(fd, self)
!         else:
!             self._id = notifier.addSocket(fd, self, condition)
  
  
--- 227,234 ----
  
  
!     def register(self, fd, condition = IO_READ):
          if self.active():
              return
!         self._id = notifier.addSocket(fd, self, condition)
  
  



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to