Skip to main content

listwalker

A tool for traversing multi-dimensional lists in Python.

Installation

pip install --upgrade listwalker

Examples

from listwalker import ListWalker2D

walker2D = ListWalker2D[int]([
	[1, 2, 3, 4, 5],
	[6, 7, 8, 9, 10],
	[11, 12, 13, 14, 15],
	[16, 17, 18, 19, 20],
	[21, 22, 23, 24, 25],
	[26, 27, 28, 29, 30]
])  # The cursor is at 1

walker2D.walk_down()  # The cursor is at 6
walker2D.walk_down()  # The cursor is at 11
walker2D.walk_down()  # The cursor is at 16
walker2D.walk_right()  # The cursor is at 17

print(walker2D.cursor_element.value)  # -> 17
print(walker2D.get_neighbors())
# {
# 	'up': ListWalkerElement(12),
# 	'right': ListWalkerElement(18),
# 	'down': ListWalkerElement(22),
# 	'left': ListWalkerElement(16)
# }

walker2D.print()
# +---+----+--------+----+----+----+
# |   | 0  |   1    | 2  | 3  | 4  |
# +---+----+--------+----+----+----+
# | 0 | 1  |   2    | 3  | 4  | 5  |
# | 1 | 6  |   7    | 8  | 9  | 10 |
# | 2 | 11 |   12   | 13 | 14 | 15 |
# | 3 | 16 | > 17 < | 18 | 19 | 20 |
# | 4 | 21 |   22   | 23 | 24 | 25 |
# | 5 | 26 |   27   | 28 | 29 | 30 |
# +---+----+--------+----+----+----+

Metadata

Release files for listwalker 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for listwalker 1.1
File Size Uploaded Provenance Actions
listwalker-1.1.tar.gz 4.4 kB Without provenance Details for listwalker-1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for listwalker 1.1
File Interpreter ABI Platform Actions
listwalker-1.1-py3-none-any.whl Python 3 none any Details for listwalker-1.1-py3-none-any.whl

Total release size: 8.9 kB

Release files / listwalker-1.1.tar.gz

Download URL listwalker-1.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c1ac185bcdc9f16b06387dffcab97dafcfa600193774077aa67a6dee86597437
BLAKE2b-256 checksum
How to use checksums
bde81551d6244afb62137ac7bb55a8412b8908d4c15adf364b7be8f39cbe7a00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.5

Release files / listwalker-1.1-py3-none-any.whl

Download URL listwalker-1.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7958fbbf4247967580144670a4a2be7a8ad73b8144acacd5b8caa38a677e5c93
BLAKE2b-256 checksum
How to use checksums
b4afb37ff5ecc57e3d3e0cbb46431b7e155e2b64e5301586ba321c56d7e81818
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.5

Security for listwalker 1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page