Manipulate Weather Cape data using python

Newbie here both with Python and the BeagleBone.

I would like to store BeagleBone Weather Cape data in a database and eventually setup a weatherstation with a web presence to include close to live and historical data.

First things first though.

What’s the easiest way to manipulate weather cape data using python?

For example, pressure data is located in a text file at /sys/bus/i2c/devices/i2c-1/1-0077/pressure0_input

Now I have figure out that I can read the text file with the following;

file = open(‘/sys/bus/i2c/devices/i2c-1/1-0077/pressure0_input’,‘r’)
print file.read()
101905

So what’s the easiest way to get this information into a python variable as an intenger?

Thanks!

Jason

You can install the Adafruit Python Library, they support i2c.

https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/installation-on-ubuntu