python - Calling the shell commands from os.system not working -
i'm new python , have code this:
os.system(''' prompt_command="printf '%*s\n' "${columns:-$(tput cols)}" '' | tr ' ' -" ''') the part:
prompt_command="printf '%*s\n' "${columns:-$(tput cols)}" '' | tr ' ' -" does print - fill shell width. above command working expected in command prompt. when did in python. i'm getting no output @ all.
there no point of issuing command @ all.
as understand it, setting environment variable prompt_command in order make shell execute on every prompt.
but setting environment variable has impact of called shell, not caller. cannot change environment of parent process.
Comments
Post a Comment