prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Get problems when converting a command line program to a network call using the telentd tool

Open
#933 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

Hi:
I have a command line program written in python-prompt-toolkit.Now I use the busybox_TELNETD tool to convert it into a network telnet call.It is my sample code.

#!./venv/bin/python
# coding=UTF-8
from prompt_toolkit import prompt
if __name__ == '__main__':
    answer = prompt('Give me some input: ')
    print('You said: %s' % answer)

then I use telentd.
./busybox_TELNETD -l ./main_1.py -b 0.0.0.0:9999 -F
then I use telnet to test is.Everything is ok.
2019-06-28-022812_808x259_scrot
But I get problems when I use the python library telnetlib.
2019-06-28-023414_1785x401_scrot
I got a warning and didn't get str 'Give me some input: '
how could I solve this?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided main_1.py example, the prompt_toolkit prompt call, and the Python telnetlib client used against busybox_TELNETD. Compare the telnetlib session with the working interactive telnet session and determine whether the prompt appears and input completes; document the confirmed cause and compatible interaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.