Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
#!/usr/bin/python
import sys
#try leiten einen Block ein, der Ausnahmen/ Fehler abfängt
try:
#Dateiname wird als Parameter dem Programmaufruf uebergeben
filename=sys.argv[1]
# Oeffnet die Datei lesend
f = open( filename, 'rU')
# Erzeugte eine Liste a mit allen Zeilen der Datei
a = f.readlines()
# Datei schliessen
f.close()
# Ausnahmenbehandlung
except OSError, e:
print "Input file could not be opened",e
#Test ob letzte Zeile leer
if len(a[-1].strip()) == 0 :
#Letzte Zeile aus der Liste loeschen
a.pop()
#Ausgaben der Zeilen in die urspruengliche Datei
try:
f=open(filename,'wB')
f.write("".join(a))
f.close
except OSError, e:
print "Output file could not be opened",e