{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "fbd54fe1", "metadata": { "tags": [ "import" ] }, "outputs": [], "source": [ "from taipy.gui import Gui, Markdown" ] }, { "cell_type": "code", "execution_count": null, "id": "301d6ab4", "metadata": { "tags": [ "page_declaration" ] }, "outputs": [], "source": [ "a = 10\n", "page = Markdown(\"# Hello\\n<|{a}|>\")" ] }, { "cell_type": "code", "execution_count": null, "id": "998cbb6f", "metadata": { "tags": [ "gui_init" ] }, "outputs": [], "source": [ "gui = Gui()\n", "gui.add_page(\"page1\", page)" ] }, { "cell_type": "code", "execution_count": null, "id": "50d524c2", "metadata": { "tags": [ "gui_run" ] }, "outputs": [], "source": [ "gui.run(run_browser=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "7b722848", "metadata": { "tags": [ "get_variable" ] }, "outputs": [], "source": [ "gui.state.a" ] }, { "cell_type": "code", "execution_count": null, "id": "12e0df89", "metadata": { "tags": [ "set_variable" ] }, "outputs": [], "source": [ "gui.state.a = 20" ] }, { "cell_type": "code", "execution_count": null, "id": "8332b3b5", "metadata": { "tags": [ "re_get_variable" ] }, "outputs": [], "source": [ "gui.state.a" ] }, { "cell_type": "code", "execution_count": null, "id": "6b9aecf6", "metadata": { "tags": [ "gui_stop" ] }, "outputs": [], "source": [ "gui.stop()" ] }, { "cell_type": "code", "execution_count": null, "id": "9db9e339", "metadata": { "tags": [ "gui_re_run" ] }, "outputs": [], "source": [ "gui.run(run_browser=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "9a99cbb8", "metadata": { "tags": [ "gui_reload" ] }, "outputs": [], "source": [ "gui.reload()" ] }, { "cell_type": "code", "execution_count": null, "id": "6fea38f8", "metadata": { "tags": [ "gui_re_stop" ] }, "outputs": [], "source": [ "gui.stop()" ] } ], "metadata": { "celltoolbar": "Tags", "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.3" }, "vscode": { "interpreter": { "hash": "f81c1c330ff76e7e2c4accc0f953a67e4f184dd1f43b2c6b6dd2818d8aa11ecb" } } }, "nbformat": 4, "nbformat_minor": 5 }