- Select the lines you want to comment and press:
- Windows:
Ctrl + / - Mac:
Command + /
- Windows:
-
TAB - autocompletes commands, file names, or directory names for you.
-
UP/DOWN Arrows - Scroll backward and forwards through previous commands you’ve typed in the current session.
-
CTRL + C - Abort the current line you’re typing or a command that is currently executing.
First, make sure you are using the Shell 🐚 (not the console).
While using the bash Shell, navigate the folders using the command-line and make sure you are in the same folder as the files you want to access. Ex: In order to access exercises_1.py, you have to be in intro-to-python/session_01.
Here are some CLI commands to help you out:
pwd # Prints to the console the path of your current working directory
ls # Lists the files in the directory you are in
cd <directory_name> # Gets in a given directory
cd .. # Gets out of the directory you are in
- Make sure that you are using the Shell 🐚.
- Verify that you are in the folder containing the file you want to run. You can use
pwdto check the current folder andlsto see the files in the current folder. - Run
python <file_name.py>(ex:python exercises_1.py).
When you are done for the day, don't forget to commit and push your work using the git commands:
git add . # Adds ALL changes to the staging area in preparation for committing them to the repository.
git commit -m "<Short description of what you have worked on.>" # Saves changes to the local repository, along with your commit message, usually describing the changes.
git push origin main # Uploads local changes to your remote repository, on the main branch.