Re: [Python-de] von der command-line aus befehle der interaktiven help ausführen
Moin! Am 11.11.19 um 18:24 schrieb Patrick Frank:
von der interaktiven Hilfe kann ich ja zunächst mit "help()" und dann mit "modules" eine lange Liste mit den Namen der verfügbaren Module anfordern. Ich würde gerne (automatisiert) von jedem Modul die kurze Beschreibung abrufen und diese in einer Datei speichern.
Mit dem folgenden Befehl kam ich bisher nicht weiter:
for I in $(cat python-modules-list); do echo "python3 -c 'modules $I' > module.$I"; done > python-modules-exec
for i in string math requests ; do python3 -c "help('"$i"')" | > "module.$i" ; done So in etwa (hatte jetzt kein python-modules-list zur Hand)? Thomas -- I have seen things you lusers would not believe. I've seen Sun monitors on fire off the side of the multimedia lab. I've seen NTU lights glitter in the dark near the Mail Gate. All these things will be lost in time, like the root partition last week.
participants (1)
-
Thomas Orgelmacher