##// END OF EJS Templates
Merge pull request #3863 from damianavila/speaker_notes...
Merge pull request #3863 from damianavila/speaker_notes Added working speaker notes for slides. To resume, I fetch the cdn containing the files we need to make speaker notes works. Then I pass this info using the resources dict to the write which output the files in the correct path... I make some other additions to make this feature an option from the command line, ie: if you want a simple slideshow: ipython nbconvert your_slides.ipynb --to slides if you want a simple served slideshow: ipython nbconvert your_slides.ipynb --to slides --post serve if you want to use a local copy of the reveal.js library: ipython nbconvert your_slides.ipynb --to slides --post serve --local reveal.js and if you want to use speaker notes: ipython nbconvert your_slides.ipynb --to slides --post serve --notes True or ipython nbconvert your_slides.ipynb --to slides --post serve --notes True --local reveal.js but this last one is redundant because if you are using a local reveal.js library the speaker notes are functional by default.

File last commit:

r6563:10f133e4
r12197:4565b731 merge
Show More
test_openpy.py
23 lines | 803 B | text/x-python | PythonLexer
import io
import os.path
import nose.tools as nt
from IPython.utils import openpy
mydir = os.path.dirname(__file__)
nonascii_path = os.path.join(mydir, '../../core/tests/nonascii.py')
def test_detect_encoding():
f = open(nonascii_path, 'rb')
enc, lines = openpy.detect_encoding(f.readline)
nt.assert_equal(enc, 'iso-8859-5')
def test_read_file():
read_specified_enc = io.open(nonascii_path, encoding='iso-8859-5').read()
read_detected_enc = openpy.read_py_file(nonascii_path, skip_encoding_cookie=False)
nt.assert_equal(read_detected_enc, read_specified_enc)
assert u'coding: iso-8859-5' in read_detected_enc
read_strip_enc_cookie = openpy.read_py_file(nonascii_path, skip_encoding_cookie=True)
assert u'coding: iso-8859-5' not in read_strip_enc_cookie