Skip to main content

A simple library that allows you to use goto in Python

Project description

gotolibr

A simple library that allows you to use goto in Python.

It's implemented using the commands argument of pdb.set_trace, which was added in Python 3.14.

Installation

Python 3.14 or higher is required for this library to function properly.

$ python3 -m pip install gotolibr

How to use

First, import the library:

from gotolibr import goto

Jump to an absolute line number:

goto(1)

Jump to a relative line number:

goto(-1, relative=True)

Example

from gotolibr import goto

a = 0
a += 1
print(a)
if a > 5:
    goto(4, relative=True)
else:
    goto(4)

print('Finish')

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

gotolibr-1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gotolibr-1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file gotolibr-1.0.tar.gz.

File metadata

  • Download URL: gotolibr-1.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gotolibr-1.0.tar.gz
Algorithm Hash digest
SHA256 256e0774a7c4b6a28364ac710efc096741cf1971baca64ebdc53f61cf8ea25f0
MD5 9ac897b134dc2c8977e7fa6f332a271c
BLAKE2b-256 4aeaf69f27d6a8394f9967b796e045348f62a37afc2b7a13ae24484e6f3bae3e

See more details on using hashes here.

File details

Details for the file gotolibr-1.0-py3-none-any.whl.

File metadata

  • Download URL: gotolibr-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for gotolibr-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5da714d531f88e5312ed388b6294a1ec3a641cffd01166846d4dde71ff8e55b
MD5 2ddd695b31fe161428afa990b10137eb
BLAKE2b-256 0c80f0d81c467953845ef078a5b6adf4ba068a3a3c16cd6a787da57367aa6ec7

See more details on using hashes here.

Supported by

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