ich bin Neuling in dieser Programmiersprache. Für ein Linux-System möchte ich ein Pythoncode erstellen. Dabei möchte ich ein externes Programm aufrufen. Ich habe dazu einen komplexen Aufruf, den ich in Python ausführen möchte. Das Kommando habe ich unter Ubuntu getestet und bringt das gewünschte Ergebnis.
Kommando: wget -nv 'http://download.osmand.net/rawindexes/' -O - | grep -oE 'file=Austria_burgenland_europe_2.obf.zip' | cut -c6- | xargs -I{} wget 'http://download.osmand.net/download.php ... =yes&file={}' -O {}
Dieses habe ich versucht wie folgt umzusetzen:
Code: Alles auswählen
#! /usr/bin/env python
import os
test="wget -nv 'http://download.osmand.net/rawindexes/' -O - | grep -oE 'file=Austria_burgenland_europe_2.obf.zip' | cut -c6- | xargs -I{} wget 'http://download.osmand.net/download.php?standard=yes&file={}' -O {}"
os.system(test)
Wer kann mir weiterhelfen? Für Spezies sicher eine Kleinigkeit.
Gruß Codo