I have a database with table pins with atributes pinNo, pinMode and pinState. I'm trying to read these raspberry pi's atributes using wiringPi in python script, and to write that data into the table in the database. I'm wondering how can I read/get pin mode? I've been searching over the internet and reading wiringPi's documentation but I haven't found any method implemented for this purpose. Is there any way to do this "manually" using python?