Exemplo n.º 1
0
 def _initPaths(self):
     if self.web2boardPath is None:
         modulePath = utils.getModulePath()
         self.packagerResPath = os.path.join(modulePath, "res")
         self.web2boardPath = os.path.abspath(os.path.join(modulePath, pDir, pDir, pDir))
         self.srcPath = os.path.join(self.web2boardPath, "src")
         self.resPath = os.path.join(self.web2boardPath, "res")
         self.pkgPath = os.path.join(self.web2boardPath, "pkg")
     self.version = json.load(open(os.path.join(self.resPath, "common", "config.json")))["version"]
Exemplo n.º 2
0
        libpath = os.__file__
    except AttributeError:
        pass
    else:
        # Split /usr/libfoo/python*/os.py to /usr/libfoo/python*.
        libpath, tail = os.path.split(libpath)
        # Split /usr/libfoo/python* to /usr/libfoo
        libpath, tail = os.path.split(libpath)
        # Check /usr/libfoo/scons*.
        prefs.append(libpath)

# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
libs.extend([os.path.join(x, 'scons') for x in prefs])
libs.extend([getModulePath()])
libs.extend([getModulePath() + os.sep + "sconsFiles"])
libs.extend([getModulePath() + os.sep + "sconsFiles" + "SCons"])

sys.path = libs + sys.path

##############################################################################
# END STANDARD SCons SCRIPT HEADER
##############################################################################

if __name__ == "__main__":
    try:
        import SCons.Script
    except:
        print("Import failed. Unable to find SCons files in:")
        for path in libs:
Exemplo n.º 3
0
        libpath = os.__file__
    except AttributeError:
        pass
    else:
        # Split /usr/libfoo/python*/os.py to /usr/libfoo/python*.
        libpath, tail = os.path.split(libpath)
        # Split /usr/libfoo/python* to /usr/libfoo
        libpath, tail = os.path.split(libpath)
        # Check /usr/libfoo/scons*.
        prefs.append(libpath)

# Look first for 'scons-__version__' in all of our preference libs,
# then for 'scons'.
libs.extend([os.path.join(x, scons_version) for x in prefs])
libs.extend([os.path.join(x, 'scons') for x in prefs])
libs.extend([getModulePath()])
libs.extend([getModulePath() + os.sep + "sconsFiles"])
libs.extend([getModulePath() + os.sep + "sconsFiles" + "SCons"])

sys.path = libs + sys.path

##############################################################################
# END STANDARD SCons SCRIPT HEADER
##############################################################################

if __name__ == "__main__":
    try:
        import SCons.Script
    except:
        print("Import failed. Unable to find SCons files in:")
        for path in libs:
Exemplo n.º 4
0
# This file is part of the web2board project                            #
#                                                                       #
# Copyright (C) 2015 Mundo Reader S.L.                                  #
#                                                                       #
# Date: April - May 2015                                                #
# Authors: Irene Sanz Nieto <*****@*****.**>,                        #
#          Sergio Morcuende <*****@*****.**>                   #
#                                                                       #
# -----------------------------------------------------------------------#
from libs import utils
import os
# necessray for package, do not remove!
import libs.LoggingHandlers
import libs.WSCommunication.Hubs

os.chdir(utils.getModulePath())

from libs.PathConstants import Web2BoardPaths as Paths
import os
import signal
import ssl
import sys
import threading
from optparse import OptionParser
from wsgiref.simple_server import make_server

from ws4py.server.wsgirefserver import WSGIServer, WebSocketWSGIRequestHandler
from ws4py.server.wsgiutils import WebSocketWSGIApplication
from wshubsapi.ConnectionHandlers.WS4Py import ConnectionHandler
from wshubsapi.HubsInspector import HubsInspector