diff --git a/src/scon/config/settings.py b/src/scon/config/settings.py index b8b9677..18c9818 100644 --- a/src/scon/config/settings.py +++ b/src/scon/config/settings.py @@ -138,6 +138,22 @@ if __name__ == '__main__': print('Locale Get Preferred Encoding is ', locale.getpreferredencoding()) print('File System Encoding is ', sys.getfilesystemencoding()) + + print('Expanduser tells me home directory is in %s' % os.path.expanduser('~')) + if not os.path.exists(os.path.expanduser('~')): + logging.error('Expanduser Folder does not exist.') + + # winapi + import ctypes.wintypes + CSIDL = 0x28 # CSIDL_PROFILE + SHGFP_TYPE_CURRENT = 0 # Get current, not default value + buf= ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH) + ctypes.windll.shell32.SHGetFolderPathW(None, CSIDL, None, SHGFP_TYPE_CURRENT, buf) + windows_user_folder = buf.value + print('Windows itself tells me its in %s' % windows_user_folder) + if not os.path.exists(windows_user_folder): + logging.error('Even that Folder does not exist.') + print('The UserConfig xml is saved as ', settings.detect_encoding(os.path.join(settings.get_config_path(), 'user_config.xml'))) diff --git a/src/scon/game/pieces.py b/src/scon/stuff/pieces.py similarity index 100% rename from src/scon/game/pieces.py rename to src/scon/stuff/pieces.py diff --git a/src/scon/gui/qbrowser.py b/src/scon/stuff/qbrowser.py similarity index 100% rename from src/scon/gui/qbrowser.py rename to src/scon/stuff/qbrowser.py