Différence idle et terminal
Bonjour,
je suis sous ubuntu 7.04
Newbie sous Python , j'ai pris comme ide IDLE
et j'ai déjà un problème de syntaxe
Pq? ceci passe dans un terminal
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
oneall@oneall-desktop:~$ python
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = 0
>>> if a > 0 :
... print " a est positif "
... elif a < 0 :
... print " a est négatif "
... else:
... print " a est nul "
...
a est nul
>>> |
Dans idle non
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
Type "copyright", "credits" or "license()" for more information.
****************************************************************
Personal firewall software may warn about the connection IDLE
makes to its subprocess using this computer's internal loopback
interface. This connection is not visible on any external
interface and no data is sent to or received from the Internet.
****************************************************************
IDLE 1.2.1 ==== No Subprocess ====
>>> a = 0
>>> if a > 0 :
print " a est positif "
elif a < 0 :
File "<pyshell#3>", line 3
elif a < 0 :
^
IndentationError: unindent does not match any outer indentation level
>>> |
une idée merci