PyCon intro to open source/Linux text editor: Difference between revisions

From OpenHatch wiki
Content added Content deleted
imported>Jesstess
No edit summary
imported>Jesstess
No edit summary
 
Line 30: Line 30:
== Success! ==
== Success! ==


Now you have an editor that you can use to open any text file, including Python programs.
If you prefer a different editor for text, check with an instructor before moving on to make sure it will work for the weekend.


[[File:Champagne.png|100px]][[File:Party.png|125px]]
[[PyCon intro tutorial prep|« Back to the main prep page]]

[[PyCon_intro_to_open_source|« Back to the main page]]

Latest revision as of 23:15, 9 April 2014


Lucky for us, Linux comes with a good, free text editor called GEdit.

Finding GEdit

To start GEdit: click Applications, point to Accessories, and click Text Editor. If you don't have this option, let a staff member know.

How to find GEdit from a terminal

If you prefer to start applications from a terminal, you can type the following into a terminal to launch GEdit:

gedit

Configure gedit to indent with spaces

  • Click Edit -> Preferences
  • Select the tab labeled "Editor"
  • In the "Tab width" field, set it to 4 (the default is 8)
  • Check the box labeled "Insert spaces instead of tabs"
  • Check the box labeled "Enable automatic indentation"
  • Click Close.

That's it! Now, you can hit tab to indent your code, and that indentation will actually be made of spaces. This change will help you use spaces consistently, so that Python doesn't get confused about whitespace.

Success!

Now you have an editor that you can use to open any text file, including Python programs.

« Back to the main page