/usr/lib/python2.7/dist-packages/pyevolve/__init__.py is in python-pyevolve 0.6~rc1+svn398+dfsg-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | """
:mod:`pyevolve` -- the main pyevolve namespace
================================================================
This is the main module of the pyevolve, every other module
is above this namespace, for example, to import :mod:`Mutators`:
>>> from pyevolve import Mutators
"""
__all__ = ["Consts", "Crossovers", "DBAdapters", "FunctionSlot",
"G1DBinaryString", "G1DList", "G2DBinaryString",
"G2DList", "GAllele", "GenomeBase", "GPopulation",
"GSimpleGA", "GTree", "Initializators",
"Migration", "Mutators", "Network", "Scaling", "Selectors",
"Statistics", "Util"]
__version__ = '0.6'
__author__ = 'Christian S. Perone'
import pyevolve.Consts
import sys
if sys.version_info[:2] < Consts.CDefPythonRequire:
raise Exception("Python 2.5+ required, the version %s was found on your system !" % (sys.version_info[:2],))
del sys
def logEnable(filename=Consts.CDefLogFile, level=Consts.CDefLogLevel):
""" Enable the log system for pyevolve
:param filename: the log filename
:param level: the debugging level
Example:
>>> pyevolve.logEnable()
"""
import logging
logging.basicConfig(level=level,
format='%(asctime)s [%(module)s:%(funcName)s:%(lineno)d] %(levelname)s %(message)s',
filename=filename,
filemode='w')
logging.info("Pyevolve v.%s, the log was enabled by user.", __version__)
|