.. _f-magicfile: module ``filehelper.magic_file`` ================================ .. inheritance-diagram:: pyensae.filehelper.magic_file Short summary +++++++++++++ module ``pyensae.filehelper.magic_file`` Magic command to handle files :githublink:`%|py|6` Classes +++++++ +--------------------------------------------------------------+-------------------------------------------+ | class | truncated documentation | +==============================================================+===========================================+ | :class:`MagicFile ` | Defines magic commands to help with files | +--------------------------------------------------------------+-------------------------------------------+ Functions +++++++++ +-----------------------------------------------------------------------------------+---------------------------------------------------------+ | function | truncated documentation | +===================================================================================+=========================================================+ | :func:`register_file_magics ` | register magics function, can be called from a notebook | +-----------------------------------------------------------------------------------+---------------------------------------------------------+ Properties ++++++++++ +-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +===============================================================================================+===============================================================================================================+ | :meth:`Context ` | return the context or None | +-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`cross_validation_lock ` | A contextmanager for running a block with our cross validation lock set to True. At the end of the block, ... | +-----------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ Static Methods ++++++++++++++ +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | staticmethod | truncated documentation | +===================================================================================+===========================================================+ | :meth:`encoding_parser ` | Defines the way to parse the magic command ``%encoding``. | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`grep_parser ` | defines the way to parse the magic command ``%grep`` | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`head_parser ` | defines the way to parse the magic command ``%head`` | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`hhelp_parser ` | Defines the way to parse the magic command ``%hhelp``. | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`lsr_parser ` | defines the way to parse the magic command ``%lsr`` | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`lsrepo_parser ` | Defines the way to parse the magic command ``%lsrepo``. | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`PYTHON_parser ` | Defines the way to parse the magic command ``%%PYTHON``. | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`runpy_parser ` | Defines the way to parse the magic command ``%%runpy``. | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ | :meth:`tail_parser ` | defines the way to parse the magic command ``%tail`` | +-----------------------------------------------------------------------------------+-----------------------------------------------------------+ Methods +++++++ +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +=====================================================================+===============================================================================================================+ | :meth:`encoding ` | Defines ``%encoding`` which guesses the encoding. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`grep ` | defines ``%grep`` which displays the first lines of a file | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`head ` | Defines ``%head`` which displays the first lines of a file. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`hhelp ` | Define ``%hhelp``, it displays the help for an object in :epkg:`HTML`. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`lsr ` | Defines ``%lsr`` which returns the content of a folder, the method stops after around 10000 files --> you ... | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`lsrepo ` | Defines ``%lsrepo``. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`PYTHON ` | Defines command ``%%PYTHON``. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`runpy ` | Defines command ``%%runpy``. | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ | :meth:`tail ` | defines ``%tail`` which displays the last lines of a file | +---------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: pyensae.filehelper.magic_file :members: :special-members: __init__ :show-inheritance: