[Tutor] strange errors

Alan Gauld alan.gauld at btinternet.com
Sun Feb 2 15:13:38 CET 2014


On 02/02/14 02:11, Gabriele Brambilla wrote:

> sometimes when I try to run a program in Python I obtain some errors.

How are you running the program?

doubly clicking in a file manager/explorer?
Running from an OS command line?
Importing from the Python >>> prompt?
Or using some kind of IDE? (Which?)

The answer to your question depends a lot on the way you
run the code.

A sample error and your OS and Python version will help too.

> How could I avoid this problem? I think that it is because it "remember"
> some variables that I have used...

Could be. If you import a module then change that module then
reimporting alone is not enough. But if you run the code from the OS 
that shouldn't be an issue. So how do you run the code?

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos



More information about the Tutor mailing list