--- pdb.py.orig 2014-02-05 22:45:40.712329816 +0100 +++ pdb.py 2014-02-05 22:46:33.612329382 +0100 @@ -165,13 +165,11 @@ class Pdb(bdb.Bdb, cmd.Cmd): # Read $HOME/.pdbrc and ./.pdbrc self.rcLines = [] - if 'HOME' in os.environ: - envHome = os.environ['HOME'] - try: - with open(os.path.join(envHome, ".pdbrc")) as rcFile: - self.rcLines.extend(rcFile) - except IOError: - pass + try: + with open(os.path.expanduser("~/.pdbrc")) as rcFile: + self.rcLines.extend(rcFile) + except IOError: + pass try: with open(".pdbrc") as rcFile: self.rcLines.extend(rcFile)