k 5 R sed: make pep80 happy

This commit is contained in:
lassulus 2017-05-12 19:24:41 +02:00
parent b51c69dbde
commit ddc78797c2

View File

@ -3,14 +3,16 @@
# Usage:
# _from=krebs state_dir=. python sed-plugin.py 'dick butt'
# _from=krebs state_dir=. python sed-plugin.py 's/t/l/g'
## dick bull
# > dick bull
import shelve
from os import environ
from os.path import join
from sys import argv
import re
d = shelve.open(join(environ['state_dir'], 'sed-plugin.shelve'), writeback=True)
usr = environ['_from']
import re
def is_regex(line):
myre = re.compile(r'^s/(?:\\/|[^/])+/(?:\\/|[^/])*/[ig]?$')