- #1
- 3,766
- 297
I have installed Python in a Windows environment and I want to load files to execute them in Python.
I have tried
"import testprogram.py"
and it does load the program and executes it (all the program does is to print something out on the screen) but then there are error messages:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import testprogram.py
ImportError: No module named py
Why is there an error message? is there another way to load and execute a program?
Also, how do I get to execute the program a second time? I cannot get it to execute a second time!
Thanks
I have tried
"import testprogram.py"
and it does load the program and executes it (all the program does is to print something out on the screen) but then there are error messages:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in -toplevel-
import testprogram.py
ImportError: No module named py
Why is there an error message? is there another way to load and execute a program?
Also, how do I get to execute the program a second time? I cannot get it to execute a second time!
Thanks