Changeset - 5c04a54df635
[Not reviewed]
default
0 3 0
Drew Perttula - 7 years ago 2018-04-26 08:20:19
drewp@bigasterisk.com
fix startup (this might be breaking mypy)
Ignore-this: d81817852cde18bb475ce7be80499b5d
3 files changed with 51 insertions and 6 deletions:
0 comments (0 inline, 0 general)
bin/collector
Show inline comments
 
@@ -8,6 +8,8 @@ Input can be over http or zmq.
 
"""
 

	
 
from __future__ import division
 
from run_local import log
 

	
 
from rdflib import URIRef, Literal
 
from twisted.internet import reactor, utils
 
from txzmq import ZmqEndpoint, ZmqFactory, ZmqPullConnection
 
@@ -19,7 +21,6 @@ import traceback
 
import cyclone.web, cyclone.websocket
 
from greplin import scales
 

	
 
from run_local import log
 
from lib.cycloneerr import PrettyErrorHandler
 
from light9.collector.output import EnttecDmx, Udmx, DummyOutput
 
from light9.collector.collector import Collector
bin/run_local.py
Show inline comments
 
@@ -3,7 +3,50 @@
 
# this should be turned off when the programs are installed
 

	
 
import sys, os, socket
 
sys.path.insert(0,os.path.join(os.path.dirname(sys.argv[0]),".."))
 

	
 
def fixSysPath():
 
    root = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..')) + '/'
 

	
 
    # this is site-packages/zope.interface-4.5.0-py2.7-nspkg.pth,
 
    # slightly edited.
 
    import types
 
    has_mfs = sys.version_info > (3, 5);
 
    p = root + 'env/local/lib/python2.7/site-packages/zope'
 
    importlib = has_mfs and __import__('importlib.util');
 
    has_mfs and __import__('importlib.machinery');
 
    m = has_mfs and sys.modules.setdefault(
 
        'zope', importlib.util.module_from_spec(
 
            importlib.machinery.PathFinder.find_spec(
 
                'zope', [os.path.dirname(p)])));
 
    m = m or sys.modules.setdefault('zope', types.ModuleType('zope'));
 
    mp = (m or []) and m.__dict__.setdefault('__path__',[]);
 
    (p not in mp) and mp.append(p)
 
    
 
    p = root + 'env/local/lib/python2.7/site-packages/greplin'
 
    importlib = has_mfs and __import__('importlib.util');
 
    has_mfs and __import__('importlib.machinery');
 
    m = has_mfs and sys.modules.setdefault('greplin', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('greplin', [os.path.dirname(p)])));
 
    m = m or sys.modules.setdefault('greplin', types.ModuleType('greplin'));
 
    mp = (m or []) and m.__dict__.setdefault('__path__',[]);
 
    (p not in mp) and mp.append(p)
 

	
 
    sys.path = [
 
        root,
 
        root + 'env/lib/python2.7',
 
        root + 'env/lib/python2.7/plat-x86_64-linux-gnu',
 
        root + 'env/lib/python2.7/lib-tk',
 
        root + 'env/lib/python2.7/lib-old',
 
        root + 'env/lib/python2.7/lib-dynload',
 
        '/usr/lib/python2.7',
 
        '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 
        '/usr/lib/python2.7/lib-tk',
 
        root + 'env/local/lib/python2.7/site-packages',
 
        root + 'env/local/lib/python2.7/site-packages/gtk-2.0',
 
        root + 'env/lib/python2.7/site-packages',
 
        root + 'env/lib/python2.7/site-packages/gtk-2.0',
 
    ]
 

	
 
fixSysPath()
 

	
 
from twisted.python.failure import Failure
 

	
bin/subcomposer
Show inline comments
 
@@ -16,7 +16,12 @@ subcomposer
 

	
 
"""
 
from __future__ import division, nested_scopes
 

	
 
from run_local import log
 
import time, logging
 

	
 
log.setLevel(logging.DEBUG)
 

	
 
from optparse import OptionParser
 
import logging, urllib
 
import Tkinter as tk
 
@@ -24,12 +29,8 @@ import louie as dispatcher
 
from twisted.internet import reactor, tksupport, task
 
from rdflib import URIRef, RDF, RDFS, Literal
 

	
 
from run_local import log
 
log.setLevel(logging.DEBUG)
 

	
 
from light9.dmxchanedit import Levelbox
 
from light9 import dmxclient, Submaster, prof, showconfig, networking
 

	
 
from light9.Patch import get_channel_name
 
from light9.uihelpers import toplevelat
 
from rdfdb.syncedgraph import SyncedGraph
0 comments (0 inline, 0 general)