def open_email(email): if platform == "macosx": subprocess.Popen(['open', "mailto:" + email]) elif platform == 'win': os.startfile("mailto:" + email) elif platform == "linux": subprocess.Popen(['xdg-open', "mailto:" + email]) elif platform == "android": android.open_url("mailto:" + email)
def open_url(url): if platform == "macosx": subprocess.Popen(['open', url]) elif platform == 'win': os.startfile(url) elif platform == "linux": subprocess.Popen(['xdg-open', url]) elif platform == "android": android.open_url(url)
def show_3dprinter_survey(self, *args): url = "http://surveys.peerproduction.net/2012/05/manufacturing-in-motion/" if platform == "android": import android android.open_url(url) elif platform == "linux": subprocess.Popen(["xdg-open", url]) elif platform == "win": os.startfile(url) elif platform == "mac": subprocess.Popen(["open", url])
def donate(self): # Stisk tlačítka podpořit vývojáře # Na Androidu otevře webový prohlížeč s URL # Na jiných platformách vytiskne odkaz do konzole if self.root.Cfg[0] == "cs": lc = "CZ" cur = "CZK" else: lc = "US" cur = "USD" if self.root.onAndroid(): android.open_url("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6XKAJN3DGBGUW&lc={0}&item_name=Mobile%20TetriNET¤cy_code={1}&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted".format(lc, cur)) print "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6XKAJN3DGBGUW&lc={0}&item_name=Mobile%20TetriNET¤cy_code={1}&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted".format(lc, cur)
def donate(self): # Stisk tlačítka podpořit vývojáře # Na Androidu otevře webový prohlížeč s URL # Na jiných platformách vytiskne odkaz do konzole if self.root.Cfg[0] == "cs": lc = "CZ" cur = "CZK" else: lc = "US" cur = "USD" if self.root.onAndroid(): android.open_url( "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6XKAJN3DGBGUW&lc={0}&item_name=Mobile%20TetriNET¤cy_code={1}&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted" .format(lc, cur)) print "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=6XKAJN3DGBGUW&lc={0}&item_name=Mobile%20TetriNET¤cy_code={1}&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted".format( lc, cur)
def view(self, url): from android import open_url open_url(url)