Your Own Machine, Your Own Editor
Open the Folder in an Editor
Double-clicking hello.py would open one file. Open the folder instead. The distinction is small on screen and large in practice: an editor opened on the project can show its other files, find .venv, and start a
Any plain-text code editor that can open a folder and an integrated terminal is enough. This course uses Visual Studio Code for the concrete button names because it is available on
If no suitable editor is installed and you cannot install software on this computer, continue to the final lesson’s site-only path. A managed or shared computer is not a reason to work around its policy.
Open the project, then the file
If you need the editor, download Visual Studio Code for your
In Visual Studio Code:
Choose File → Open Folder….
Select the extracted
python-land-chapter-4folder itself, nothello.py.If the editor asks whether you trust the folder, read the prompt and choose trust only for the project you just downloaded from Python Land.
Select
hello.pyin the file. Choose Terminal → New Terminal.
The terminal panel should open at the project folder. Ask it instead of assuming:
pwd
The final path segment should be python-land-chapter-4.
Make sure the terminal’s profile says PowerShell, then run:
pwd
Here pwd is PowerShell’s alias for Get-Location, the same short orientation command used in Chapter 2. PowerShell may format a Path property, but the path itself should end in python-land-chapter-4.
pwd
The final path segment should be python-land-chapter-4.
If the path ends in Downloads or another parent directory, close that terminal and reopen the folder with File → Open Folder…. Do not compensate with a long
The editor and terminal now look at the same folder. The next lesson gives that folder its replaceable Python environment.
Why open the folder rather than double-clicking hello.py?
Your editor terminal reports a path ending in Downloads. What should you do?