Metadata-Version: 2.1
Name: xdev
Version: 0.2.0
Summary: Developer tools
Home-page: https://github.com/Erotemic/xdev
Author: Jon Crall
Author-email: erotemic@gmail.com
License: Apache 2
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/x-rst
Provides-Extra: all
Provides-Extra: tests
Requires-Dist: ubelt
Requires-Dist: xinspect
Requires-Dist: numpy
Requires-Dist: pyfiglet
Requires-Dist: pygments
Requires-Dist: IPython
Requires-Dist: parse
Requires-Dist: line-profiler
Requires-Dist: pyflakes
Provides-Extra: all
Requires-Dist: ubelt; extra == 'all'
Requires-Dist: xinspect; extra == 'all'
Requires-Dist: numpy; extra == 'all'
Requires-Dist: pyfiglet; extra == 'all'
Requires-Dist: pygments; extra == 'all'
Requires-Dist: IPython; extra == 'all'
Requires-Dist: parse; extra == 'all'
Requires-Dist: line-profiler; extra == 'all'
Requires-Dist: pyflakes; extra == 'all'
Requires-Dist: pytest; extra == 'all'
Requires-Dist: coverage; extra == 'all'
Requires-Dist: xdoctest; extra == 'all'
Requires-Dist: pytest-cov; extra == 'all'
Provides-Extra: tests
Requires-Dist: pytest; extra == 'tests'
Requires-Dist: coverage; extra == 'tests'
Requires-Dist: xdoctest; extra == 'tests'
Requires-Dist: pytest-cov; extra == 'tests'

xdev
----
Miscellaneous interactive debugging tools for developers


Perhaps I should just use `ipdb` but I often just like to directly embed with IPython whenever I want:


.. code:: python

    import xdev
    xdev.embed()


Or wherever I want whenever there is an exception.

.. code:: python

    import xdev
    with xdev.embed_on_exception_context:
        some_code()


I don't feel like I need  ``ipdb``'s other features. 


I also like to 


.. code:: python

    def func(a=1, b=2, c=3):
        """
        Example:
            >>> from this.module import *  # import contextual namespace
            >>> import xinspect
            >>> globals().update(xinspect.get_func_kwargs(func))  # populates globals with default kwarg value
            >>> print(a + b + c)
            6
        """

But I know these things are a little dirty. 

But these aren't production practices. These are development tricks and life
hacks to make working faster.


Also see ``xinspect`` for things like ``autogen_imports``


.. code:: python

    >>> import ubelt as ub
    >>> source = ub.codeblock(
    >>>     '''
    >>>     p = os.path.dirname(join('a', 'b'))
    >>>     glob.glob(p)
    >>>     ''')
    >>> # Generate a list of lines to fix the name errors
    >>> lines = autogen_imports(source=source)
    >>> print(lines)
    ['import glob', 'from os.path import join', 'import os']


https://github.com/Erotemic/xinspect


