Convert DOT or GDL graph to distance matrix

I am new in python and I found graph-tool interesting. I want to convert DOT
or GDL graph to distance matrix. Is it possible in graph-tool? If yes, could
u help me how can do that?