parameters: (cls)
docstring: This method verifies the sequence of PYTHONPATH and warns about
          the crappy ones.
docstring_summary: This method verifies the sequence of PYTHONPATH and warns about
          the crappy ones.
docstring_tokens: This method verifies the sequence of PYTHONPATH and warns about the crappy ones .
function: def validate_environment(cls):
          """
          This method verifies the sequence of PYTHONPATH and warns about
          the crappy ones.
          """
          from sys import version_info, executable  # pylint: disable=W0404,W0621
          import os
          from subprocess import call
          from uuid import uuid4
  
          pypath = os.path.join(os.getcwd(), str(uuid4()), "crap", "check")
          if call((executable, "-c",
                   "import sys; sys.exit(sys.path[1] != \"%s\")" % pypath),
                  env={"PYTHONPATH": pypath}):
              excmsg = (
                  "Your Python environment looks crappy because PYTHONPATH does "
                  "not have priority over other paths. Veles is sensitive to "
                  "PYTHONPATH order. To reproduce the problem, run:\n"
                  "PYTHONPATH=/tmp %s -c \"import sys; print(sys.path)\"\n"
                  "Check your *.pth files, e.g. "
                  "/usr/local/lib/python%d.%d/dist-packages/easy-install.pth. "
                  "Perhaps, you should set sys.__egginsert to 1 on the first "
                  "line of that file." %
                  (executable, version_info.major, version_info.minor))
              raise cls.PythonPathError(excmsg)
function_tokens: def validate_environment ( cls ) : from sys import version_info , executable # pylint: disable=W0404,W0621 import os from subprocess import call from uuid import uuid4 pypath = os . path . join ( os . getcwd ( ) , str ( uuid4 ( ) ) , "crap" , "check" ) if call ( ( executable , "-c" , "import sys; sys.exit(sys.path[1] != \"%s\")" % pypath ) , env = { "PYTHONPATH" : pypath } ) : excmsg = ( "Your Python environment looks crappy because PYTHONPATH does " "not have priority over other paths. Veles is sensitive to " "PYTHONPATH order. To reproduce the problem, run:\n" "PYTHONPATH=/tmp %s -c \"import sys; print(sys.path)\"\n" "Check your *.pth files, e.g. " "/usr/local/lib/python%d.%d/dist-packages/easy-install.pth. " "Perhaps, you should set sys.__egginsert to 1 on the first " "line of that file." % ( executable , version_info . major , version_info . minor ) ) raise cls . PythonPathError ( excmsg )