40
40
41
41
42
42
def set_ansys_em_environment (oDesktop ):
43
- variable = f "ANSYSEM_ROOT{ oDesktop .GetVersion ()[2 :6 ].replace ('.' , '' ) } "
43
+ variable = "ANSYSEM_ROOT{}" . format ( oDesktop .GetVersion ()[2 :6 ].replace ("." , "" ))
44
44
if variable not in os .environ :
45
45
os .environ [variable ] = oDesktop .GetExeDir ()
46
46
@@ -57,8 +57,8 @@ def sanitize_interpreter_path(interpreter_path, version):
57
57
def check_file (file_path , oDesktop ):
58
58
if not os .path .isfile (file_path ):
59
59
show_error (
60
- f '"{ file_path } " does not exist. Install PyAEDT using the Python script installer from the PyAEDT '
61
- "documentation." ,
60
+ '"{}" does not exist. Install PyAEDT using the Python script installer from the PyAEDT '
61
+ "documentation." . format ( file_path ) ,
62
62
oDesktop ,
63
63
)
64
64
return False
@@ -111,34 +111,34 @@ def environment_variables(oDesktop):
111
111
os .environ ["PYAEDT_STUDENT_VERSION" ] = "False"
112
112
if is_linux :
113
113
edt_root = os .path .normpath (oDesktop .GetExeDir ())
114
- os .environ [f "ANSYSEM_ROOT{ version } " ] = edt_root
114
+ os .environ ["ANSYSEM_ROOT{}" . format ( version ) ] = edt_root
115
115
ld_library_path_dirs_to_add = [
116
- f" { edt_root } /commonfiles/CPython/3_7/linx64/Release/python/lib" ,
117
- f" { edt_root } /commonfiles/CPython/3_10/linx64/Release/python/lib" ,
118
- f" { edt_root } /common/mono/Linux64/lib64" ,
119
- f" { edt_root } /Delcross" ,
120
- f" { edt_root } " ,
116
+ "{ }/commonfiles/CPython/3_7/linx64/Release/python/lib". format ( edt_root ) ,
117
+ "{ }/commonfiles/CPython/3_10/linx64/Release/python/lib". format ( edt_root ) ,
118
+ "{ }/common/mono/Linux64/lib64". format ( edt_root ) ,
119
+ "{ }/Delcross". format ( edt_root ) ,
120
+ "{}" . format ( edt_root ) ,
121
121
]
122
122
os .environ ["LD_LIBRARY_PATH" ] = ":" .join (ld_library_path_dirs_to_add ) + ":" + os .getenv ("LD_LIBRARY_PATH" , "" )
123
123
if version > "2023.1" :
124
124
os .environ ["TCL_LIBRARY" ] = os .path .join (
125
- f" { edt_root } /commonfiles/CPython/3_10/linx64/Release/python/lib" , "tcl8.5"
125
+ "{ }/commonfiles/CPython/3_10/linx64/Release/python/lib". format ( edt_root ) , "tcl8.5"
126
126
)
127
127
os .environ ["TK_LIBRARY" ] = os .path .join (
128
- f" { edt_root } /commonfiles/CPython/3_10/linx64/Release/python/lib" , "tk8.5"
128
+ "{ }/commonfiles/CPython/3_10/linx64/Release/python/lib". format ( edt_root ) , "tk8.5"
129
129
)
130
130
os .environ ["TKPATH" ] = os .path .join (
131
- f" { edt_root } /commonfiles/CPython/3_10/linx64/Release/python/lib" , "tk8.5"
131
+ "{ }/commonfiles/CPython/3_10/linx64/Release/python/lib". format ( edt_root ) , "tk8.5"
132
132
)
133
133
else :
134
134
os .environ ["TCL_LIBRARY" ] = os .path .join (
135
- f" { edt_root } /commonfiles/CPython/3_7/linx64/Release/python/lib" , "tcl8.5"
135
+ "{ }/commonfiles/CPython/3_7/linx64/Release/python/lib". format ( edt_root ) , "tcl8.5"
136
136
)
137
137
os .environ ["TK_LIBRARY" ] = os .path .join (
138
- f" { edt_root } /commonfiles/CPython/3_7/linx64/Release/python/lib" , "tk8.5"
138
+ "{ }/commonfiles/CPython/3_7/linx64/Release/python/lib". format ( edt_root ) , "tk8.5"
139
139
)
140
140
os .environ ["TKPATH" ] = os .path .join (
141
- f" { edt_root } /commonfiles/CPython/3_7/linx64/Release/python/lib" , "tk8.5"
141
+ "{ }/commonfiles/CPython/3_7/linx64/Release/python/lib". format ( edt_root ) , "tk8.5"
142
142
)
143
143
144
144
0 commit comments