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 trialRenee Zona
Courses Plus Student 3,855 Pointscontrol D is not working to drop out of the shell in the python workspace. So hence I can not clear the console...
Python basics course-Input and coding style video- 3:03 time- The teacher says he presses Control D to "drop out of the shell" so that he can follow that up with typing "clear" to clear the console. Whenever I hit ctrl D it doesn't work. So there's no way for me to easily clear the console in the treehouse workspace. I have to close and open it every time. Does anyone know what's going on? I use a mac- have tried all the keyboard shortcuts listed in discussions about "clearing the console". Nothing works. Thanks
Renee Zona
Courses Plus Student 3,855 PointsYes, these are different buttons. I'm hitting the button on the keyboard that says CTRL, while at the same time hitting the button that says "D".
Michael Hulet
47,913 PointsHmm, ok. What happens when you hit a different command like Control+C or Control+Z?
3 Answers
Renee Zona
Courses Plus Student 3,855 PointsIt might be a keyboard issue. I just tried out an old keyboard I had in storage and with this old keyboard the shortcuts are working. Go figure! I hate this old keyboard but it lets me use CTRL D and CTRL L to clear. So I guess my issue is solved for the time being. Thanks :) side note .... the shortcuts work in other programs with my original newer keyboard. They just wouldn't work in this treehouse workspace. It's a mystery to me!
TEDI YUDI PERMADI
3,051 Pointsfirst point your cursor to the line you want to delete then try CTRL+Shift+D (linux) .I believe windows use CTRL+D.
Rouillie Wilkerson
10,419 PointsSeveral Q & A's/issues:
"Control D doesn't work": Sometimes it's best to just "x" out or close and reopen the console. To know the proper delete button, check the "edit" drop-down menu, as the class instructor is using a Mac, as you are. I believe that's command + D.
"...control D is not working...I can not clear the console": Plus, "control + D" is a means to exit the terminal. Whereas, "clear" just clears the console.
Note:
- I find that learning to code sometimes works better in some browsers over others. Google is a good one.
- Check and double check your error messages. What is it telling you is wrong?
- Check and double your syntax: correctly spelled (e.g. camel case, snake case, etc...)
PS: Please show your code next time so we know what we're working with.
Keep at it! I hope you figured it out!
Michael Hulet
47,913 PointsMichael Hulet
47,913 PointsAre you sure you're using Control and not Command?