()
| 153 | def main_is_frozen(): |
| 154 | return hasattr(sys, "frozen") # py2exe |
| 155 | def get_main_dir(): |
| 156 | if main_is_frozen(): |
| 157 | return os.path.dirname(sys.executable) |
| 158 | return sys.path[0] |
| 159 | |
| 160 | def get_settings_path(name): |
| 161 | '''Get a directory to save user preferences. |
no test coverage detected