kcoyner / rpl

intelligent recursive search/replace utility
GNU General Public License v2.0
14 stars 13 forks source link

Replacing occurrences of a string with an empty string fails with Python 3 #5

Open timjackson opened 6 years ago

timjackson commented 6 years ago

On Fedora 28 (reported downstream there)

$ echo "abcdef" > test.txt $ rpl "a" "" test.txt Really DELETE all occurences of a (case sensitive)? (Y/[N]) Traceback (most recent call last): File "/usr/bin/rpl", line 314, in main() File "/usr/bin/rpl", line 172, in main line = raw_input() NameError: name 'raw_input' is not defined

Tested with commit 5cbaa4b . $ rpm -q python3 python3-3.6.5-1.fc28.x86_64

Not a problem with Python 2.

Replacing raw_input() with input() on line 172 solves it.

timjackson commented 6 years ago

There's also another instance of raw_input() on line 269

homeworkprod commented 3 years ago

This specific issue should already be fixed in #1.