예제 #1
0
파일: main.py 프로젝트: CodeOps/hippyvm
#!/usr/bin/env python
""" Hippy VM. Execute by typing

hippy [--gcdump dumpfile] [--cgi] [--server port] [--jit jit_param] [<file.php>] [php program options]

and enjoy
"""

import sys
import os

if __name__ == '__main__': # untranslated
    sys.path.insert(0, os.path.dirname(
        os.path.dirname(os.path.abspath(__file__))))
    from hippy.hippyoption import enable_all_optional_extensions
    enable_all_optional_extensions()

from hippy.phpcompiler import compile_php
from hippy.interpreter import Interpreter
from hippy.objspace import getspace
from hippy.error import ExplicitExitException, InterpreterError, SignalReceived
from hippy.config import load_ini
from hippy.sourceparser import ParseError
from hippy.lexer import LexerError
from rpython.rlib.rgc import dump_rpy_heap
from rpython.rlib.objectmodel import we_are_translated
from hippy import rpath

# Needs to be a separate func so flowspace doesn't say import cannot succeed
# when there is no fastcgi module source around.
def _run_fastcgi_server(server_port):
예제 #2
0
파일: main.py 프로젝트: mnazimek/hippyvm
#!/usr/bin/env python
""" Hippy VM. Execute by typing

hippy [--gcdump dumpfile] [--cgi] [--server port] <file.php> [php program options]

and enjoy
"""

import sys
import os

if __name__ == '__main__':  # untranslated
    sys.path.insert(
        0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
    from hippy.hippyoption import enable_all_optional_extensions
    enable_all_optional_extensions()

from hippy.phpcompiler import compile_php
from hippy.interpreter import Interpreter
from hippy.objspace import getspace
from hippy.error import ExplicitExitException, InterpreterError, SignalReceived
from hippy.config import load_ini
from hippy.sourceparser import ParseError
from hippy.lexer import LexerError
from rpython.rlib.rgc import dump_rpy_heap
from rpython.rlib.objectmodel import we_are_translated
from rpython.rlib import rpath


# Needs to be a separate func so flowspace doesn't say import cannot succeed
# when there is no fastcgi module source around.