well i dont know if a python lib exists or not
but there exists some pdbdumpers made by various people
notable among them are
andrew-de-quincyes pdbdump in sourceforge(has a c++ wrapper to the com interface of dia sdk )
matt-pietreks debughelpdemo in wheaty.net (comes with source as well as a precompiled binary)
apart from that there are other utilities like
w2k_pdbx (pdb exploder by sven b schreiber)
clive turveys (sourcer authour) toys.exe
and you can also take a took at oleg-starodumovs
debuginfo.com (has some utilities that deal with pdb files)
Do you want to actually parse the PDB files, or just wrap the DbgHelp API for loading them? The PDB file format is undocumented and I don't know of any tools that actaully use it directly. You should talk to Luis, he was doing some work on reverse engineering PDB files.
I know Luis had his own reasons for reversing the actual format and making a DbgHelp-independent parser, but personally, I'd still recommend using DIA or DbgHelp and writing a wrapper around it. *Nothing* stops MS from releasing a completely different PDB format in Orcas, which you'd have to re-code for. Also, PDBs have slightly changed in each version, so you'll have to handle the logic manually. If you use DIA, you get documented and powerful routines, and a guarantee they'll keep working. Of course, the problem is DIA only comes with MSVC 2003/2005, which does kind of suck... And DbgHelp itself doesn't have all the features so neatly exposed.
I only have experience with DbgHelp. What is the benefit of using DIA instead? Does it offer access to more symbol information than DbgHelp? Is it updated more often?
Note: Registration is required to post to the forums.