Mercurial > code > home > repos > light9
comparison bin/subcomposer @ 831:0f7e99d02dc6
subcomposer support logging. don't start with a bogus sub
Ignore-this: f28e1e812e0d7e26e49abb8ee428d4db
author | Drew Perttula <drewp@bigasterisk.com> |
---|---|
date | Tue, 04 Jun 2013 23:17:06 +0000 |
parents | bf728997bfde |
children | bdfdfea84510 |
comparison
equal
deleted
inserted
replaced
830:9ba1c866bf4c | 831:0f7e99d02dc6 |
---|---|
1 #!bin/python | 1 #!bin/python |
2 | 2 |
3 from __future__ import division, nested_scopes | 3 from __future__ import division, nested_scopes |
4 from optparse import OptionParser | 4 from optparse import OptionParser |
5 import logging | |
5 import Tkinter as tk | 6 import Tkinter as tk |
6 import louie as dispatcher | 7 import louie as dispatcher |
7 from twisted.internet import reactor, tksupport, task | 8 from twisted.internet import reactor, tksupport, task |
8 from rdflib import URIRef | 9 from rdflib import URIRef |
9 | 10 |
12 from light9 import dmxclient, Patch, Submaster, showconfig, prof | 13 from light9 import dmxclient, Patch, Submaster, showconfig, prof |
13 from light9.uihelpers import toplevelat | 14 from light9.uihelpers import toplevelat |
14 from light9.rdfdb.syncedgraph import SyncedGraph | 15 from light9.rdfdb.syncedgraph import SyncedGraph |
15 from light9.rdfdb import clientsession | 16 from light9.rdfdb import clientsession |
16 from light9.tkdnd import initTkdnd, dragSourceRegister, dropTargetRegister | 17 from light9.tkdnd import initTkdnd, dragSourceRegister, dropTargetRegister |
18 | |
19 logging.basicConfig(level=logging.DEBUG) | |
20 log = logging.getLogger() | |
17 | 21 |
18 class _NoNewVal(object): | 22 class _NoNewVal(object): |
19 pass | 23 pass |
20 | 24 |
21 class Observable(object): | 25 class Observable(object): |
146 self.currentSub = Submaster.PersistentSubmaster(graph, URIRef('http://hello')) | 150 self.currentSub = Submaster.PersistentSubmaster(graph, URIRef('http://hello')) |
147 | 151 |
148 self.levelbox = Levelbox(self, graph) | 152 self.levelbox = Levelbox(self, graph) |
149 self.levelbox.pack(side='top') | 153 self.levelbox.pack(side='top') |
150 | 154 |
151 currentUri = Observable("http://curr") | 155 currentUri = Observable(Local) |
152 | 156 |
153 def pc(val): | 157 def pc(val): |
154 print "change viewed sub to", val | 158 print "change viewed sub to", val |
155 currentUri.subscribe(pc) | 159 currentUri.subscribe(pc) |
156 | 160 |