Searches for LTspice under Linux or MacOS Returns ------- LTspice command
()
| 182 | return commands |
| 183 | |
| 184 | def _find_LTspice_wine(): |
| 185 | """ |
| 186 | Searches for LTspice under Linux or MacOS |
| 187 | |
| 188 | Returns |
| 189 | ------- |
| 190 | LTspice command |
| 191 | """ |
| 192 | cmd = '' |
| 193 | try: |
| 194 | home = expanduser("~") |
| 195 | drives = [os.path.join(home, '.wine', 'drive_c')] |
| 196 | for drive in drives: |
| 197 | drive = os.path.join(drive, 'Program Files') |
| 198 | for root, dirs, files in os.walk(drive, topdown=True): |
| 199 | for name in dirs: |
| 200 | if re.match('LT(S|s)pice*', name, flags=0): |
| 201 | if os.path.exists(os.path.join(root,name,'XVIIx64.exe')): |
| 202 | cmd = os.path.join(root,name,'XVIIx64.exe') |
| 203 | elif os.path.exists(os.path.join(root,name,'LTspice.exe')): |
| 204 | cmd = os.path.join(root,name,'LTspice.exe') |
| 205 | elif os.path.exists(os.path.join(root,name,'ltspice.exe')): |
| 206 | cmd = os.path.join(root,name,'ltspice.exe') |
| 207 | return cmd |
| 208 | except: |
| 209 | pass |
| 210 | return cmd |
| 211 | |
| 212 | def _find_installed_software(): |
| 213 | system = platform.system() |
no outgoing calls
no test coverage detected