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.

Author lesmana
Recipients eric.araujo, lesmana
Date 2010-06-06.23:18:18
SpamBayes Score 0.00017581844
Marked as misclassified No
Message-id <1275866300.59.0.0929781367116.issue8919@psf.upfronthosting.co.za>
In-reply-to
Content
the .pythonrc.py file is not deprecated. only the user module is deprecated.

the problem i have with the PYTHONSTARTUP variable is that i find it is an unecessary intermediate step to set up an initialization file.

let me elaborate: every single time you want to use PYTHONSTARTUP in any meaningfull way you will ALSO have to set up the corresponding file somehwere. it makes no sense to set up PYTHONSTARTUP without the file. it also makes no sense to set up the file without PYTHONSTARTUP. so PYTHONSTARTUP needs the file and the file needs PYTHONSTARTUP.

that means the variable PYTHONSTARTUP has no added value. it is just an extra step, an extra source of error and possibly confusion. that is why i suggest to skip the variable and just load the file directly.

if you (or anyone else) can point out a use case which can be done with PYTHONSTARTUP but cannot be done with my suggested method, or a use case where using PYTHONSTARTUP is so much simpler than using my suggested method, then i say mark this as wontfix. i was not able to think of such a use case, but i might be missing something.

there is the argument that PYTHONSTARTUP allows the flexibility to point to files with other names. that can be easily achieved by setting up an alias in .bashrc (or respective initialization file for your favorite shell) like this: alias python="python --rcfile somefile". alternatively you can symlink .pythonrc.py to somefile.

the effort to set up such an alias or symlink is the same as setting up an environment variable. everyone else who is happy with the default name (the majority in my opinion) will have one step less to set up.

about the name .pythonrc.py: looking around the web i have the impression that many people set their PYTHONSTARTUP variable to point to .pythonrc.py. i think this is because they used to have the .pythonrc.py file loaded by the module user. after they saw that the module user is beeing deprecated they just point PYTHONSTARTUP to that file. other than that i find the name .pythonrc.py is a fitting name for an initialization file.

about the other tools you mentioned. i checked some of them and some other tools which use environment variables. they almost never use the variables to just dully point to a file, exceptions are variables which point to a resource shared with many other tools (the temp directory for example).
History
Date User Action Args
2010-06-06 23:18:21lesmanasetrecipients: + lesmana, eric.araujo
2010-06-06 23:18:20lesmanasetmessageid: <1275866300.59.0.0929781367116.issue8919@psf.upfronthosting.co.za>
2010-06-06 23:18:18lesmanalinkissue8919 messages
2010-06-06 23:18:18lesmanacreate