equal
deleted
inserted
replaced
21 # |
21 # |
22 # You should have received a copy of the GNU General Public License |
22 # You should have received a copy of the GNU General Public License |
23 # along with this program; if not, write to the Free Software |
23 # along with this program; if not, write to the Free Software |
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
25 |
25 |
26 import os, sys, getopt |
26 import os |
|
27 import sys |
|
28 import getopt |
27 from threading import Thread |
29 from threading import Thread |
28 |
30 |
29 def usage(): |
31 def usage(): |
30 print """ |
32 print """ |
31 Usage of Beremiz PLC execution service :\n |
33 Usage of Beremiz PLC execution service :\n |
522 WorkingDir, argv, autostart, |
524 WorkingDir, argv, autostart, |
523 statuschange, pyruntimevars=pyruntimevars) |
525 statuschange, pyruntimevars=pyruntimevars) |
524 |
526 |
525 |
527 |
526 # Exception hooks s |
528 # Exception hooks s |
527 import threading, traceback |
529 import threading |
|
530 import traceback |
528 def LogException(*exp): |
531 def LogException(*exp): |
529 if pyroserver.plcobj is not None: |
532 if pyroserver.plcobj is not None: |
530 pyroserver.plcobj.LogMessage(0,'\n'.join(traceback.format_exception(*exp))) |
533 pyroserver.plcobj.LogMessage(0,'\n'.join(traceback.format_exception(*exp))) |
531 else: |
534 else: |
532 traceback.print_exception(*exp) |
535 traceback.print_exception(*exp) |