equal
deleted
inserted
replaced
27 from __future__ import print_function |
27 from __future__ import print_function |
28 import os |
28 import os |
29 import sys |
29 import sys |
30 import getopt |
30 import getopt |
31 import threading |
31 import threading |
32 from threading import Thread |
32 from threading import Thread, currentThread |
33 import traceback |
33 import traceback |
34 import __builtin__ |
34 import __builtin__ |
35 import Pyro.core as pyro |
35 import Pyro.core as pyro |
36 |
36 |
37 from runtime import PLCObject, PLCprint, ServicePublisher |
37 from runtime import PLCObject, PLCprint, ServicePublisher |
177 print("Wx unavailable !") |
177 print("Wx unavailable !") |
178 havewx = False |
178 havewx = False |
179 |
179 |
180 if havewx: |
180 if havewx: |
181 import re |
181 import re |
182 from threading import Thread, currentThread |
|
183 from types import * |
182 from types import * |
184 |
183 |
185 if wx.VERSION >= (3, 0, 0): |
184 if wx.VERSION >= (3, 0, 0): |
186 app = wx.App(redirect=False) |
185 app = wx.App(redirect=False) |
187 else: |
186 else: |
476 if enabletwisted: |
475 if enabletwisted: |
477 import warnings |
476 import warnings |
478 with warnings.catch_warnings(): |
477 with warnings.catch_warnings(): |
479 warnings.simplefilter("ignore") |
478 warnings.simplefilter("ignore") |
480 try: |
479 try: |
481 from threading import Thread, currentThread |
|
482 if havewx: |
480 if havewx: |
483 from twisted.internet import wxreactor |
481 from twisted.internet import wxreactor |
484 wxreactor.install() |
482 wxreactor.install() |
485 from twisted.internet import reactor |
483 from twisted.internet import reactor |
486 |
484 |