How to compute the power bands of an eeg signal using python?
Here is some code that may solve your problem:

from scipy.io import loadmat
import scipy
import numpy as np
from pylab import *
import matplotlib.pyplot as plt

eeg = loadmat("mydata.mat");
eeg1=eeg['eeg1'][0]    
fs = eeg['fs'][0][0]
fft1 = scipy.fft(eeg1)
f = np.linspace (0,fs,len(eeg1), endpoint=False)
plt.figure(1)
plt.plot (f, abs (fft1))
plt.title ('Magnitude spectrum of the signal')
plt.xlabel ('Frequency (Hz)')
show()


You can also check this other link:

http://forrestbao.blogspot.pt/2009/10/eeg-signal-processing-in-python-and.html