From 66d47b78346617d2b66476b94d93ae1db814383d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 31 Mar 2021 18:41:15 +0200 Subject: FromFile indexer, stream2sol.py: Remove space escaping This isn't necessary after all, for the same reason that im-sandbox doesn't need escaping: it can count off the fields where spaces aren't allowed, and anything left is the filename. I was over-thinking things. --- scripts/stream2sol.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/stream2sol.py b/scripts/stream2sol.py index 76aa0068..7b194235 100755 --- a/scripts/stream2sol.py +++ b/scripts/stream2sol.py @@ -81,9 +81,6 @@ class Crystal: cs += ' ' + self.lattice_type_sym return cs -def escape_spaces(str): - return str.replace('\\', '\\\\').replace(' ', '\\ ') - class Chunk: def __init__(self, line): @@ -116,7 +113,7 @@ class Chunk: # return '\n'.join([' '.join([self.file, *self.Event.split('//'), str(cryst)]) # for ii, cryst in enumerate(self.crystals)]) # new-style (not working yet) - return '\n'.join([' '.join([escape_spaces(self.file), self.Event, str(cryst)]) + return '\n'.join([' '.join([self.file, self.Event, str(cryst)]) for ii, cryst in enumerate(self.crystals)]) -- cgit v1.2.3