Python - Problems executing commands

Issue #112 wontfix
Jose Miguel (Saytel) created an issue

Python 3.6 is being used on an AS400 V7R2 system.
The problem is that when a command is inserted, the prompt does not stop me, but the course is placed one line below showing me the first character of the statement, and until I return to give an ENTER, it does not perform the statement.

As shown in the figure that I have attached, it is seen how the statement related:

from infinisdk import *

When doing Enter, it jumps to the next line, but showing me the first character of the statement and until I don't give another Enter, it doesn't execute and it doesn't return the prompt.

I also show the client installation from IBM iACS with the latest version.

Comments (7)

  1. Kevin Adler

    There’s no such thing as V7R2 AS400 system. I think you mean IBM i.

    Regardless, the Python interactive environment uses GNU readline which doesn’t work properly from a 5250 session. This works fine from SSH, however.

  2. Jose Miguel (Saytel) reporter

    Hi Kevin
    Excuse me, you're right, the system is IBMi V7R2.

    I access paython from QSHELL, executing:
    call qp2term

    And then I run the python command.

    In this way I can access payhton and be able to execute commands.

    How can I solve the command problem?

    With the antiugo system in which the python is installed from the IBMi 5733OPS product I did not have this problem, instead with the installation of the python from iACS I am having problems with the command execution as I have indicated.

    Do you know if there is any solution?

    Thank you

  3. Jose Miguel (Saytel) reporter

    Sorry, I wanted to say:

    With the old system where Python is installed from the IBMi 5733OPS product I did not have this problem, however with the installation of Python from iACS I have problems with the command execution as I have indicated.

  4. Kevin Adler

    In the version we shipped with 5733-OPS, we did not use build Python with GNU Readline and that is the difference. GNU Readline provides advanced editing features, history, search, and more, however it does not work properly from a 5250 environment, only from SSH. We do not provide any support for running interactively from 5250. Please connect via SSH and run it there if you need such functionality.

  5. Jose Miguel (Saytel) reporter

    Hi
    So how can I connect through SSH and use the python that I have installed on the IBMi and use the packages?

    We need to use the pyhton through terminal 5250 to relaise tests and be able to create the *.py type programs and be able to execute them.

    Will we have any problems executing *.py programs?

    Thank you

  6. Jose Miguel (Saytel) reporter

    Hi
    We have used the putty application and it works for us.

    But since the IBMi has the option to run SSH by terminal 5250, it should work as it did with option 5733-OPS

    Thank you

  7. Kevin Adler

    I'm glad you got things running through SSH. That is the preferred and supported interface for interactive open source applications.

    Running non-interactive Python applications through 5250 should work fine, however running the Python REPL will not work. As a 5250 environment does not properly replicate a TTY environment, the fact that it worked at all before was a coincidence. Removing GNU Readline support may allow it to work as it did previously, but there is no guarantee that it will nor that it would continue to work in the future while also significantly degrading the experience for those running in SSH, therefore this is not something that we plan to fix.

  8. Log in to comment