def sympy_config(mpl_backend):
 if (mpl_backend is not None):
  lines = '\nfrom sympy.interactive import init_session\ninit_session()\n%matplotlib {0}\n'.format(mpl_backend)
 else:
  lines = '\nfrom sympy.interactive import init_session\ninit_session()\n'
 return lines

def sympy_config ( mpl_backend ) : if ( mpl_backend is not None ) : lines = '\nfrom sympy.interactive import init_session\ninit_session()\n%matplotlib {0}\n' . format ( mpl_backend ) else : lines = '\nfrom sympy.interactive import init_session\ninit_session()\n' return lines
sympy configuration .