mupen64plus/mupen64plus-ui-python — pull request #20 by fayvel (2014-10-05 13:11:19+00:00)
Title: Replace deprecated functionality with new ones

This is a first step to make it compatible with PyQt5 and maybe Python3.

The efforts for PyQt5 are stored in a separate branch pyqt5 but are currently incomplete (it starts up, but not all dialogs have been testet + file open manuelly is not yet adjusted).

Python3 is a bigger problem because the included SDL library doesn't work with Python3. And all the core functions have to handle the byte vs str (unicode) conversion. Right now you need following hack to startup the GUI with python3.

```
diff --git a/src/m64py/core/core.py b/src/m64py/core/core.py
index deaa4ae..38cd5f6 100644
--- a/src/m64py/core/core.py
+++ b/src/m64py/core/core.py
@@ -160,7 +160,7 @@ class Core:
"""Initializes libmupen64plus for use by allocating memory,
creating data structures, and loading the configuration file."""
rval = self.m64p.CoreStartup(
- C.c_int(CORE_API_VERSION), None, C.c_char_p(os.path.dirname(path)),
+ C.c_int(CORE_API_VERSION), None, C.c_char_p(b""),
"Core", DEBUG_CALLBACK, "State", STATE_CALLBACK)
if rval == M64ERR_SUCCESS:
if use_vidext:
```