[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] pyuic4 in latest snapshot does not support python 2.3
From:       "James Lamanna" <jlamanna () gmail ! com>
Date:       2006-10-25 23:16:27
Message-ID: aa4c40ff0610251616s31397ffbibf02ecdbb9acf75 () mail ! gmail ! com
[Download RAW message or body]

pyuic4 does not support python 2.3 because it makes use of the
string.rsplit() function which doesn't exist until 2.4.
This is a problem on OSX where the default python is 2.3.
The patch below fixes the issue.

Thanks.
-- James Lamanna

--- pyuic/uic/Compiler/qobjectcreator-orig.py   2006-10-25
16:05:00.000000000 -0700
+++ pyuic/uic/Compiler/qobjectcreator.py        2006-10-25
16:14:10.000000000 -0700
@@ -19,7 +19,11 @@
 class _ModuleWrapper(object):
     def __init__(self, name, classes):
         if "." in name:
-            self._package, self._module = name.rsplit(".", 1)
+            #self._package, self._module = name.rsplit(".", 1)
+            # Python 2.3 compatibility
+            idx = name.rfind(".")
+            self._package = name[:idx]
+            self._module = name[idx+1:]
         else:
             self._package = None
             self._module = name

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic