| import sys |
| |
| #======================================================================================================================= |
| # PydevdVmType |
| #======================================================================================================================= |
| class PydevdVmType: |
| |
| PYTHON = 'python' |
| JYTHON = 'jython' |
| vm_type = None |
| |
| |
| #======================================================================================================================= |
| # SetVmType |
| #======================================================================================================================= |
| def SetVmType(vm_type): |
| PydevdVmType.vm_type = vm_type |
| |
| |
| #======================================================================================================================= |
| # GetVmType |
| #======================================================================================================================= |
| def GetVmType(): |
| if PydevdVmType.vm_type is None: |
| SetupType() |
| return PydevdVmType.vm_type |
| |
| |
| #======================================================================================================================= |
| # SetupType |
| #======================================================================================================================= |
| def SetupType(str=None): |
| if str is not None: |
| PydevdVmType.vm_type = str |
| return |
| |
| if sys.platform.startswith("java"): |
| PydevdVmType.vm_type = PydevdVmType.JYTHON |
| else: |
| PydevdVmType.vm_type = PydevdVmType.PYTHON |
| |