CS149 Python Setup¶
The purpose of this document is to walk you through the process of setting up your computer for Python development and code submission in CS 149.
Downloading and Installing Thonny
The officially supported Integrated Development Environment (IDE) for this semester will be Thonny.
Download and run the appropriate installer for your operating system from https://thonny.org/. You should accept all of the default options during installation.
Revealing File Extensions
When naming files, there is a longstanding convention of using file extensions to indicate the type of information that the file contains. For example, a Windows executable might be named installer.exe
, while a Word document might be named FinalReport.docx
. In this case .exe
and .docx
are the file extensions indicating the file types.
In the good old days, these file exertions were visible by default, and they were often helpful in figuring out file types. Unfortunately, file extensions could also be confusing and intimidating for non-technical users. For example, .avi
, .mp4
, .mpg
, .divx
, .mov
(among many others) are all file extensions that represent different kinds of video files. Understanding the differences between them is crucial to someone involved in video production, but irrelevant to someone who just wants to watch the video. In the interest of not confusing people, modern operating systems generally hide file extensions by default.
Now that you are a computer scientist, you have become the kind of person who needs to pay attention to file extensions. Congratulation! This means that you should modify the settings on your computer to show file extensions by default. Follow the instructions in the following links to change the appropriate settings on your computer:
- Windows: https://fileinfo.com/help/windows_10_show_file_extensions
- OSX: https://www.howtogeek.com/714021/how-to-show-all-filename-extensions-on-the-mac/
Saving Files in Thonny and Submitting Through Gradescope
You will save yourself some trouble this semester if you get into the habit of organizing your Python files into folders organized by assignment. I suggest creating a top-level folder named CS149
that you can use to store each individual assignment folder. Watch the video below for an example of how this can be accomplished.
Ruff Python Style and virtual environment setup
Video
Watch this short video for a demonstration of the steps required to create a new Python file, store it in a reasonable location, and submit it through Gradescope.