Embedded Python vs. WebTerminal
For my Embedded Python ONLY demo package I need some user input.
Similar to ObjectScript
read "say somthing",reply
I use the Python equivalent
reply = input("say something")
And this works excellent without problems from Terminal or Doker console
BAD SURPRISE:
with WebTermnial ObjectSscript works fine, but embedded Python fails badly.
I do not care about line terminators without <CR>
but it is just impossible to receive any input.
This is no improvement. The content is missing !!!!
QUESTION to the experts.
What is the Python way around this issue ?
I have of course a temporary hack using ObjectScript READ to get it running,
BUT: This derivate is not Python ONLY anymore and therefore not acceptable.
Maybe you could fix WebTerminal somehow?
I think I found the deeper cause of the problem.
In WebTeminal both $P and $I point to a /nul device
Standard input from a NUL device is a NUL_string in any programming language I know
As you can see this is happening here;
I assume this is a design issue of WebTerminal and a mismatch with Embedded Py
Investigating WebTerminal.core shows a top-quality redirect construct
designed specifically for ObjectScript.
I doubt that Embedded Py is able to make use of it.
cross check in ObjectScript
set d="/dev/nul" open d use d read xx close d zwrite xx xx=""
QAD
If you have a 2023.2 instance maybe try this:
https://community.intersystems.com/post/there-something-similar-studio-o...
Thank you @John Murray !
As I haven't been forced to use VCS up to now I leave the check to someone more experienced.
I use personally WebTerminal just for access to the Demo Server.
So I have no direct pain. It's more a warning
This is my final Workaround for Webterminal