3

I want to create a SQL like language using Python. I want it to look like CMD but always open a proper dedicated tab instead of opening Command prompt to take in the commands. Any recommendations for modules that let you create a command line?

I could use Tkinter and take input from user and process it but I'm curious if there's a better way of doing this.

webmetic
  • 31
  • 1
  • 5

2 Answers2

2

If I understood correctly, if you desire a "shell like" UI experience you can try something more like a TUI (Text User Interface), I recommend :

prompt-toolkit: https://github.com/prompt-toolkit/python-prompt-toolkit

npyscreen: https://github.com/npcole/npyscreen

Also take a look at this answer: Input in a Python text-based GUI (TUI)

dejanualex
  • 3,872
  • 6
  • 22
  • 37
0

use start (your file's name) in window cmd when you have the directory contains your file set as directory, so the whole thing would be like:
cd C:/username/my folder/subfolder/folder containing your python file
don't forget next line here,
start filename.py
end result should be what you want. and you don't need a module, input() is going to cut it.