Esempio n. 1
0
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import gc
#gc.set_debug(gc.DEBUG_STATS)

from net.aircable.utils import logger, logmain

if __name__ == '__main__':
    logmain('rpc.py')

# setup Django ORM
try:
    import settings # Assumed to be in the same directory.
    setattr(settings, "DEBUG", False)
    logger.info("RPC-DEBUG %s" % getattr(settings, "DEBUG"))
    from django.core.management import setup_environ
    setup_environ(settings)
except ImportError:
    logger.error("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
    sys.exit(1)

from net.aircable.openproximity.pluginsystem import pluginsystem
pluginsystem.post_environ()
Esempio n. 2
0
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from net.aircable.utils import logger, logmain

if __name__ == "__main__":
    logmain("manage")

from django.core.management import execute_manager, setup_environ

try:
    import settings  # Assumed to be in the same directory.

    setup_environ(settings)
except ImportError, e:
    import sys, traceback

    logger.error(
        "Error: Can't find the file 'settings.py' in the directory "
        "containing %r. It appears you've customized things.\nYou'll have "
        "to run django-admin.py, passing it your settings module.\n(If the "
        "file settings.py does indeed exist, it's causing an ImportError "
Esempio n. 3
0
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

import gc
#gc.set_debug(gc.DEBUG_STATS)

from net.aircable.utils import logger, logmain

if __name__ == '__main__':
    logmain('rpc.py')

# setup Django ORM
try:
    import settings  # Assumed to be in the same directory.
    setattr(settings, "DEBUG", False)
    logger.info("RPC-DEBUG %s" % getattr(settings, "DEBUG"))
    from django.core.management import setup_environ
    setup_environ(settings)
except ImportError:
    logger.error(
        "Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n"
        % __file__)
    sys.exit(1)

from net.aircable.openproximity.pluginsystem import pluginsystem
Esempio n. 4
0
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from net.aircable.utils import logger, logmain

if __name__ == "__main__":
    logmain("createadmin.py")

from django.core.management import setup_environ
from django.core.management import call_command

try:
    import settings # Assumed to be in the same directory.
except ImportError:
    sys.stderr.write("Error: Can't find the file 'settings.py' in the directory" 
            " containing %r. It appears you've customized things.\nYou'll have" 
            " to run django-admin.py, passing it your settings module.\n(If the"
            " file settings.py does indeed exist, it's causing an ImportError"
            " somehow.)\n" % __file__)
    sys.exit(1)

if __name__ == "__main__":
Esempio n. 5
0
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from net.aircable.utils import logger, logmain

if __name__ == "__main__":
    logmain("createadmin.py")

from django.core.management import setup_environ
from django.core.management import call_command

try:
    import settings  # Assumed to be in the same directory.
except ImportError:
    sys.stderr.write(
        "Error: Can't find the file 'settings.py' in the directory"
        " containing %r. It appears you've customized things.\nYou'll have"
        " to run django-admin.py, passing it your settings module.\n(If the"
        " file settings.py does indeed exist, it's causing an ImportError"
        " somehow.)\n" % __file__)
    sys.exit(1)
Esempio n. 6
0
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# -*- coding: utf-8 -*-
import dbus, dbus.glib, gobject, select
import os, sys, errno
import rpyc

from rpyc import async
from net.aircable import autoreload
from net.aircable.openproximity.pluginsystem import pluginsystem
from net.aircable.utils import logger, logmain

if __name__=='__main__':
    logmain("serverXR/manager.py")

server = None
manager = None
bus = None
loop = None

def poll(fd, condition):
    '''
    This function gets called whenever there's data waiting in the incomming 
    socket, so we can flush the data from the server.
    '''
    try:
	server.poll()
	return True
    except EOFError, eof:
Esempio n. 7
0
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# -*- coding: utf-8 -*-
import dbus, dbus.glib, gobject, select
import os, sys, errno
import rpyc

from rpyc import async
from net.aircable import autoreload
from net.aircable.openproximity.pluginsystem import pluginsystem
from net.aircable.utils import logger, logmain

if __name__ == '__main__':
    logmain("serverXR/manager.py")

server = None
manager = None
bus = None
loop = None


def poll(fd, condition):
    '''
    This function gets called whenever there's data waiting in the incomming 
    socket, so we can flush the data from the server.
    '''
    try:
        server.poll()
        return True
Esempio n. 8
0
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License along
#    with this program; if not, write to the Free Software Foundation, Inc.,
#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

from net.aircable.utils import logger, logmain

if __name__ == '__main__':
    logmain("manage")
    
from django.core.management import execute_manager, setup_environ
try:
    import settings # Assumed to be in the same directory.
    setup_environ(settings)
except ImportError, e:
    import sys, traceback
    logger.error("Error: Can't find the file 'settings.py' in the directory "
            "containing %r. It appears you've customized things.\nYou'll have "
            "to run django-admin.py, passing it your settings module.\n(If the "
            "file settings.py does indeed exist, it's causing an ImportError "
            "somehow.)\n" % __file__)
    logger.exception(e)
    sys.exit(1)