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

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -