Skip to main content

Edit files with your $EDITOR, like git commit does.

Project description

openeditor

Edit files with your $EDITOR, like git commit does.

Usage

Install with: pip install openeditor

# Let user edit file
s = openeditor.edit_file("path/to/my/file.txt")
print("The file now contains:\n" + s)

# Use a temp file
s = openeditor.edit_file(
    "# Please edit this file, save and close editor when done", 
    "path/to/my/file.txt"
)
print("The file now contains:\n" + s) 

The editor is obtained from, in order of precedence:

  • $VISUAL
  • $EDITOR

If none of these provide a useful editor, an exception will be thrown.

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

openeditor-0.3.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

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

openeditor-0.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file openeditor-0.3.tar.gz.

File metadata

  • Download URL: openeditor-0.3.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.3 Linux/5.10.30-1-MANJARO

File hashes

Hashes for openeditor-0.3.tar.gz
Algorithm Hash digest
SHA256 68a1ff0bbd36565f42095d43ffac5a311b5f4dd9a6743a86906b24fb3200de48
MD5 0b9ebb850333b71c8c864965f73e8f18
BLAKE2b-256 2ad10185f47115bd3d0eaa42035b118841b79990184c46146bff06c1ab0d4c40

See more details on using hashes here.

File details

Details for the file openeditor-0.3-py3-none-any.whl.

File metadata

  • Download URL: openeditor-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.9.3 Linux/5.10.30-1-MANJARO

File hashes

Hashes for openeditor-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 32f2f4c943371cb886f45339b44cd96bdb980fce138b73fe60e6b388ceefa602
MD5 0fbfa7e9a6cb1db6e25d1785301686b3
BLAKE2b-256 afcaa9cc723074f38af33ffb97c81ce02f28ae43d0459ee81565ccb648c04d55

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