Create main.py

accoding to the platform and do the right things