Checklist
What is the idea?
We need a strong[er] Design for our overall output and rendering API and application flow. "Traditional" python application happen in a console, where the medium for both is the console. PyScript is to be considered a GUI Application where, in most cases, the place for output vs display is different.
Why is this needed
Our current design is confusing and not user friendly. Some of the reasons are that:
- it doesn't separate the concept of output from display.
output mixes both and, while allows to explicitly write to both separately (by outputting to console and using write to write to DOM)
- the default behavior is confusing
- options to customize are not enough
- documentation is bad or missing
What should happen?
print
- Should escape (by default)
- Is not intended for rich outputs (e.g. repr_svg)
- By default you print to JS console
- In debug mode we have a nice console that is visible by default
render/display function
- Intended for rich output like IPython global display
- Probably also escapes strings
- By default renders in-place but can also have a target (and can be overridden by output attribute on py-script tag)
No consensus on default tag last line output behavior
Additional Context
Child Issues
Issues Impacted:
Checklist
type-featuretag)What is the idea?
We need a strong[er] Design for our overall output and rendering API and application flow. "Traditional" python application happen in a console, where the medium for both is the console. PyScript is to be considered a GUI Application where, in most cases, the place for output vs display is different.
Why is this needed
Our current design is confusing and not user friendly. Some of the reasons are that:
outputmixes both and, while allows to explicitly write to both separately (by outputting to console and usingwriteto write to DOM)What should happen?
printrender/displayfunctionNo consensus on default tag last line output behavior
Additional Context
Child Issues
displayfunction #635Issues Impacted:
print(arg1, arg2)the output shows up on separate lines #103