mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-05 23:35:48 +03:00
Finish and clean up Python 3 support
- Handle Python 3 types similar to libxml2 - Copy new versions of libxml_xmlXPathDestructNsNode and libxml_xmlXPathObjectPtrConvert from libxml2 - Fix compiler warnings - Fix whitespace - Remove unneeded imports from __future__ - Remove test in extelem.py (StringIO can't be converted to FILE under Python 3) - string.lower() works in both Python 2 and 3 Closes #25.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
#!/usr/bin/python -u
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import string
|
||||
import libxml2
|
||||
@@ -24,7 +22,7 @@ def f(ctx, str):
|
||||
except:
|
||||
pass
|
||||
|
||||
return string.upper(str)
|
||||
return str.upper()
|
||||
|
||||
libxslt.registerExtModuleFunction("foo", "http://example.com/foo", f)
|
||||
|
||||
|
Reference in New Issue
Block a user