This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: PYTHONSTARTUP should expand "~"
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: eric.araujo, flox, lesmana
Priority: normal Keywords:

Created on 2010-06-06 18:02 by lesmana, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (4)
msg107198 - (view) Author: lesmana (lesmana) Date: 2010-06-06 18:02
for example, this should be legal:
PYTHONSTARTUP="~/.pythonrc.py"

workaround (in bash)
PYTHONSTARTUP=$(echo ~)"/.pythonrc.py"
msg107207 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-06-06 18:52
Here it works with :
PYTHONSTARTUP="$HOME/.pythonrc" ./python
msg107241 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-06-06 22:09
The shell does not interpret tildes in quotes, but it does interpret variables, so both your examples make sense. Does removing the quotes fix your problem?
msg107252 - (view) Author: lesmana (lesmana) Date: 2010-06-06 23:32
yes the quotes prevented the tilde to be expanded by the shell. somehow i failed to check that. i also failed to check that there is $HOME. somehow i failed to see the forest because of the many trees (a german saying).

technically my original description is still a valid bug report (or feature request). but i understand that it wont be fixed.
History
Date User Action Args
2022-04-11 14:57:01adminsetgithub: 53166
2010-07-31 12:10:58floxsetstatus: open -> closed
2010-06-06 23:32:09lesmanasetmessages: + msg107252
2010-06-06 22:09:11eric.araujosetstatus: pending -> open
nosy: + eric.araujo
messages: + msg107241

2010-06-06 18:52:54floxsetstatus: open -> pending

components: + Interpreter Core
versions: + Python 2.7
nosy: + flox

messages: + msg107207
resolution: wont fix
stage: resolved
2010-06-06 18:02:44lesmanacreate