Silly (maybe) question re imported module(s)

Alan Gauld learn2program at gmail.com
Fri May 19 07:25:01 EDT 2023


On 19/05/2023 07:44, Grizzy Adams via Python-list wrote:

> when typed in console or editor and run with F5 (which saves before it can run) 
> 
> But sometimes saved work (albeit small) when imported does not work any longer

Looks like you are using IDLE? If so, it's possible that in the original
case you had some values set from a previous run that were picked up but
when you reimport later those values are missing. It would help if you
can post any error messages since they should give clues(like name
errors for example).

Also describe how you are "importing" the modules. are you typing

>>> import mymodule

at the interactive prompt or are you using the File->Open menu
to load them into the editor? (It sounds like the latter)

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Python-list mailing list