1import sys
2
3#=======================================================================================================================
4# PydevdVmType
5#=======================================================================================================================
6class PydevdVmType:
7
8    PYTHON = 'python'
9    JYTHON = 'jython'
10    vm_type = None
11
12
13#=======================================================================================================================
14# set_vm_type
15#=======================================================================================================================
16def set_vm_type(vm_type):
17    PydevdVmType.vm_type = vm_type
18
19
20#=======================================================================================================================
21# get_vm_type
22#=======================================================================================================================
23def get_vm_type():
24    if PydevdVmType.vm_type is None:
25        setup_type()
26    return PydevdVmType.vm_type
27
28
29#=======================================================================================================================
30# setup_type
31#=======================================================================================================================
32def setup_type(str=None):
33    if str is not None:
34        PydevdVmType.vm_type = str
35        return
36
37    if sys.platform.startswith("java"):
38        PydevdVmType.vm_type = PydevdVmType.JYTHON
39    else:
40        PydevdVmType.vm_type = PydevdVmType.PYTHON
41
42