1. Szymon Wróblewski
  2. pygnetic

Source

pygnetic / pygnetic / __init__.py

Diff from to

File pygnetic/__init__.py

  • Ignore whitespace
 """Network library for Pygame."""
 
 import logging
+import event
 import message
 import network
 import serialization
 register = message.message_factory.register
 
 
-def init(events=False, event_val=1, logging_lvl=logging.INFO,
+def init(events=False, event_val=None, logging_lvl=logging.INFO,
          n_module=('enet', 'socket'), s_module=('msgpack', 'json')):
     """Initialize network library.
 
     :param events: allow sending Pygame events (default False)
     :param event_val:
         set :const:`event.NETWORK` as
-        :const:`pygame.USEREVENT` + :attr:`event_val` (default: 1)
+        :const:`pygame.USEREVENT` + :attr:`event_val` (default: None)
     :param logging_lvl:
         level of logging messages (default :const:`logging.INFO`
         (see: :ref:`logging-basic-tutorial`), None to skip initializing
         return False
     if events:
         _logger.info("Enabling pygame events")
-        import event
         event.init(event_val)
     return True