Skip to content

Instantly share code, notes, and snippets.

drevicko /
Created August 9, 2017 11:19 — forked from takluyver/
Run 2to3 on IPython notebooks
#!/usr/bin/env python3
To run: python3 notebook-or-directory
# Authors: Thomas Kluyver, Fernando Perez
# See:
import argparse
import pathlib
from nbformat import read, write
#!/usr/bin/env python3
"""Emulate bash:
$ cat /tmp/fifo.tub &
$ gunzip -c /tmp/filedata.dat.gz > /tmp/fifo.tub
import os
from contextlib import contextmanager