Update of /cvsroot/freevo/freevo/src/www
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13126

Modified Files:
        __init__.py 
Log Message:
reactivate the www plugin to run the webserver inside freevo

Index: __init__.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/www/__init__.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** __init__.py 10 Jul 2004 12:33:43 -0000      1.9
--- __init__.py 18 Dec 2004 20:05:42 -0000      1.10
***************
*** 1,21 ****
  # -*- coding: iso-8859-1 -*-
! # -----------------------------------------------------------------------
! # __init__.py - web init function
! # -----------------------------------------------------------------------
  # $Id$
  #
! # Notes:
! #
! # Todo:        
! #
! # -----------------------------------------------------------------------
! # $Log$
! # Revision 1.9  2004/07/10 12:33:43  dischi
! # header cleanup
  #
  #
- # -----------------------------------------------------------------------
- # Freevo - A Home Theater PC framework
- # Copyright (C) 2002 Krister Lagerstrom, et al. 
  # Please see the file freevo/Docs/CREDITS for a complete list of authors.
  #
--- 1,15 ----
  # -*- coding: iso-8859-1 -*-
! # 
-----------------------------------------------------------------------------
! # __init__.py - webserver plugin to start the server inside Freevo
! # 
-----------------------------------------------------------------------------
  # $Id$
  #
! # 
-----------------------------------------------------------------------------
! # Freevo - A Home Theater PC framework
! # Copyright (C) 2002-2004 Krister Lagerstrom, Dirk Meyer, et al.
  #
+ # Fisrt Version: Dirk Meyer <[EMAIL PROTECTED]>
+ # Maintainer:    Dirk Meyer <[EMAIL PROTECTED]>
  #
  # Please see the file freevo/Docs/CREDITS for a complete list of authors.
  #
***************
*** 34,60 ****
  # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  #
! # ----------------------------------------------------------------------- */
  
  
  import os
  import config
- import sys
  import plugin
  
! class PluginInterface(plugin.DaemonPlugin):
!     def __init__(self):
!         if config.CONF.display in ('dxr3', 'directfb', 'dfbmga'):
!             print 'For some strange reason, the starting of the webserver 
inside'
!             print 'Freevo messes up with the DXR3 and directfb output. The 
webserver'
!             print 'plugin will be disabled. Start it from outside Freevo with'
!             print 'freevo webserver [start|stop]'
!             self.reason = 'dxr3 or directfb output'
!             return
!         plugin.DaemonPlugin.__init__(self)
!         self.pid = None
!         os.system('%s webserver start' % os.environ['FREEVO_SCRIPT'])
  
!     def shutdown(self):
!         # print 'WEBSERVER::shutdown: pid=%s' % self.pid
!         print 'Stopping webserver plugin.'
!         os.system('%s webserver stop' % os.environ['FREEVO_SCRIPT'])
--- 28,59 ----
  # 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  #
! # 
-----------------------------------------------------------------------------
  
+ # python imports
+ import logging
  
+ # freevo imports
  import os
  import config
  import plugin
  
! # get logging object
! log = logging.getLogger('www')
  
! 
! class PluginInterface(plugin.Plugin):
!     """
!     webserver plugin
!     """
!     def __init__(self):
!         """
!         Start the webserver
!         """
!         from www.server import Server, RequestHandler
!         cgi_dir = os.path.join(os.path.dirname(__file__), '../www')
!         cgi_dir = os.path.abspath(cgi_dir)
!         htdocs  = [ os.path.join(cgi_dir, 'htdocs'),
!                     os.path.join(config.DOC_DIR, 'html') ]
!         # launch the server
!         Server('', config.WWW_PORT, RequestHandler, [ cgi_dir, 'www' ], 
htdocs)
!         log.info("HTTPServer running on port %s" % str(config.WWW_PORT))



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to