Your feeling is right: You shouldn't convolve the spectrum and the filter, you should only multiply so that flux outside the bandpass is suppressed. Subsequently you integrate the resulting function over wavelength, so that flux density (in energy/time/area/wavelength) becomes flux (in energy/time/area).
Simply setting the flux to 0 outside $\lambda_1$ and $\lambda_2$ (or, equivalently, just integrating from $\lambda_1$ to $\lambda_2$) corresponds to a "top-hat filter". Most realistic filters are more smooth.
So, something like (untested):
import numpy as np
from scipy.integrate import simps
lamS,spec = np.loadtxt('spectrum.dat',unpack=True) #Two columns with wavelength and flux density
lamF,filt = np.loadtxt('filter.dat' ,unpack=True) #Two columns with wavelength and response in the range [0,1]
filt_int = np.interp(lamS,lamF,filt) #Interpolate to common wavelength axis
filtSpec = filt_int * spec #Calculate throughput
flux = simps(filtSpec,lamS) #Integrate over wavelength
print 'Total flux is {0:8.3e}'.format(flux)
Magnitude
I'm wondering, however, if "the total luminosity within the bandpass" is really what you're interested in. This quantity doesn't really bear any physical significance for the source, as it depends on the particular filter. Usually, one would normalize to the filter, thus getting the magnitude, which is independent of the filter shape.
In the AB magnitude system, the magnitude $m_\mathrm{AB}$ of a source is (Oke & Gunn 1983; note that they make a sign error in their own definition):
$$
m_\mathrm{AB} = -2.5 \log f_\nu -48.6,
$$
where the average $f_\nu$ in $\mathrm{erg} \,\mathrm{s}^{-1} \,\mathrm{cm}^{-2} \,\mathrm{Hz}^{-1}$ is given by
$$
f_\nu = \frac{1}{c}\frac{\int ST\lambda\,d\lambda}{\int T / \lambda\,d\lambda},
$$
where $S$ is the spectrum with units $\mathrm{erg} \,\mathrm{s}^{-1} \,\mathrm{cm}^{-2}$ Å$^{-1}$, $T$ is the filter curve (un-normalized as above), $\lambda$ is the wavelength in Ångström, and $c$ is the speed of light in Å $\mathrm{s}^{-1}$. That is, a flat spectrum (in $\nu$) of height $f_\nu$ would have the same integrated flux over $T$ as $S$ would.
So:
import numpy as np
from scipy.integrate import simps
c_AAs = 2.99792458e18 # Speed of light in Angstrom/s
lamS,spec = np.loadtxt('spectrum.dat',unpack=True) #Two columns with wavelength (in Angstrom) and flux density (in erg/s/cm2/AA)
lamF,filt = np.loadtxt('filter.dat' ,unpack=True) #Two columns with wavelength and response in the range [0,1]
filt_int = np.interp(lamS,lamF,filt) #Interpolate to common wavelength axis
I1 = simps(S*T*lam,lam) #Denominator
I2 = simps( T/lam,lam) #Numerator
fnu = I1/I2 / c_AAs #Average flux density
mAB = -2.5*np.log10(fnu) - 48.6 #AB magnitude