You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Supported-types.md
+60-7Lines changed: 60 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,6 +103,8 @@ class Env:
103
103
run(Env).form()
104
104
```
105
105
106
+

107
+
106
108
### Functions
107
109
108
110
Will appear as buttons.
@@ -118,6 +120,8 @@ class Env:
118
120
run(Env).form()
119
121
```
120
122
123
+

124
+
121
125
Or use the `with` statement to redirect the stdout into the mininterface.
122
126
123
127
```python
@@ -126,6 +130,8 @@ with run(Env) as m:
126
130
m.alert("The text 'I'm here' is displayed in the window.")
127
131
```
128
132
133
+

134
+
129
135
!!! Warning
130
136
When used in a form like this `m.form({'My callback': my_callback)`, the value is left intact. It still points to the function. This behaviour might reconsidered and changed. (It might make more sense to change it to the return value instead.)
0 commit comments