Skip to content

London | 26-SDC-July | Kris Oldrini | Sprint 4 | Python Shell Tools - #665

Open
XiaoQuark wants to merge 4 commits into
CodeYourFuture:mainfrom
XiaoQuark:python-shell-tools
Open

London | 26-SDC-July | Kris Oldrini | Sprint 4 | Python Shell Tools#665
XiaoQuark wants to merge 4 commits into
CodeYourFuture:mainfrom
XiaoQuark:python-shell-tools

Conversation

@XiaoQuark

@XiaoQuark XiaoQuark commented Aug 21, 2026

Copy link
Copy Markdown

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Implemented Python versions of the cat, ls, and wc command-line tools.

  • cat supports -n / --number and -b / --number-nonblank.
  • ls supports -1 / --format and -a / --all, as well as files, directories, and multiple paths.
  • wc supports -l / --lines, -w / --words, and -c / --bytes, including multiple files and totals.
  • Tested the implementations against the equivalent shell commands.

@github-actions

This comment has been minimized.

@XiaoQuark XiaoQuark added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026
@XiaoQuark XiaoQuark added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 21, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work on these tasks, I have a question about one of them that indicates you could simplify the structure of the code.

with open(path, "r") as file:
lines = file.readlines()

if args.number_nonblank:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given basically the same method call is used here, is there a reason for checking if args.number_nonblank here, then passing a parameter, then having another if; instead of checking this arg directly in the number_lines function?

@LonMcGregor LonMcGregor added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants