I am trying to add some spaces on the start of each line from os.system commands
example
os.system('pip install pyinstaller')
and then I get this
Requirement already satisfied: pyinstaller in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (5.0.1)
Requirement already satisfied: pyinstaller-hooks-contrib>=2020.6 in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller) (2021.5)
Requirement already satisfied: setuptools in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller) (49.2.1)
Requirement already satisfied: altgraph in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller) (0.17.2)
Requirement already satisfied: pefile>=2017.8.1; sys_platform == "win32" in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller) (2021.9.3)
Requirement already satisfied: pywin32-ctypes>=0.2.0; sys_platform == "win32" in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pyinstaller) (0.2.0)
Requirement already satisfied: future in c:\users\pc\appdata\local\programs\python\python39\lib\site-packages (from pefile>=2017.8.1; sys_platform == "win32"->pyinstaller) (0.18.2)
WARNING: You are using pip version 20.2.3; however, version 22.1.2 is available.
You should consider upgrading via the 'c:\users\pc\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
but I want to add some spaces on each line for visuals so it fits in with the rest I have looked it up many times and I have searched for hours but I can't find it pls help
os.system()does not give you any control whatsoever over the output of the command - it's going directly to your terminal, bypassing Python completely. Use one of the functions in thesubprocessmodule instead.