Skip to main content

IDLE extension to open a specific line in a file from CLI

Project description

IdleOpenLine

Python IDLE extension to open a specific line in a file.

Tests

pre-commit.ci status pre-commit

What does this extension do?

This IDLE extension allows you to open a specific line and column from a terminal launch command, such as idle-python3.12 my_file.py:32:4 and jump to line 32 column 4. This line indexing syntax is very common in error/warning messages in many systems such as Ruff. There is also support for opening a selected area, such as idle-python3.12 my_file.py:32:4:36:9, which would jump to 32 column 4 and select the region starting at line 32 column 4 and ending at line 36 column 9. Regions that are not fully defined, such as my_file.py:32:4:36, will not be selected.

Example usecase

If you happen to be using Tilix, if you go to Preferences > Advanced > Custom Links, you could add the following:

Regex: (?:\/*?[a-zA-Z0-9-\.\_]+\/)*[a-zA-Z0-9-\.\_]+\.(?:pyi?)(:[0-9]+)* Command: idle-python3.12 $0

This will make it so if there are filenames ending in .py or .pyi in your terminal window, you can open them in IDLE by Ctrl + Clicking on them!

Installation (Without root permissions)

  1. Go to terminal and install with pip install idleopenline[user].
  2. Run command idleuserextend; idleopenline. You should see the following output: Config should be good! Config should be good!.
  3. Open IDLE, go to Options -> Configure IDLE -> Extensions. If everything went well, alongside ZzDummy there should be and option called idleopenline. This is where you can configure if idleopenline is enabled or not.

Installation (Legacy, needs root permission)

  1. Go to terminal and install with pip install idleopenline.
  2. Run command idleopenline. You will likely see a message saying idleopenline not in system registered extensions!. Run the command given to add idleopenline to your system's IDLE extension config file.
  3. Again run command idleopenline. This time, you should see the following output: Config should be good!.
  4. Open IDLE, go to Options -> Configure IDLE -> Extensions. If everything went well, alongside ZzDummy there should be and option called idleopenline. This is where you can configure if idleopenline is enabled or not.

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

idleopenline-0.0.2.tar.gz (51.9 kB view details)

Uploaded Source

Built Distribution

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

idleopenline-0.0.2-py3-none-any.whl (38.4 kB view details)

Uploaded Python 3

File details

Details for the file idleopenline-0.0.2.tar.gz.

File metadata

  • Download URL: idleopenline-0.0.2.tar.gz
  • Upload date:
  • Size: 51.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for idleopenline-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b02fe2d2b9bee4a066c164d89a5a2234c75346b1511678a6d65647c2f8fb304e
MD5 2a7d0e850e7a344c2c6082042aa6b96f
BLAKE2b-256 fb22cb75889bcb6fc3a29b86919fabe3fff89c8ea799a8b4fb697d4e082a8255

See more details on using hashes here.

Provenance

The following attestation bundles were made for idleopenline-0.0.2.tar.gz:

Publisher: python-publish.yml on CoolCat467/idleopenline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file idleopenline-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: idleopenline-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 38.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for idleopenline-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 178f891b971de21a886d3e121013c5f7815f2f2ed8e48e1f04b6925950457c5d
MD5 c65677c16e9368f843ff6a7744847ed0
BLAKE2b-256 75a62bedc164a5c2787b78ea51c532a6f1bbeb0ab834149afffc355d97f25851

See more details on using hashes here.

Provenance

The following attestation bundles were made for idleopenline-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on CoolCat467/idleopenline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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