Python Script for data acquisition