File: print.py

package info (click to toggle)
python-trame-client 3.11.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,128 kB
  • sloc: python: 9,609; javascript: 3,897; sh: 9; makefile: 6
file content (31 lines) | stat: -rw-r--r-- 790 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from trame.app import get_server
from trame.ui.html import DivLayout
from trame.widgets import html

server = get_server(client_type="vue3")

# Test to dynamically add a fake directive
html.Div.register_directive("v_seb_directive")

with DivLayout(server) as layout:
    with html.Div(v_seb_directive=True):
        with html.Div():
            with html.Div(
                style="border: 1px;",
                classes=("dynaClass", {}),
            ) as sub_container:
                html.Span("Hello")

            print("=" * 60)
            print("widget")
            print("=" * 60)
            print(sub_container)

            html.Span("world")
        html.Span("What's")
    html.Span("Up")

    print("=" * 60)
    print("Full layout")
    print("=" * 60)
    print(layout)