Spectrum_sense code for USRP2

Hello everyone,
Recently I am trying to use spectrum_sense.py on USRP2, but this is
designed
for USRP1 and can not work on USRP2.
Are there any body could provide me with some information about how to
modify that code?

Best,
Sheng