Written by

~~ retired but not tired ~~
Question Robert Cemper · Sep 4, 2023

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.

Product version: IRIS 2022.3
$ZV: IRIS for Windows (x86-64) 2022.3 (Build 606) Mon Jan 30 2023 09:20:17 EST

Comments

Robert Cemper · Sep 5, 2023

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
 

0
Robert Cemper  Sep 5, 2023 to Robert Cemper

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.

0
Robert Cemper  Sep 5, 2023 to Robert Cemper

cross check in ObjectScript

setd="/dev/nul"opendusedread xx closedzwrite xx
xx=""

QAD

0
Robert Cemper  Sep 5, 2023 to John Murray

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

0