22
33Example
44-------
5- >>> from ansys.fluent.services.scheme_eval import Symbol as S
5+ >>> from ansys.fluent.core. services.scheme_eval import Symbol as S
66>>> session.scheme_eval.eval([S('+'), 2, 3])
775
88>>> session.scheme_eval.eval([S('rpgetvar'), [S('string->symbol'), "mom/relax"]]) # noqa: E501
990.7
1010>>> session.scheme_eval.exec(('(ti-menu-load-string "/report/system/proc-stats")',)) # noqa: E501
11- >>> # prints Fluent TUI output
11+ >>> # Returns TUI output string
1212>>> session.scheme_eval.string_eval("(+ 2 3)")
1313'5'
1414>>> session.scheme_eval.string_eval("(rpgetvar 'mom/relax)")
@@ -53,16 +53,16 @@ def string_eval(
5353
5454
5555class Symbol :
56- """Class representing the symbol datatype in the scheme .
56+ """Class representing the symbol datatype in Fluent .
5757
5858 Attributes
5959 ----------
6060 str : str
6161 Underlying string representation
6262 """
6363
64- def __init__ (self , str_ : str ):
65- self .str = str_
64+ def __init__ (self , str : str ):
65+ self .str = str
6666
6767
6868def _convert_pair_to_scheme_pointer (val : Tuple [Any , Any ], p : SchemePointer ):
@@ -169,9 +169,9 @@ class SchemeEval:
169169 exec(commands, wait, silent)
170170 Executes a sequence of scheme commands, returns TUI output
171171 string
172- string_eval(input_ )
172+ string_eval(input )
173173 Evaluates a scheme expression in string format, returns string
174- scheme_eval(input_ )
174+ scheme_eval(input )
175175 Evaluates a scheme expression in string format, returns Python
176176 value
177177 """
@@ -224,7 +224,7 @@ def exec(
224224 response = self .service .exec (request )
225225 return response .output
226226
227- def string_eval (self , input_ : str ) -> str :
227+ def string_eval (self , input : str ) -> str :
228228 """Evaluates a scheme expression in string format.
229229
230230 Parameters
@@ -238,11 +238,11 @@ def string_eval(self, input_: str) -> str:
238238 Output scheme value in string format
239239 """
240240 request = SchemeEvalProtoModule .StringEvalRequest ()
241- request .input = input_
241+ request .input = input
242242 response = self .service .string_eval (request )
243243 return response .output
244244
245- def scheme_eval (self , input_ : str ) -> Any :
245+ def scheme_eval (self , input : str ) -> Any :
246246 """Evaluates a scheme expression in string format.
247247
248248 Parameters
@@ -259,7 +259,7 @@ def scheme_eval(self, input_: str) -> Any:
259259 S = Symbol # noqa N806
260260 val = (
261261 S ("eval" ),
262- (S ("with-input-from-string" ), input_ , S ("read" )),
262+ (S ("with-input-from-string" ), input , S ("read" )),
263263 S ("user-initial-environment" ),
264264 )
265265 _convert_py_value_to_scheme_pointer (val , request )
0 commit comments