Exemplo n.º 1
0
Arquivo: main.py Projeto: smurfix/MoaT
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 3 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License (included; see the file LICENSE)
##  for more details.
##
##  This header is auto-generated and may self-destruct at any time,
##  courtesy of "make update". The original is in ‘scripts/_boilerplate.py’.
##  Thus, do not remove the next line, or insert any blank lines above.
##BP

from moat import patch;patch()
from moat.interpreter import InteractiveInterpreter,Interpreter
from moat.parser import parse
from moat.statement import main_words, global_words
from moat.check import register_condition
from moat.module import load_module, Load,LoadDir
from moat.reactor import ShutdownHandler,mainloop,shut_down
from moat.context import Context
from moat.twist import callLater,fix_exception
from moat.logging import log_level,NONE

from tokenize import tok_name
import os,sys

main_words.register_statement(Load)
main_words.register_statement(LoadDir)
Exemplo n.º 2
0
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 3 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License (included; see the file LICENSE)
##  for more details.
##
##  This header is auto-generated and may self-destruct at any time,
##  courtesy of "make update". The original is in ‘scripts/_boilerplate.py’.
##  Thus, do not remove the next line, or insert any blank lines above.
##BP

from moat import patch;patch()
from moat.reactor import ShutdownHandler
from moat.module import load_module
from moat.statement import DoNothingHandler, main_words

from test import run

input = u"""\
on test me:
	log DEBUG "Parallel MoaT handler"
on run test:
	exec test.exec.called one $also
on test it:
	if equal $what ever:
		log DEBUG Y what $what
	else:
Exemplo n.º 3
0
##  the Free Software Foundation, either version 3 of the License, or
##  (at your option) any later version.
##
##  This program is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License (included; see the file LICENSE)
##  for more details.
##
##  This header is auto-generated and may self-destruct at any time,
##  courtesy of "make update". The original is in ‘scripts/_boilerplate.py’.
##  Thus, do not remove the next line, or insert any blank lines above.
##BP

from moat import patch
patch()
from moat.reactor import ShutdownHandler
from moat.module import load_module
from moat.statement import main_words
from test import run

input = """\
async:
	wait Foo Bar: for 1.9
wait BEFORE: for 0.2
block:
	log DEBUG Start
	while exists wait Foo Bar:
		log DEBUG waiting
		wait DURING: for 0.7
		log DEBUG testing
Exemplo n.º 4
0
##
##  This header is auto-generated and may self-destruct at any time,
##  courtesy of "make update". The original is in ‘scripts/_boilerplate.py’.
##  Thus, do not remove the next line, or insert any blank lines above.
##BP

import six

if six.PY2:
    import sys

    sys.exit(121)

from moat import patch

patch()
from moat.reactor import ShutdownHandler
from moat.module import load_module, Load
from moat.statement import main_words
from moat.check import register_condition
from moat.logging import log, DEBUG
from test import run
from gevent import spawn, sleep, event
import qbroker

qbroker.setup(gevent=True)
from qbroker.unit import CC_DICT
import asyncio
import aiogevent

import sys