This code calculates the characteristic impedance of transmission lines of specified cross section, by calculating the electric potential through relaxation on a grid. You'll need to be able to run blitz from scipy.weave.
Here is an example of what it can do.