102 The ui module

Instructions

Add markdown syntax highlighting in combination with the markdown() function from the ui submodule to create this (not very reactive) app.

#| standalone: true
#| components: [viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui

ui.markdown(
    """
    ## Why Shiny for Python? 

    Shiny lets you make pure Python web apps quickly, without worrying about: 

    - cache 
    - state
    - callbacks 

    ...or even HTML, CSS, and JavaScript.
    """
)

## file: check4.py

import sys
import os

print(os.getcwd())

helpers_path = "docs/exercises"
if helpers_path not in sys.path:
    sys.path.append(helpers_path)
from helpers import problem_tabs_express, getcwd

print(getcwd())

# print(
#     problem_tabs_express(getcwd())
# )
#| standalone: true
#| components: [editor, viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui

"""
Why Shiny for Python? 

Shiny lets you make pure Python web apps quickly, without worrying about: 

cache 
state
callbacks 

...or even HTML, CSS, and JavaScript.
"""

## file: check4.py

import sys
import os

print(os.getcwd())

helpers_path = "docs/exercises"
if helpers_path not in sys.path:
    sys.path.append(helpers_path)
from helpers import problem_tabs_express, getcwd

print(getcwd())

# print(
#     problem_tabs_express(getcwd())
# )
#| standalone: true
#| components: [editor, viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui

ui.markdown(
    """
    ## Why Shiny for Python? 

    Shiny lets you make pure Python web apps quickly, without worrying about: 

    - cache 
    - state
    - callbacks 

    ...or even HTML, CSS, and JavaScript.
    """
)

## file: check4.py

import sys
import os

print(os.getcwd())

helpers_path = "docs/exercises"
if helpers_path not in sys.path:
    sys.path.append(helpers_path)
from helpers import problem_tabs_express, getcwd

print(getcwd())

# print(
#     problem_tabs_express(getcwd())
# )