Here is one way:
hendry@sam:/usr/lib/python2.2/site-packages$ dpkg -S optparse.py
But that utility dlocate is faster.