예제 #1
0
	#The next four lines are for compatibility with IPython 0.13.1
	ipython_rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
	ipython_rgxout=re.compile(r'(?:Out| ->  )\[(\d+)\]:\s?(.*)\s*')
	ipython_promptin ='Yade [%d]:'
	ipython_promptout=' ->  [%d]: '
	ipython_cont_spaces='     '
	#For IPython <=0.12, the following lines are used
	id.rgxin =re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
	id.rgxout=re.compile(r'(?:Out| ->  )\[(\d+)\]:\s?(.*)\s*')
	id.rgxcont=re.compile(r'(?:   +)\.\.+:\s?(.*)\s*')
	id.fmtin  ='Yade [%d]:'
	id.fmtout =' ->  [%d]: '  # for some reason, out and cont must have the trailing space
	id.fmtcont='     .\D.: '
	id.rc_override=dict(prompt_in1="Yade [\#]:",prompt_in2="     .\D.:",prompt_out=r" ->  [\#]: ")
	if yade.runtime.ipython_version<12:
		id.reconfig_shell()

	import ipython_console_highlighting as ich
	ich.IPythonConsoleLexer.input_prompt = re.compile("(Yade \[[0-9]+\]: )")
	ich.IPythonConsoleLexer.output_prompt = re.compile("(( ->  |Out)|\[[0-9]+\]: )")
	ich.IPythonConsoleLexer.continue_prompt = re.compile("\s+\.\.\.+:")


extensions = [
		'sphinx.ext.autodoc',
		'sphinx.ext.autosummary',
		'sphinx.ext.coverage',
		'sphinx.ext.pngmath',
		'sphinx.ext.graphviz',
		'sphinx.ext.viewcode',
		'sphinx.ext.inheritance_diagram',
예제 #2
0
    ipython_rgxout = re.compile(r'(?:Out| ->  )\[(\d+)\]:\s?(.*)\s*')
    ipython_promptin = 'Yade [%d]:'
    ipython_promptout = ' ->  [%d]: '
    ipython_cont_spaces = '     '
    #For IPython <=0.12, the following lines are used
    id.rgxin = re.compile(r'(?:In |Yade )\[(\d+)\]:\s?(.*)\s*')
    id.rgxout = re.compile(r'(?:Out| ->  )\[(\d+)\]:\s?(.*)\s*')
    id.rgxcont = re.compile(r'(?:   +)\.\.+:\s?(.*)\s*')
    id.fmtin = 'Yade [%d]:'
    id.fmtout = ' ->  [%d]: '  # for some reason, out and cont must have the trailing space
    id.fmtcont = '     .\D.: '
    id.rc_override = dict(prompt_in1="Yade [\#]:",
                          prompt_in2="     .\D.:",
                          prompt_out=r" ->  [\#]: ")
    if yade.runtime.ipython_version < 12:
        id.reconfig_shell()

    import ipython_console_highlighting as ich
    ich.IPythonConsoleLexer.input_prompt = re.compile("(Yade \[[0-9]+\]: )")
    ich.IPythonConsoleLexer.output_prompt = re.compile(
        "(( ->  |Out)|\[[0-9]+\]: )")
    ich.IPythonConsoleLexer.continue_prompt = re.compile("\s+\.\.\.+:")

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.autosummary',
    'sphinx.ext.coverage',
    'sphinx.ext.pngmath',
    'sphinx.ext.graphviz',
    'sphinx.ext.viewcode',
    'sphinx.ext.inheritance_diagram',