How to locate a previously saved module

Hi there!

I created a script in IDLE and saved it in my desktop folder.Now when I try to recall it my import command.It gives me this error. I don’t know where should we save it and my teacher hasn’t taught us to change directory as well. So I’m lost Kindly guide me through this.

Try import Cicle

I see you are using python version 2. That is no longer support.
Recommend that you use python version 3.

What does this mean?

Exactly what should happen, if you succeed with this?

What is in the script, and what meaning should it have?

Did that but it says module not found

I’m using IDLE for beginners purpose from Arc GIS

Like I saved the module and then close the software and try to access it again from python prompt using import command but it says no module found cause I think it can’t locate it.
Module = script. I’m just using MATLAB terminology here :sweat_smile:

You appear to have saved and run Cicle.py then you imported Circle.

If you get the name right, it will work.

But the program has already run for you, so importing it as a module will do very little that hasn’t already happened. Given hello.py containing:

print "Hello"

After running (with F5 say), you should get:

Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> 
================ RESTART: C:\Users\...\hello.py ================
Hello
>>> import hello
Hello
>>> 

The first bit worked for you, but you have misspelled the module (either when saving or importing, depending on your point of view).

2 Likes

Ahhh!!! At last last…it happened. Thank you so much :blush: