Die Suche ergab 487 Treffer
- Donnerstag 20. Mai 2010, 21:26
- Forum: Showcase
- Thema: Uptime-GUI
- Antworten: 7
- Zugriffe: 1776
Uptime-GUI
Hallo, ich habe eine GUI für »uptime« programmiert. Damit sieht man wie lange der Rechner schon an ist. Das GUI-Toolkit ist Qt. Damit es funktioniert muss man eine Linux-Distribution benutzen (und uptime installiert haben, kann man testen indem man "uptime" [ohne Anführungszeichen] in ein ...
- Mittwoch 19. Mai 2010, 20:22
- Forum: Allgemeine Fragen
- Thema: \n und \t ersetzen
- Antworten: 12
- Zugriffe: 3414
Re: \n und \t ersetzen
@b.esser-wisser:
In Python 3 gibt es gar kein str.decode()
@Twilo:
Es funktioniert nicht weil es str.decode() in Python 3 nicht gibt.
/edit: Übrigens muss bei Python 3 »print« wie eine Funktion aufgerufen werden.
Beispiel:
In Python 3 gibt es gar kein str.decode()
@Twilo:
Es funktioniert nicht weil es str.decode() in Python 3 nicht gibt.
/edit: Übrigens muss bei Python 3 »print« wie eine Funktion aufgerufen werden.
Beispiel:
Code: Alles auswählen
print("Hallo Welt!")
- Mittwoch 19. Mai 2010, 19:06
- Forum: Qt/KDE
- Thema: Unvollständiges QLabel
- Antworten: 3
- Zugriffe: 1053
Re: Unvollständiges QLabel
Vielen vielen Dank DaMutz!
Jetzt funktioniert es. Ich frage mich wieso?
Jetzt funktioniert es. Ich frage mich wieso?
- Mittwoch 19. Mai 2010, 18:52
- Forum: Allgemeine Fragen
- Thema: return anweisung für dumme!!
- Antworten: 9
- Zugriffe: 16441
Re: return anweisung für dumme!!
Ja, du kannst es so machen.
Viele Grüße,
Jakob.
Viele Grüße,
Jakob.
- Mittwoch 19. Mai 2010, 18:12
- Forum: Qt/KDE
- Thema: Unvollständiges QLabel
- Antworten: 3
- Zugriffe: 1053
Unvollständiges QLabel
Hallo, ich schreibe gerade ein Programm, womit man die Zeit wie lange der Rechner schon an ist ermittelt. Es sieht so aus: #!/usr/bin/env python # -*- coding: utf-8 -*- # This program is free software. It comes without any warranty, to # the extent permitted by applicable law. You can redistribute i...
- Mittwoch 19. Mai 2010, 18:02
- Forum: Allgemeine Fragen
- Thema: return anweisung für dumme!!
- Antworten: 9
- Zugriffe: 16441
Re: return anweisung für dumme!!
Hier noch mal ein Code-Beispiel: #!/usr/bin/env python def subtraktion(minuend, subtrahend): # Eine Funktion mit den Parametern minuend und subtrahend definieren return minuend - subtrahend # Die Differenz von minuend und subtrahend an den Funktionsaufruf geben print subtraktion(12, 3) # Das Ergebni...
- Mittwoch 19. Mai 2010, 17:37
- Forum: Allgemeine Fragen
- Thema: return anweisung für dumme!!
- Antworten: 9
- Zugriffe: 16441
Re: return anweisung für dumme!!
Hallo 19simon96, die Funktion »return« dient dazu, dass bei Funktionen ein Wert zurückgegeben wird. Zum Beispiel bei diesem Programm: #!/usr/bin/env python def addieren(summand1, summand2): return summand1 + summand2 print addieren(12, 32) Da wird bei der Funktion »addieren« das Ergebnis von summand...