import sys
import nbformat

fn = sys.argv[1]

with open(fn, 'rt') as fnb:
    notebook = nbformat.read(fnb, as_version=4)

notebook['metadata'].setdefault('nbTranslate', {})['displayLangs'] = ["sl"]
notebook['metadata'].pop('celltoolbar', None)

with open(fn, 'wt') as fnb:
    nbformat.write(notebook, fnb)


6febee235dfed2579aa6ce94686b2bdc282312d8
<mask token>

<mask token>
with open(fn, 'rt') as fnb:
    notebook = nbformat.read(fnb, as_version=4)
<mask token>
notebook['metadata'].pop('celltoolbar', None)
with open(fn, 'wt') as fnb:
    nbformat.write(notebook, fnb)

<mask token>
fn = sys.argv[1]
with open(fn, 'rt') as fnb:
    notebook = nbformat.read(fnb, as_version=4)
notebook['metadata'].setdefault('nbTranslate', {})['displayLangs'] = ['sl']
notebook['metadata'].pop('celltoolbar', None)
with open(fn, 'wt') as fnb:
    nbformat.write(notebook, fnb)

import sys
import nbformat
fn = sys.argv[1]
with open(fn, 'rt') as fnb:
    notebook = nbformat.read(fnb, as_version=4)
notebook['metadata'].setdefault('nbTranslate', {})['displayLangs'] = ['sl']
notebook['metadata'].pop('celltoolbar', None)
with open(fn, 'wt') as fnb:
    nbformat.write(notebook, fnb)

import sys
import nbformat

fn = sys.argv[1]

with open(fn, 'rt') as fnb:
    notebook = nbformat.read(fnb, as_version=4)

notebook['metadata'].setdefault('nbTranslate', {})['displayLangs'] = ["sl"]
notebook['metadata'].pop('celltoolbar', None)

with open(fn, 'wt') as fnb:
    nbformat.write(notebook, fnb)

