diff options
author | 2020-01-03 14:54:19 -0800 | |
---|---|---|
committer | 2020-01-03 14:54:19 -0800 | |
commit | 4d4ec41f5637e9ee26014d4db9536bd740a1c666 (patch) | |
tree | 4afa7ad985da7de844495977c07144adb6fdcce2 /Python/pywarpx/Bucket.py | |
parent | c874e3fe2d0ef3ae2f8cc7e581022995f4fe2cc3 (diff) | |
download | WarpX-4d4ec41f5637e9ee26014d4db9536bd740a1c666.tar.gz WarpX-4d4ec41f5637e9ee26014d4db9536bd740a1c666.tar.zst WarpX-4d4ec41f5637e9ee26014d4db9536bd740a1c666.zip |
Updated handling of fields_to_plot in picmi interface
Diffstat (limited to 'Python/pywarpx/Bucket.py')
-rw-r--r-- | Python/pywarpx/Bucket.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pywarpx/Bucket.py b/Python/pywarpx/Bucket.py index 66494a700..016d6a57e 100644 --- a/Python/pywarpx/Bucket.py +++ b/Python/pywarpx/Bucket.py @@ -35,8 +35,9 @@ class Bucket(object): if isinstance(value, str): rhs = value elif hasattr(value, '__iter__'): - # --- For lists, tuples, and arrays make a space delimited string of the values - rhs = ' '.join(map(repr, value)) + # --- For lists, tuples, and arrays make a space delimited string of the values. + # --- The lambda is needed in case this is a list of strings. + rhs = ' '.join(map(lambda s : repr(s).strip("'\""), value)) else: rhs = value attrstring = '{0}.{1} = {2}'.format(self.instancename, attr, repr(rhs).strip("'\"")) |