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.
.png)
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 !!!!
.png)
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.
Comments
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;
.png)
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
setd="/dev/nul"opendusedread xx closedzwrite xx
xx=""QAD
If you have a 2023.2 instance maybe try this:
https://community.intersystems.com/post/there-something-similar-studio-…
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