Why is venv prompt config ignored? /u/bearinthetown Python Education

Today I learned how to use custom venv prompt. We set it when creating new venv:

bash python -m venv ./foo/ --prompt=cheese

This way, we the prompt gets prefixed with (cheese) instead of (foo).

I noticed that using --prompt when creating new venv, adds a setting in pyvenv.cfg:

prompt = 'cheese'

However, this setting seems to be completely useless, because 'cheese' gets hardcoded in the activate script anyway. I was disappointed to find out that changing prompt setting in pyvenv.cfg followed by activate doesn’t actually use that value at all.

Am I missing something? What is the prompt setting in pyvenv.cfg for then?

submitted by /u/bearinthetown
[link] [comments]

​r/learnpython Today I learned how to use custom venv prompt. We set it when creating new venv: bash python -m venv ./foo/ –prompt=cheese This way, we the prompt gets prefixed with (cheese) instead of (foo). I noticed that using –prompt when creating new venv, adds a setting in pyvenv.cfg: prompt = ‘cheese’ However, this setting seems to be completely useless, because ‘cheese’ gets hardcoded in the activate script anyway. I was disappointed to find out that changing prompt setting in pyvenv.cfg followed by activate doesn’t actually use that value at all. Am I missing something? What is the prompt setting in pyvenv.cfg for then? submitted by /u/bearinthetown [link] [comments] 

Today I learned how to use custom venv prompt. We set it when creating new venv:

bash python -m venv ./foo/ --prompt=cheese

This way, we the prompt gets prefixed with (cheese) instead of (foo).

I noticed that using --prompt when creating new venv, adds a setting in pyvenv.cfg:

prompt = 'cheese'

However, this setting seems to be completely useless, because 'cheese' gets hardcoded in the activate script anyway. I was disappointed to find out that changing prompt setting in pyvenv.cfg followed by activate doesn’t actually use that value at all.

Am I missing something? What is the prompt setting in pyvenv.cfg for then?

submitted by /u/bearinthetown
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *