{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "This file is part of the [test suite](./tests) and will be moved there when [nbval#116](https://github.com/computationalmodelling/nbval/issues/116#issuecomment-793148404) is fixed.\n", "\n", "See [DEMO.ipynb](DEMO.ipynb) instead for notebook examples." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from functools import partial\n", "from time import sleep\n", "\n", "from tqdm.notebook import tqdm_notebook\n", "from tqdm.notebook import tnrange\n", "\n", "# avoid displaying widgets by default (pollutes output cells)\n", "tqdm = partial(tqdm_notebook, display=False)\n", "trange = partial(tnrange, display=False)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Help on function display in module tqdm.notebook:\n", "\n", "display(self, msg=None, pos=None, close=False, bar_style=None)\n", " Use `self.sp` to display `msg` in the specified `pos`.\n", " \n", " Consider overloading this function when inheriting to use e.g.:\n", " `self.some_frontend(**self.format_dict)` instead of `self.sp`.\n", " \n", " Parameters\n", " ----------\n", " msg : str, optional. What to display (default: `repr(self)`).\n", " pos : int, optional. Position to `moveto`\n", " (default: `abs(self.pos)`).\n", "\n" ] } ], "source": [ "help(tqdm_notebook.display)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# basic use" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "7c18c038bf964b55941e228503292506", "version_major": 2, "version_minor": 0 }, "text/plain": [ " 0%| | 0/10 [00:00