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 Meet Python The Python Shell

console wont run code even though no syntax errors. Next line just says. treehouse:~/workspace$ python hell

console worked previously when practicing print function, variables and would print code logged back in and when i try to print code next line just says. treehouse:~/workspace$ python hello.py

3 Answers

Hi there majak lual! Are you still in the shell or have you left the shell and are trying to run a file?

If you are trying to run a python file, you need to make sure that you are out of the python shell. You'll know if you are in the shell because you'll see >>>. You can escape the shell by typing exit(). If you want to get back in the shell you can type python.

try typing treehouse:~/workspace$ python shell

Don't forget to save the written code with ctrl + s