Does Pluto supports readline()? #765
-
I am trying to run a = parse(Float64,readline()) on Pluto, but it seems it doesn't work. Hence I can't run functions such as the following, I am wondering if Pluto can run this. function start()
end Regards. Armando |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi Armando, We don't support terminal input and terminal output. These methods have classically been the easiest way to communicate with the user, but we feel that a modern language deserves something better. In your case, you can ask a yes/no question using: using PlutoUI md"""
Click to run the program: $(@bind answer CheckBox())
""" if answer
...
end Have a look at the PlutoUI sample notebook (from the Pluto main menu) to learn about all the input methods. -fons |
Beta Was this translation helpful? Give feedback.
-
Hi @fonsp and thanks for creating the awesome project. You mentioned:
but I didn't get that perspective. Can you explain more why terminal-based IO approach shouldn't be add to Pluto.jl? It seems that terminal IO is the primary thing a front-end should have. I and many users know the core team wants end-users to use PlutoUI.jl with better supporting and modern IO handler but it should be considered that terminal IO is also a nice tool -> users can benefit from that and the project is becoming more and more loved by the community just by supporting such a basic feature. For user who want to use modern approach they will use PlutoUI, for user who want to interact with the terminal IO they will have there tool. That is my supportive opinion. Hope you and the core team take consider our request. Thanks |
Beta Was this translation helpful? Give feedback.
Hi Armando,
We don't support terminal input and terminal output. These methods have classically been the easiest way to communicate with the user, but we feel that a modern language deserves something better.
In your case, you can ask a yes/no question using:
using PlutoUI
Have a look at the PlutoUI sample notebook (from the Pluto main menu) to learn about all the input methods.
-fons