classification
Title: global .pdbrc on windows 7 not reachable out of the box
Type: enhancement Stage: patch review
Components: Library (Lib), Windows Versions: Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, mbyt, steve.dower, tim.golden, wiggin15, zach.ware
Priority: normal Keywords: patch

Created on 2014-02-05 21:57 by mbyt, last changed 2019-02-14 10:42 by matrixise.

Files
File name Uploaded Description Edit
pdb.diff mbyt, 2014-02-05 21:57 pdb diff
Pull Requests
URL Status Linked Edit
PR 11846 closed python-dev, 2019-02-13 22:02
PR 11847 open python-dev, 2019-02-13 22:11
PR 11855 closed matrixise, 2019-02-14 10:42
Messages (3)
msg210349 - (view) Author: (mbyt) Date: 2014-02-05 21:57
The global .pdbrc file is determined by the %HOME% environment variable. However, this is not available out of the box on e.g. windows 7 systems. Here only %HOMEDRIVE% and %HOMEPATH% are defined.

Thus the usual approach to have a global .pdbrc file on windows is to define a %HOME% environment variable by hand. This could be avoided if the global .pdbrc would be determined by os.path.expanduser("~/.pdbrc"), which works on current windows and does the magic behind.

There are two possible approaches to improve this situation:
* explicitly mention in the docs that on windows a %HOME% varialbe need to be created manually
* patch pdb.py to use os.path.expanduser instead (see attached diff)

For reference, see also old discussion https://mail.python.org/pipermail/python-list/2005-October/349550.html.
msg235815 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2015-02-12 12:00
We have a patch to review or we need a doc patch, unless someone has a different idea to the approaches suggested by the originator.  I prefer the idea of changing the code, manually changing environment variables just seems wrong to me, but I won't lose any sleep over it.
msg235900 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2015-02-13 16:14
expanduser() sounds like the better choice here.
History
Date User Action Args
2019-02-14 10:42:17matrixisesetpull_requests: + pull_request11887
2019-02-14 10:10:51BreamoreBoysetnosy: - BreamoreBoy
2019-02-13 22:11:40python-devsetpull_requests: + pull_request11878
2019-02-13 22:02:35python-devsetstage: patch review
pull_requests: + pull_request11877
2015-08-18 20:38:58wiggin15setnosy: + wiggin15
2015-02-13 16:14:05steve.dowersetmessages: + msg235900
2015-02-12 12:00:07BreamoreBoysetversions: + Python 3.5
nosy: + tim.golden, BreamoreBoy, zach.ware, steve.dower

messages: + msg235815

components: + Library (Lib), Windows
2014-02-05 22:26:46ned.deilysetnosy: + georg.brandl
2014-02-05 21:57:33mbytcreate