Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 1.17 KB

File metadata and controls

66 lines (53 loc) · 1.17 KB
jupyter
jupytext kernelspec
text_representation
extension format_name format_version jupytext_version
.md
markdown
1.2
1.7.1
display_name language name
Python 3
python
python3

Execution environment

%load_ext pythonhere
%connect-there

Commands are executed in the application main thread, thread is blocked until the end of a cell code execution.
On first SSH connection, BoxLayout is set as a root widget.

Variables in the scope of the %there command:

  • app - Kivy application instance
  • root - current root widget
%%there
print(app)
print(root)

KV rules

%there kv rules processing is different from the normal Kivy behavior.
When class is registered for second time with the same name, previous declaration for that class is deleted.

%%there kv
<MyButton@Button>:
    color: "orange"
    text: "Orange"
        
MyButton:
    font_size: 100
%there screenshot -w 200
%%there kv
<MyButton@Button>:
    text: "Orange?"
        
MyButton:
    font_size: 100

color: "orange" rule is removed:

%there screenshot -w 200