Use Python interface to get much faster fps.

Fixed an error