 if it was loaded or False on failure.
  """

  def show_fail ():
    traceback.print_exc()
    print("Could not import module:", name)

  def do_import2 (base_name, names_to_try):
    if len(names_to_try) == 0:
      print("Module not found:", base_name)
      return False

    name = names_to_try.pop(0)

    if name in sys.modules:
      return name

    try:
      __import__(name, level=0)
      return name
    except ImportError:
      # There are two cases why this might happen:
      # 1. The named module could not be found
      # 2. Some dependent module (import foo) or some dependent
      #    name-in-a-module (e.g., from foo import bar) could not be found.
      # If it's the former, we might try a name variation (e.g., without
      # a leading "pox."), but if we ultimately can't find the named
      # module, we just say something along those lines and stop.
      # On the other hand, if the problem is with a dependency, we should
      # print a stack trace so that it can be fixed.
      # Sorting out the two cases is an ugly hack.

      message = str(sys.exc_info()[1].args[0])
      s = message.rsplit(" ", 1)

      if s[0] == "No module named" and (name.endswith(s[1])):
        # It was the one we tried to import itself. (Case 1)
        # If we have other names to try, try them!
        return do_import2(base_name, names_to_try)
      elif message == "Import by filename is not supported.":
        print(message)
        import os.path
        n = name.replace("/", ".").replace("\\", ".")
        n = n.replace( os.path.sep, ".")
        if n.startswith("pox.") or n.startswith("ext."):
          n = n[4:]
        print("Maybe you meant to run '%s'?" % (n,))
        return False
      else:
        # This means we found the module we were looking for, but one
        # of its dependencies was missing.
        show_fail()
        return False
    except:<commit_msg>boot: Improve can't-load-by-filename error message<commit_after>#!/bin/sh -

# Copyright 2011,2012,2013,2017 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# If you have PyPy 1.6+ in a directory called pypy alongside pox.py, we
# use it.
# Otherwise, we try to use a Python interpreter called python2.7, which
# is a good idea if you're using Python from MacPorts, for example.
# We fall back to just "python" and hope that works.

#TODO: Make runnable by itself (paths need adjusting, etc.).

''''true
export OPT="-u -O"
export FLG=""
if [ "$(basename $0)" = "debug-pox.py" ]; then
  export OPT=""
  export FLG="--debug"
fi

if [ -x pypy/bin/pypy ]; then
  exec pypy/bin/pypy $OPT "$0" $FLG "$@"
fi

if type python2.7 > /dev/null; then
  exec python2.7 $OPT "$0" $FLG "$@"
fi
exec python $OPT "$0" $FLG "$@"
'''

from __future__ import print_function

import logging
import logging.config
import os
import sys
import traceback
import time
import inspect
import types
import threading

import pox.core
core = None

import pox.openflow
from pox.lib.util import str_to_bool

# Function to run on main thread
_main_thread_function = None

try:
  import __pypy__
except ImportError:
  __pypy__ = None

def _do_import (name):
  """
  Try to import the named component.
  Returns its module name if it was loaded or False on failure.
  """

  def show_fail ():
    traceback.print_exc()
    print("Could not import module:", name)

  def do_import2 (base_name, names_to_try):
    if len(names_to_try) == 0:
      print("Module not found:", base_name)
      return False

    name = names_to_try.pop(0)

    if name in sys.modules:
      return name

    try:
      __import__(name, level=0)
      return name
    except ImportError:
      # There are two cases why this might happen:
      # 1. The named module could not be found
      # 2. Some dependent module (import foo) or some dependent
      #    name-in-a-module (e.g., from foo import bar) could not be found.
      # If it's the former, we might try a name variation (e.g., without
      # a leading "pox."), but if we ultimately can't find the named
      # module, we just say something along those lines and stop.
      # On the other hand, if the problem is with a dependency, we should
      # print a stack trace so that it can be fixed.
      # Sorting out the two cases is an ugly hack.

      message = str(sys.exc_info()[1].args[0])
      s = message.rsplit(" ", 1)

      if s[0] == "No module named" and (name.endswith(s[1])):
        # It was the one we tried to import itself. (Case 1)
        # If we have other names to try, try them!
        return do_import2(base_name, names_to_try)
      elif message == "Import by filename is not supported.":
        print(message)
        import os.path
        n = name.replace("/", ".").replace("\\", ".")
        n = n.replace( os.path.sep, ".")
        if n.startswith("pox.") or n.startswith("ext."):
          n = n[4:]
        if n.endswith(".py"):
          n = n[:-3]
        print("Maybe you meant to run '%s'?" % (n,))
        return False
      else:
        # This means we found the module we were looking for, but one
        # of its dependencies was missing.
        show_fail()
        return False
    except:&gt; capitalism is great. people becoming homeless because there arent enough goddamn jobs, while politicians ignore the problem and villify the unemployed, is not great.

Capitalism causes there to not be enough jobs. We produce enough stuff, but when private individuals are the ones solely responsible for deciding how the stuff gets distributed, they're going to choose the way that benefits them the most, obviously. You can't say that capitalism is great and that homelessness is not great. If everyone had a home, there would be much less demand for houses. *Surely* you wouldn't want to see the value of your home decrease, right? So, we love homelessness.I'm having some troubles with Chronicles of Riddick: Dark Athena. I'm playing the Escape From Butcher Bay remake. I got 4x Supersampling +...
Just did some testing with Crysis with 10.10a drivers on 5870. With CAT AI on "standard", I retain the same fps as older drivers, but with it on...
So the hardware AF problem is still not fixed in the 6 series? It is improved quite a bit though from before? What about on the software side of...
I think there must be some noticeable cost/reward associated with AF optimization. If having "true" AF doesn't really affect performance at all,...
I've just tried it on my 5870, using hacked 10.10a drivers with Surface Format Op. off and "Texture filtering Quality" at High Quality (maxed)......
Just tried MLAA on its own in Stalker