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

Cyrus Rezaei
Cyrus Rezaei
504 Points

How to Quickly Open Files in Workspaces?

Hello,

I am currently on the learning python course. When I am in workspaces, I waste quite a lot of time typing in the shell e.g. python ShoppingList.py each time I want to run my program. I try copying and pasting this into the shelll but does not work. Is there a hotkey/shortcut to run the program again?

1 Answer

Ryan S
Ryan S
27,276 Points

Hi Cyrus,

If you press the up arrow on your keyboard, you can access previous commands that you have run in the console. It will keep track of your history of commands in the current session. But as soon as you close the workspace, your history will be cleared.

But there is a way to copy and paste if you really need to, and that is by right-clicking with the mouse in the console to bring up a standard context menu. You can't use ctrl-c or ctrl-v in the console.

Hope this helps.

Cyrus Rezaei
Cyrus Rezaei
504 Points

Hi Ryan,

This really helps, thank you.