##// END OF EJS Templates
Removed "profiles"... Templates that are shipped with nbconvert by default should...
Removed "profiles"... Templates that are shipped with nbconvert by default should have settings built into exporter.py class. If the user wants to add a new template and use profile setting with it, the "profile" (config file) should be specified via the commandline when calling the exporter.

File last commit:

r10434:855e7b47
r10435:896aaed3
Show More
strings.py
34 lines | 1.1 KiB | text/x-python | PythonLexer
"""String utilities.
Contains a collection of usefull string manipulations functions.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
# Our own imports
import textwrap #TODO
#-----------------------------------------------------------------------------
# Functions
#-----------------------------------------------------------------------------
def wrap(text, width=100):
""" Intelligently wrap text"""
splitt = text.split('\n')
wrp = map(lambda x:textwrap.wrap(x,width),splitt)
wrpd = map('\n'.join, wrp)
return '\n'.join(wrpd)
def strip_dollars(text):
"""Remove all dollar symbols from text"""
return text.strip('$')