1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| /usr/bin/python2.6
Python 2.6.6 (r266:84292, Sep 15 2010, 15:52:39)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Foo
>>> Foo.untruc.machin(3)
9
>>> from Foo import untruc
>>> untruc.machin(3)
9
>>> quit()
/usr/bin/python3.1
Python 3.1.2 (release31-maint, Sep 17 2010, 20:34:23)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Foo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Foo/__init__.py", line 2, in <module>
import untruc
ImportError: No module named untruc
>>> from Foo import untruc
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Foo/__init__.py", line 2, in <module>
import untruc
ImportError: No module named untruc |
Partager