Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Formats text files with line breaks to fit inside 80 chars

Project Description

PyLineBreak is a small utility that breaks very long lines into smaller ones. More specifically, it limits a line to 80 characters in length and will ‘fix’ text files that do not conform to that limitation. This allows for easier reading in terminal shells or a TTY console.:

----------
ON *NIX
----------

$ pylinebreak

OR

$ python /path/to/pyimgsort.py path/to/file


-----------
ON WINDOWS:
-----------

Open a command prompt and type:

C:\path\to\python.exe C:\path\to\pylinebreak.py C:\path\to\file

OR

C:\path\to\python.exe C:\path\to\pyimgsort.py

Requirements:

  • Python 2.6 or later

Installation:

  • In GNU/Linux: Unpack the tarball, open a terminal, navigate to the directory into which you unpacked the tarball, and type (as admin, i.e., “su” or “sudo”) python setup.py install
  • In Windows, just run the .exe as normal. The script will be installed to C:\Pythondir\Lib\site-packages

Notes

This program will format text files to fit inside an 80-character margin. Chances are, if you edit inside a GUI text editor (or copy/paste into one), the lines won’t be broken the same way they are with programs like Emacs or Vim. Consequently, they can be unpleasant to edit or read inside a shell or TTY terminal.

This program alleviates the problem somewhat. There will be a few short lines every here and there, but the resultant file is still quite a lot easier to deal with than before.

By default, the program creates backups in the same directory and sets the margin at 80 characters. You can change these settings by editing their values near the top of the source file (pylinebreak.py).

Author

  • x.seeks (x -dot- seeks _at_ gmail -dot- com)

License

GPL version 3. See LICENSE.txt for more info.

Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyLineBreak-0.1.0.linux-x86_64.exe (67.9 kB) Copy SHA256 Checksum SHA256 any Windows Installer Apr 1, 2011
PyLineBreak-0.1.0.tar.gz (3.7 kB) Copy SHA256 Checksum SHA256 Source Apr 1, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting