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 Python Basics (2015) Shopping List App Shopping List Introduction

:Raven-Farhad-Tohidi : Afarin
:Raven-Farhad-Tohidi : Afarin
692 Points

I have not been able to launch the script in the concole(shell)

for example i have a file named print.py with a simple function of print("hello") when i run python print.py nothing happens. grateful with any tips.

andhika pratikto
andhika pratikto
995 Points

save the file first before you launch it in the console

3 Answers

Jack Harrison-Sherlock
Jack Harrison-Sherlock
6,002 Points

Hey there,

You will need to direct your terminal to the location 'print.py' is located. If you are on a Mac and your file is saved in your downloads folder. Open the terminal and enter cd downloads, this will change the directory to downloads allowing you to open the python file.

$ cd downloads
$ python print.py
Julie Egan
PLUS
Julie Egan
Courses Plus Student 703 Points

I'm having the same problem, anyone have a solution? I'm not on Mac though, using windows.

fil koczij
fil koczij
523 Points

would have to see your code.