I have re-written the codes given in Trefethen's Spectral Methods in Matlab using python. You can find them in the following links as ipython notebooks.
If you have any suggestions to improve them or find a mistake, then I would like to hear.
A similar project is another-chebpy. Some of the following code is borrowed from another-chebpy. To get all the files, do
$ git clone https://github.com/cpraveen/chebpy
You can also read the code on github.