@@ -110,6 +110,7 @@ def cae(
110
110
Record the GUI commands to a file, by default None
111
111
"""
112
112
# Parse options
113
+ script = f'"{ script } "' .replace ('""' , '"' ) if " " in script else script
113
114
options = self ._parse_options (script = script if gui else None , noGUI = script if not gui else None ,
114
115
database = database , replay = replay , recover = recover , startup = startup ,
115
116
noenvstartup = not envstartup , noSavedOptions = not savedOptions ,
@@ -136,6 +137,8 @@ def pde(self, *scripts: str, script: str | None = None, **options):
136
137
options
137
138
Abaqus/CAE command line arguments
138
139
"""
140
+ script = f'"{ script } "' .replace ('""' , '"' ) if script is not None and " " in script else script
141
+ scripts = tuple (f'"{ s } "' .replace ('""' , '"' ) if " " in s else s for s in scripts )
139
142
cae_opts = self ._parse_options (** options )
140
143
args = (* scripts ,) + ((f"script={ script } " ,) if script else ()) + ("-pde" ,) + ((cae_opts ,) if cae_opts else ())
141
144
return self .abaqus ("pde" , * args )
@@ -164,6 +167,7 @@ def python(
164
167
options = self ._parse_options (sim = sim , log = log )
165
168
166
169
# Execute command
170
+ script = f'"{ script } "' .replace ('""' , '"' ) if " " in script else script
167
171
return self .abaqus ("python" , script , options , * args )
168
172
169
173
@typechecked
0 commit comments