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 trialFred Sites
11,151 PointsWorkspaces wont indent?
Anyone else having this issue in the workspaces console? Trying to go through this exercise and workspaces refuses to indent, causing an error.
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsIn workspace, you can set the default indent amount in the lower right corner of the editor window. It should say something like:
Python Spaces 4
Adjust it by clicking on the number or "Spaces" to change to "Tab" (but don't because spaces are preferred!)
What does yours say?
Fred Sites
11,151 PointsFred Sites
11,151 PointsMine says spaces 2, however this seems to only apply to the script, not the console.
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsThe console is like the regular shell, there is no auto indent in the shell when running python interactively. There is an improved interactive python called
ipython
, but it is not installed. You can install it using:Fred Sites
11,151 PointsFred Sites
11,151 PointsGotcha, I thought there would be no indent in console but confused as he seemed to indent no problem in the video. I figured it'd be built in for ease of use/following along as there is no mention of it in the video. I guess he was just spacing. Thanks Chris!