Example #1
0
File: config.py Project: bernt/pymt
 def __getitem__(self, name):
     if not self.__contains__(name):
         section, id = name.split('.', 1)
         value = pymt_config.get(section, id)
         var = StringVar()
         var.set(value)
         self.__setitem__(name, var)
     return super(AutoConfig, self).__getitem__(name)
Example #2
0
 def __getitem__(self, name):
     if not self.__contains__(name):
         section, id = name.split('.', 1)
         value = pymt_config.get(section, id)
         var = StringVar()
         var.set(value)
         self.__setitem__(name, var)
     return super(AutoConfig, self).__getitem__(name)
Example #3
0
File: fbo.py Project: hansent/pymt
    def __pymt_configure_fbo():

        from pymt import pymt_config

        # decide what to use
        fbo_config = pymt_config.get("graphics", "fbo")

        if fbo_config == "force-hardware":
            pymt.pymt_logger.debug("Fbo: Forcing hardware Framebuffer")
            AutoselectFbo.fbo_class = HardwareFbo
        elif fbo_config == "hardware" and bool(glGenFramebuffersEXT):
            pymt.pymt_logger.debug("Fbo: Use hardware Framebuffer")
            AutoselectFbo.fbo_class = HardwareFbo
        elif fbo_config == "software":
            pymt.pymt_logger.debug("Fbo: Use software Framebuffer")
            AutoselectFbo.fbo_class = SoftwareFbo
        else:
            pymt_config.set("graphics", "fbo", "software")
            pymt.pymt_logger.debug("Fbo: Falling back to software Framebuffer!!")
            AutoselectFbo.fbo_class = SoftwareFbo
Example #4
0
    def __pymt_configure_fbo():

        from pymt import pymt_config

        # decide what to use
        fbo_config = pymt_config.get('graphics', 'fbo')

        if fbo_config == 'force-hardware':
            pymt.pymt_logger.debug('Fbo: Forcing hardware Framebuffer')
            AutoselectFbo.fbo_class = HardwareFbo
        elif fbo_config == 'hardware' and bool(glGenFramebuffersEXT):
            pymt.pymt_logger.debug('Fbo: Use hardware Framebuffer')
            AutoselectFbo.fbo_class = HardwareFbo
        elif fbo_config == 'software':
            pymt.pymt_logger.debug('Fbo: Use software Framebuffer')
            AutoselectFbo.fbo_class = SoftwareFbo
        else:
            pymt_config.set('graphics', 'fbo', 'software')
            pymt.pymt_logger.debug('Fbo: Falling back to software Framebuffer!!')
            AutoselectFbo.fbo_class = SoftwareFbo
Example #5
0
File: config.py Project: bernt/pymt
        return super(AutoConfig, self).__getitem__(name)

master = Tk()
master.title('PyMT Configuration')
c = AutoConfig()
c_tuio_host = StringVar()
c_tuio_port = StringVar()
c_modules = StringVar()
c_screen = StringVar()
c_input = StringVar()
c_input_option = StringVar()
c_input_provider = StringVar()
c_input_devicename = StringVar()

try:
    provider = pymt_config.get('input', 'default')
    name, args = provider.split(',', 1)
    host, port = args.split(':', 1)
    c_tuio_host.set(host)
    c_tuio_port.set(port)
except:
    c_tuio_host.set('0.0.0.0')
    c_tuio_port.set('3333')

c_screen.set('%dx%d' % (pymt_config.getint('graphics', 'width'),
                        pymt_config.getint('graphics', 'height')))

# Get infos
opt_input = TouchFactory.list()
opt_fbo = ('hardware', 'software')
opt_loglevel = ('debug', 'info', 'warning', 'error')
Example #6
0

master = Tk()
master.title('PyMT Configuration')
c = AutoConfig()
c_tuio_host = StringVar()
c_tuio_port = StringVar()
c_modules = StringVar()
c_screen = StringVar()
c_input = StringVar()
c_input_option = StringVar()
c_input_provider = StringVar()
c_input_devicename = StringVar()

try:
    provider = pymt_config.get('input', 'default')
    name, args = provider.split(',', 1)
    host, port = args.split(':', 1)
    c_tuio_host.set(host)
    c_tuio_port.set(port)
except:
    c_tuio_host.set('0.0.0.0')
    c_tuio_port.set('3333')

c_screen.set('%dx%d' % (pymt_config.getint(
    'graphics', 'width'), pymt_config.getint('graphics', 'height')))

# Get infos
opt_input = TouchFactory.list()
opt_fbo = ('hardware', 'software')
opt_loglevel = ('debug', 'info', 'warning', 'error')
Example #7
0
            value = pymt_config.get(section, id)
            var = StringVar()
            var.set(value)
            self.__setitem__(name, var)
        return super(AutoConfig, self).__getitem__(name)

master = Tk()
master.title('PyMT Configuration')
c = AutoConfig()
c_tuio_host = StringVar()
c_tuio_port = StringVar()
c_modules = StringVar()
c_screen = StringVar()

try:
    provider = pymt_config.get('input', 'default')
    name, args = provider.split(',', 1)
    host, port = args.split(':', 1)
    c_tuio_host.set(host)
    c_tuio_port.set(port)
except:
    c_tuio_host.set('0.0.0.0')
    c_tuio_port.set('3333')

c_screen.set('%dx%d' % (pymt_config.getint('graphics', 'width'),
                        pymt_config.getint('graphics', 'height')))

# Get infos
opt_fbo = ('hardware', 'software')
opt_loglevel = ('debug', 'info', 'warning', 'error')
opt_screen = (