Using Python from the Command Line
The Terminal
- Identify and open the terminal application on your personal computer.
- Define the following terms:
- Shell
- Command-line interface
- Graphical user interface
Navigating Your Computer via a CLI
- Make the basic analogy between your computer’s filesystem and a filing cabinet with folders.
- State a reasonable directory structure for this course.
- Use the following commands to navigate and inspect the filesystem on your computer using your terminal application:
- Recognize that
~
expands to your home directory in most shell interfaces.
- Know to avoid spaces in file and directory names, and explain why they should be avoided.
- Use
man
to access the documentation for a shell command.
IPython
- Access IPython through your terminal application.
- Use IPython interactively to run Python statements.
- Use
who
and whos
to query the environment variables in a session of IPython.
- Use
?
to access the documentation for Python functions in IPython.
Python Scripts
- Explain what a Python script is.
- Give the file extension for a Python script.
- Compare and contrast a Python script and a Jupyter notebook.
- Create a Python script on your computer and edit it using a text editor such as Sublime Text.
- Run a Python script from an IPython session.
- Recognize that you must make the directory containing a Python script your current working directory before running the script in an IPython session.
- Use
paste
to run chunks of Python code in an IPython session.
Jupyter Notebooks and JupyterLab
- Access Jupyter notebooks from your terminal application.
- Access JupyterLab from your terminal application.