Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

get-unicode-arguments-to-launch-editor

A cross-platform Python utility that gets Unicode arguments to launch an EDITOR, using user input, environment variables, and platform-specific fallbacks.

Features

  • Gets arguments to launch an EDITOR using (in order of precedence):
    1. User-supplied command (editor parameter)
    2. $VISUAL environment variable
    3. $EDITOR environment variable
    4. Platform-specific fallbacks:
      • NT: notepad
      • POSIX: nano, vi
  • Verifies that the editor executable exists on the system.
  • Canonicalizes the returned command as a list suitable for os.execvp() or subprocess calls.
  • Command-line splitting and executable resolution is platform-aware.

Installation

pip install get-unicode-arguments-to-launch-editor

Usage

# coding=utf-8
from __future__ import print_function
from get_unicode_arguments_to_launch_editor import get_unicode_arguments_to_launch_editor

# Example output on Linux:
# [u'/usr/bin/nano']
print(get_unicode_arguments_to_launch_editor())

# Example output on Linux:
# [u'/usr/bin/vim.basic', u'-R']
print(get_unicode_arguments_to_launch_editor(u'vim -R'))

Contributing

Contributions welcome! Please open issues or pull requests on GitHub.

License

This project is licensed under the MIT License.

Release files for get-unicode-arguments-to-launch-editor 0.1.0a0

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

Source distribution (sdist)

Source distribution for get-unicode-arguments-to-launch-editor 0.1.0a0
File Size Uploaded
get_unicode_arguments_to_launch_editor-0.1.0a0.tar.gz 3.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for get-unicode-arguments-to-launch-editor 0.1.0a0
File Interpreter ABI Platform
get_unicode_arguments_to_launch_editor-0.1.0a0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 7.6 kB

Release files / get_unicode_arguments_to_launch_editor-0.1.0a0.tar.gz

Download URL get_unicode_arguments_to_launch_editor-0.1.0a0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a96fe57a2737483741bf88141760f10ea9dabd4307fa2dc12a7659100600d9ad
BLAKE2b-256 checksum
How to use checksums
481431a3205d21d894f4102ca060b7d8ed4a497059a09c880f42737441b93b28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / get_unicode_arguments_to_launch_editor-0.1.0a0-py2.py3-none-any.whl

Download URL get_unicode_arguments_to_launch_editor-0.1.0a0-py2.py3-none-any.whl
Size 4.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
9932ed15d31afbcf167cec7123e18599781ddf4137199ddbc9cecb3556acd548
BLAKE2b-256 checksum
How to use checksums
c08050be5ef48158b5aea0c06f1d99f2d7120c427f1432ef5bd8e97d95b1e136
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.0a0 This release

2 release files

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