Seite 1 von 1

Ausgabe in IDLE und bash Konsole

Verfasst: Sonntag 29. März 2015, 14:56
von wattwurm
Hallo,
wieso unterscheiden sich die Ausgaben?

Idle:
Ich verschiebe:) /home/thomas/script/pytest/BlackSabbath_Best_off CD1
Ich verschiebe:) /home/thomas/script/pytest/BlackSabbath_Best_off CD2
Bash:
('Ich verschiebe:)', '/home/thomas/script/pytest/BlackSabbath_Best_off', 'CD1')
('Ich verschiebe:)', '/home/thomas/script/pytest/BlackSabbath_Best_off', 'CD2')
Man beachte die Klammern, KOmmas und die Single Quotes
rwxr--r-- 1 thomas thomas 1123 Mär 29 12:37 dateiendung.py

Code: Alles auswählen

def verschieben():
    print('Ich verschiebe:)', os.path.dirname(alt), os.path.basename(alt))
    ##shutil.move(alt, neu)
:K
Gruß
wattwurm

Re: Ausgabe in IDLE und bash Konsole

Verfasst: Sonntag 29. März 2015, 15:00
von BlackJack
@wattwurm: Weil Du von der Konsole aus anscheinend Python 2 verwendest um für Python 3 geschriebenen Quelltext auszuführen.

Re: Ausgabe in IDLE und bash Konsole

Verfasst: Sonntag 29. März 2015, 15:12
von wattwurm
argh, hashtag angepasst :roll:
jetzt geht es. Danke!