• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(2438)  |  Call(2336)  |  Derive(0)  |  Import(102)
Insert an entry into the list of warnings filters (at the front).

'action' -- one of "error", "ignore", "always", "default", "module",
            or "once"
'message' -- a regex that the warning message must match
'category' -- a class that the warning must be a subclass of
'module' -- a regex that the module name must match
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters

        def filterwarnings(action, message="", category=Warning, module="", lineno=0,
                   append=0):
    """Insert an entry into the list of warnings filters (at the front).

    'action' -- one of "error", "ignore", "always", "default", "module",
                or "once"
    'message' -- a regex that the warning message must match
    'category' -- a class that the warning must be a subclass of
    'module' -- a regex that the module name must match
    'lineno' -- an integer line number, 0 matches all warnings
    'append' -- if true, append to the list of filters
    """
    import re
    assert action in ("error", "ignore", "always", "default", "module",
                      "once"), "invalid action: %r" % (action,)
    assert isinstance(message, basestring), "message must be a string"
    assert isinstance(category, (type, types.ClassType)), \
           "category must be a class"
    assert issubclass(category, Warning), "category must be a Warning subclass"
    assert isinstance(module, basestring), "module must be a string"
    assert isinstance(lineno, int) and lineno >= 0, \
           "lineno must be an int >= 0"
    item = (action, re.compile(message, re.I), category,
            re.compile(module), lineno)
    if append:
        filters.append(item)
    else:
        filters.insert(0, item)
        


src/z/a/zamboni-lib-HEAD/lib/python/argparse.py   zamboni-lib(Download)
if _sys.version_info[:2] == (2, 6):
    import warnings
    warnings.filterwarnings(
        action='ignore',
        message='BaseException.message has been deprecated as of Python 2.6',
        category=DeprecationWarning,
        module='argparse')

src/s/y/sympy-tensor-HEAD/examples/intermediate/mplot3d.py   sympy-tensor(Download)
def mplot3d(f, var1, var2, show=True):
    """
    Plot a 3d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-tensor-HEAD/examples/intermediate/mplot2d.py   sympy-tensor(Download)
def mplot2d(f, var, show=True):
    """
    Plot a 2d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-HEAD/examples/intermediate/mplot3d.py   sympy(Download)
def mplot3d(f, var1, var2, show=True):
    """
    Plot a 3d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-HEAD/examples/intermediate/mplot2d.py   sympy(Download)
def mplot2d(f, var, show=True):
    """
    Plot a 2d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-old-HEAD/examples/intermediate/mplot3d.py   sympy-old(Download)
def mplot3d(f, var1, var2, show=True):
    """
    Plot a 3d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-old-HEAD/examples/intermediate/mplot2d.py   sympy-old(Download)
def mplot2d(f, var, show=True):
    """
    Plot a 2d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/i/simplegrate-HEAD/sympy/examples/intermediate/mplot3d.py   simplegrate(Download)
def mplot3d(f, var1, var2, show=True):
    """
    Plot a 3d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/i/simplegrate-HEAD/sympy/examples/intermediate/mplot2d.py   simplegrate(Download)
def mplot2d(f, var, show=True):
    """
    Plot a 2d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

src/s/y/sympy-0.6.6/examples/intermediate/mplot3d.py   sympy(Download)
def mplot3d(f, var1, var2, show=True):
    """
    Plot a 3d function using matplotlib/Tk.
    """
 
    import warnings
    warnings.filterwarnings("ignore", "Could not match \S")

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next