Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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.