# Path: PyDvi/Tools/EnumFactory.py
# def EnumFactory(cls_name, constant_names):
# 
#     """ Return an :class:`EnumMetaClass` instance, where *cls_name* is the class name and
#     *constant_names* is an iterable of constant's names.
#     """
# 
#     dict_ = {}
#     dict_['_size'] = len(constant_names)
#     for index, name in enumerate(constant_names):
#         dict_[str(name)] = index
# 
#     return EnumMetaClass(cls_name, (), dict_)
# 
# Path: PyDviGui/Tools/Math.py
# def rint(f):
#     return int(round(f))


import os
import platform
import sys
        import OpenGL.GL as GL
from PyQt4 import QtCore, QtGui
from PyDvi.Tools.EnumFactory import EnumFactory
from .Math import rint
                        number_of_cores += 1
            return number_of_cores

        elif self.os == platform_enum.windows:

            return int(os.getenv('NUMBER_OF_PROCESSORS'))

    ##############################################

    def _get_cpu_khz(self):

        if self.os == platform_enum.linux:
            with open('/proc/cpuinfo', 'rt') as cpuinfo:
                for line in cpuinfo:
                    if 'cpu MHz' in line:
                        s = line.split(':')[1]
                        return int(1000 * float(s))

        if self.os == platform_enum.windows:
            raise NotImplementedError

    ##############################################

    def _get_memory_size_kb(self):

        if self.os == platform_enum.linux:
            with open('/proc/meminfo', 'rt') as cpuinfo:
                for line in cpuinfo:
                    if 'MemTotal' in line:
                        s = line.split(':')[1][:-3]

# Path: PyDvi/Tools/EnumFactory.py
# def EnumFactory(cls_name, constant_names):
# 
#     """ Return an :class:`EnumMetaClass` instance, where *cls_name* is the class name and
#     *constant_names* is an iterable of constant's names.
#     """
# 
#     dict_ = {}
#     dict_['_size'] = len(constant_names)
#     for index, name in enumerate(constant_names):
#         dict_[str(name)] = index
# 
#     return EnumMetaClass(cls_name, (), dict_)
# 
# Path: PyDviGui/Tools/Math.py
# def rint(f):
#     return int(round(f))


# Path: PyDviGui/Tools/Platform.py
import os
import platform
import sys
        import OpenGL.GL as GL
from PyQt4 import QtCore, QtGui
from PyDvi.Tools.EnumFactory import EnumFactory
from .Math import rint

                        number_of_cores += 1
            return number_of_cores

        elif self.os == platform_enum.windows:

            return int(os.getenv('NUMBER_OF_PROCESSORS'))

    ##############################################

    def _get_cpu_khz(self):

        if self.os == platform_enum.linux:
            with open('/proc/cpuinfo', 'rt') as cpuinfo:
                for line in cpuinfo:
                    if 'cpu MHz' in line:
                        s = line.split(':')[1]
                        return int(1000 * float(s))

        if self.os == platform_enum.windows:
            raise NotImplementedError

    ##############################################

    def _get_memory_size_kb(self):

        if self.os == platform_enum.linux:
            with open('/proc/meminfo', 'rt') as cpuinfo:
                for line in cpuinfo:
                    if 'MemTotal' in line:
                        s = line.split(':')[1][:-3]

                        return int(s)