I am trying to program the create2 irobot using python. there is a script called openinterface.py. where can I download this script?
It looks like openinterface.py itself is not easily found anymore, but you can probably use instead pyrobot, which is based on openinterface.py. Pyrobot is an interface for Roomba and Create 1, not Create 2, but it should be easy to adapt it to work with the Create 2. The default baud rate needs to be changed from 57600 to 115200, and there are a few functions/sensors that are different between Create 1 and Create 2. The differences are listed on the last page of the Create 2 Open Interface Specification.
Apart from pyrobot, there are several Python wrappers for the Create 1 that you could look into, namely Brian Bingham's Pici, Rose-Hulman Institute of Technology's pyCreate, and Brown's pyCreate (in brown-ros-pkg).
Update: I have since modified the PyRobot code to work with the Create 2, and made it available for download under the name PyRobot 2. This is part of a project called MICbots using mobile robots for audio data collection.