Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

urbanware-org/space-remover

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

space-remover

Table of contents


Definition

Simple Python script to remove trailing spaces and tabs from files.

Top

Details

There often are code or config files that contain trailing spaces and tabs at the end of lines as well as in blank lines. This script will remove them without removing any blank lines themselves.

The code was written on Linux and has only been tested on that platform, yet.

Note

This project was officially discontinued as of October 2025 and is no longer maintained.

Top

Usage

Please backup the data before using this script.

So, to remove all unnecessary spaces inside all Python files inside the directory /tmp/project as well as its sub-directories, type:

$ find /tmp/project -type f | grep "\.py$" > /tmp/foobar.tmp
$ while read line; do
      ./space-remover.py "$line"
$ done < /tmp/foobar.tmp
$ rm -f /tmp/foobar.tmp

Top

Contact

Any suggestions, questions, bugs to report or feedback to give?

You can contact me by sending an email to dev@urbanware.org or by opening a GitHub issue (which I would prefer if you have a GitHub account).

Top

About

Python script to remove trailing spaces and tabs from files

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages