Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python IDLE

Yosef Fastow
Yosef Fastow
18,526 Points

Using IDLE on command prompt on PC?

I tried to run python files I created on command prompt and it gives an error that idle_test.py doesn't exist. The only way I could figure out how to run the file is by doing like the lesson by directly on the IDLE file by pressing on Run ont he top and then pressing on Run Module.

So I guess what I am wondering is if it possible to run files created from IDLE either through command prompt or the python shell like we do in in the workspace by typing "python idle_test.py" or does it only work by going to the file?

1 Answer

Yosef Fastow
Yosef Fastow
18,526 Points

Don't worry I found out the problem. It is possible to use IDLE like we used it on treehouse workspace. The problem was I saved the file in Documents so I needed to type "cd ./Documents" so we are zoomed into that folder and then type "python idle_test.py"