Skip to content

Commit

Permalink
easy tool to copy scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensayshi committed Apr 4, 2016
1 parent 1e2ab69 commit 9a3d125
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tools/copyscenarios.py
@@ -0,0 +1,15 @@
#!/usr/bin/python

import os
import re
import shutil

DIR = "counterpartylib/test/fixtures/scenarios"
REGEX = r"^(?P<name>.*)\.new(?P<ext>\..*)$"

for file in sorted(os.listdir(DIR)):
m = re.match(REGEX, file)
if m:
newfile = m.group('name') + m.group('ext')
print("%s -> %s" % (file, newfile))
shutil.copy(os.path.join(DIR, file), os.path.join(DIR, newfile))

0 comments on commit 9a3d125

Please sign in to comment.