ImportError: No module named multipli
yahya Kacem
fuj.tyoli at gmail.com
Sun Mar 24 19:06:53 EDT 2013
On Sunday, March 24, 2013 4:35:29 PM UTC+1, yahya Kacem wrote:
> Hi, i have this 2 files:
>
>
>
> file named multipli:
>
>
>
> #!/usr/bin/python3.2
>
> #-* - coding : utf-8 -*
>
> def table(nb, max):
>
> i = 0
>
> while i < max:
>
> print(i + 1, " * ", nb, "= ", (i + 1) * nb)
>
>
>
> and file naled test:
>
>
>
> #!/usr/bin/python3.2
>
> # -* - coding : utf-8 -*
>
> import os
>
> import sys
>
> from multipli import table
>
> table(3, 20)
>
> os.system("pause")
>
>
>
> when i run this:
>
>
>
> python3 test
>
>
>
> I get this error:
>
> Traceback (most recent call last):
>
> File "test", line 5, in <module>
>
> from multipli import table
>
> ImportError: No module named multipli
>
> both files are in the same directory.
>
> any help thanks in advance.
Hi, after fixing the infinite loop, there was a missing line in my first post inside the while loop I accidentally deleted this line:
i += 1;
Sorry for that.
adding the .py to the file name (the one to import) did fix the problem, thanks for the help.
More information about the Python-list
mailing list