mirror of https://github.com/tLDP/python-tldp
find the parent ./tldp/ directory
This commit is contained in:
parent
a3180238bd
commit
211d3b93d7
|
@ -7,13 +7,17 @@ from __future__ import print_function
|
|||
import os
|
||||
import sys
|
||||
|
||||
opd = os.path.dirname
|
||||
opj = os.path.join
|
||||
|
||||
sys.path.append(opd(opd(__file__)))
|
||||
from tldp import VERSION
|
||||
|
||||
fin = open(os.path.join(os.path.dirname(__file__), 'tldp.spec.in'))
|
||||
fout = open(os.path.join(os.path.dirname(__file__), 'tldp.spec'))
|
||||
fin = open(opj(opd(__file__), 'tldp.spec.in'))
|
||||
fout = open(opj(opd(__file__), 'tldp.spec'), 'w')
|
||||
|
||||
def transform(mapping, text):
|
||||
for tag, replacement in mapping.iteritems():
|
||||
for tag, replacement in mapping.items():
|
||||
text = text.replace(tag, replacement)
|
||||
return text
|
||||
|
||||
|
|
Loading…
Reference in New Issue