We calculate a two-pion wave function for the I=2 $S$-wave two-pion system with a finite scattering momentum and estimate the interaction range between two pions, which allows us to examine the validity of a necessary condition for the finite size formula presented by Rummukainen and Gottlieb. We work in the quenched approximation employing the plaquette gauge action for gluons and the improved Wilson action for quarks at $1/a=1.63 {rm GeV}$ on $32^3times 120$ lattice. The quark masses are chosen to give $m_pi = 0.420$, 0.488 and $0.587 {rm GeV}$. We find that the energy dependence of the interaction range is small and the necessary condition is satisfied for our range of the quark mass and the scattering momentum, $k le 0.16 {rm GeV}$. We also find that the scattering phase shift can be obtained with a smaller statistical error from the two-pion wave function than from the two-pion time correlator.