Skip to main content

No project description provided

Project description

python-slice

Install

Install slice-bin from PyPI, which will install slice as a command line tool.

pip install slice-bin

Usage

Assuming stdin is split on a newline and put into an array, the output can be filtered by Python's slice notation.

$ seq 10
1
2
3
4
5
6
7
8
9
10
$ seq 10 | slice 3
4
$ seq 10 | slice 3:
4
5
6
7
8
9
10
$ seq 10 | slice 3:5
4
5
$ seq 10 | slice -3:
8
9
10
$ seq 10 | slice :3
1
2
3
$ seq 10 | slice :-3
1
2
3
4
5
6
7
$ seq 10 | slice ::2
1
3
5
7
9
$ seq 10 | slice ::-2
10
8
6
4
2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slice_bin-0.1.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

slice_bin-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file slice_bin-0.1.1.tar.gz.

File metadata

  • Download URL: slice_bin-0.1.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Linux/5.10.179-1-MANJARO

File hashes

Hashes for slice_bin-0.1.1.tar.gz
Algorithm Hash digest
SHA256 72f491894738bacce4335f51400b52322c248e03d528a1c77c5ed890724c818f
MD5 bb06398b329f7e0d3f1ac87e9466b9dc
BLAKE2b-256 39cfba657165b268fdb061b492f775bb8cae36c4b287d8710edf075a1369ed29

See more details on using hashes here.

File details

Details for the file slice_bin-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: slice_bin-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.0 CPython/3.10.10 Linux/5.10.179-1-MANJARO

File hashes

Hashes for slice_bin-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 93d0569d5f91a2d7a53282254ee8cf3372d800a6c4b5d7fbcad4bb6f2d576c8d
MD5 4594f5d0d4b226d7f1175e25cd6a7c57
BLAKE2b-256 4eac7bb7b8c940c963e22d75658fa36afe3f06d9f2d95514c1ac82c99c281435

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page