Get the resource path
(relative_path, persistent=False)
| 7 | |
| 8 | |
| 9 | def resource_path(relative_path, persistent=False): |
| 10 | """ |
| 11 | Get the resource path |
| 12 | """ |
| 13 | base_path = os.path.abspath(".") |
| 14 | total_path = os.path.join(base_path, relative_path) |
| 15 | if persistent or os.path.exists(total_path): |
| 16 | return total_path |
| 17 | else: |
| 18 | try: |
| 19 | base_path = sys._MEIPASS |
| 20 | return os.path.join(base_path, relative_path) |
| 21 | except Exception: |
| 22 | return total_path |
| 23 | |
| 24 | |
| 25 | def get_resolution_value(resolution_str): |
no outgoing calls
no test coverage detected