def create_prompt(prompt):
    """Create a prompt manager.

    Parameters
    ----------

    prompt : str or class driving from BasePromptManager
        The prompt name ('python' or 'ipython') or a custom PromptManager
        class.

    """
    if prompt is None:
        prompt = 'python'
    if prompt == 'python':
        prompt = PythonPromptManager
    elif prompt == 'ipython':
        prompt = IPythonPromptManager
    # Instanciate the class.
    if isinstance(prompt, BasePromptManager):
        return prompt
    else:
        return prompt()
Create a prompt manager.

    Parameters
    ----------

    prompt : str or class driving from BasePromptManager
        The prompt name ('python' or 'ipython') or a custom PromptManager
        class.

    
ipymd/core/prompt.py