[Tutor] How to import modules using the input() command

Mihai Iacob aymchaos at yahoo.com
Thu Nov 15 16:25:29 CET 2007


I was wondering if there is a way to import modules
using the input() command. If i try to do it directly
it gives me an error:

>>> input()
import time

Traceback (most recent call last):
  File "<pyshell#168>", line 1, in <module>
  File "<string>", line 1
    import time
SyntaxError: invalid syntax

Is there another way in which i can import modules
with the input() command?

Never miss a thing.  Make Yahoo your home page. 

More information about the Tutor mailing list