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.
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)
- Go to terminal and install with
pip install idleopenline[user]
. - Run command
idleuserextend; idleopenline
. You should see the following output:Config should be good! Config should be good!
. - Open IDLE, go to
Options
->Configure IDLE
->Extensions
. If everything went well, alongsideZzDummy
there should be and option calledidleopenline
. This is where you can configure if idleopenline is enabled or not.
Installation (Legacy, needs root permission)
- Go to terminal and install with
pip install idleopenline
. - Run command
idleopenline
. You will likely see a message sayingidleopenline not in system registered extensions!
. Run the command given to add idleopenline to your system's IDLE extension config file. - Again run command
idleopenline
. This time, you should see the following output:Config should be good!
. - Open IDLE, go to
Options
->Configure IDLE
->Extensions
. If everything went well, alongsideZzDummy
there should be and option calledidleopenline
. This is where you can configure if idleopenline is enabled or not.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file idleopenline-0.0.1.tar.gz
.
File metadata
- Download URL: idleopenline-0.0.1.tar.gz
- Upload date:
- Size: 50.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9907c28a97b19962e228312f83a09678a8d3139d7079f88f2e2d5cdd1bb3447f |
|
MD5 | c870bc6e90c94df6419bab20e1a97889 |
|
BLAKE2b-256 | 1b88c996b631feb342cfeaa3c0d2e1a035ad8ec16638069e885683fe757e559e |
File details
Details for the file idleopenline-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: idleopenline-0.0.1-py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76b28961bb61e9ad2dc284cb2b6fb931d82916cd4ea7205a1d46b741b046f3ae |
|
MD5 | ce5ac2a707cf7ad3c24b507c5c71f580 |
|
BLAKE2b-256 | 11a58ef904b050a029349b9c872b21d54346f52d634128c2e638281d4cd9e955 |