Hi,
many thanks for your effort! (unfortunately, in my previous attempts, I wasn’t able to solve some issues with the module structure and python 3 import mechanism, and am therefore grateful, that wx.py will be available for phoenix.
Some remarks from my testing - on py 3.3.1 on win 7 using wxPython_Phoenix-2.9.5.81-r73953-win32-py3.3 - with your copy of wx.py
I had to change:
…\py\tests\test_introspect.py
803: import builtins
804: if ‘object’ in builtins:
to
803: from six.moves import builtins
804: if ‘object’ in dir(builtins):
Then I get multiple test failures, which are probably expected in an “in progress” state of the conversion (cf. below:):
Running PyCrust works for me, however, there were some suppressed exceptions,
"Exception RuntimeError: ‘dictionary changed size during iteration’ in <function _removeReceiver at 0x02CE8660> ignored
…[multiple times]"
which appears to be gone after changing:
C:\Python33\Lib\site-packages\wx\py\dispatcher.py
231: for senderkey in connections.keys():
232: for signal in connections[senderkey].keys():
to
231: for senderkey in list(connections.keys()):
232: for signal in list(connections[senderkey].keys()):
I also noticed some problems with live completion in the shell (the combo suggestions is not updated on typing),
whith clipboard availability
and also by trying to import the py modules from within a script.
the simple standalone script:
import wx.py.crust
wx.py.crust.CrustFrame().Show()
throws:
Traceback (most recent call last):
File “D:\D_dokumenty\vlasta\python-wx\test_pycrust_phoenix.py”, line 2, in
import wx.py.crust
File “C:\Python33\lib\site-packages\wx\py\crust.py”, line 19, in
from wx.py.shell import Shell
File “C:\Python33\lib\site-packages\wx\py\shell.py”, line 28, in
from wx.py import magic
File “C:\Python33\lib\site-packages\wx\py\magic.py”, line 11, in
from parse import testForContinuations
ImportError: No module named ‘parse’
However, the same code works, if run from an previously running pyCrust instance.
(there might be some mentioned import quirks, as there is a “C:\Python33\Lib\site-packages\wx\py\parse.py” there.
But I hope all of this can be fixed in some way.
Sorry for this messy report, I just wanted to write some quick observations, hopefully it is in some way helpful.
best regards,
vbr
-------- Output of C:\Python33\Lib\site-packages\wx\py\tests\testall.py ----
…EEEEC:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py:759: DeprecationWarning: Please use assertTrue instead.
‘:item: %r :attribute: %r’ % (item, attribute))
.FFFEEE.FF…
···
2013/5/9 philippe DALET philippe.dalet@gmail.com
Hello,
I have translated pycrust (py folder) for phoenix (on xp for python 2.7 and 3.3)
some others samples (samples, wxPIA_book)
wxpython demos (80%) running well on python 2.7.
on my dropbox
Ph DALET.
–
======================================================================
ERROR: test_getAttributeNames (test_introspect.GetAttributeNamesTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 639, in setUp
long(123),
NameError: global name ‘long’ is not defined
======================================================================
ERROR: test_getAttributeNames_NoDouble (test_introspect.GetAttributeNamesTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 639, in setUp
long(123),
NameError: global name ‘long’ is not defined
======================================================================
ERROR: test_getAttributeNames_NoSingle (test_introspect.GetAttributeNamesTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 639, in setUp
long(123),
NameError: global name ‘long’ is not defined
======================================================================
ERROR: test_getAttributeNames_NoSingleOrDouble (test_introspect.GetAttributeNamesTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 639, in setUp
long(123),
NameError: global name ‘long’ is not defined
======================================================================
ERROR: test_getBaseObject (test_introspect.GetBaseObjectTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 401, in test_getBaseObject
(ham.func_code, ham.func_code, 0),
AttributeError: ‘function’ object has no attribute ‘func_code’
======================================================================
ERROR: test_getConstructor (test_introspect.GetConstructorTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 837, in test_getConstructor
varnames = introspect.getConstructor(O).func_code.co_varnames
AttributeError: ‘NoneType’ object has no attribute ‘func_code’
======================================================================
ERROR: test_getConstructor_MultipleInheritance (test_introspect.GetConstructorTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 853, in test_getConstructor_MultipleInheritance
varnames = introspect.getConstructor(D1).func_code.co_varnames
AttributeError: ‘NoneType’ object has no attribute ‘func_code’
======================================================================
FAIL: test_getAutoCompleteList_NoDouble (test_introspect.GetAutoCompleteListTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 775, in test_getAutoCompleteList_NoDouble
':item: %r' % (item,))
AssertionError: <filter object at 0x02BECF90> != : :item: ‘None.’
======================================================================
FAIL: test_getAutoCompleteList_NoSingle (test_introspect.GetAutoCompleteListTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 767, in test_getAutoCompleteList_NoSingle
':item: %r' % (item,))
AssertionError: <filter object at 0x02BECFB0> != [‘ge’, ‘reduce’, ‘gt’, ‘sizeof’, ‘getattribute’, ‘delattr’, ‘lt’, ‘dir’, ‘hash’, ‘new’, ‘repr’, ‘reduce_ex’, ‘setattr’, ‘subclasshook’, ‘ne’, ‘bool’, ‘class’, ‘init’, ‘format’, ‘doc’, ‘str’, ‘le’, ‘eq’] : :item: ‘None.’
======================================================================
FAIL: test_getAutoCompleteList_NoSingleOrDouble (test_introspect.GetAutoCompleteListTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 784, in test_getAutoCompleteList_NoSingleOrDouble
‘:item: %r’ % (item,))
AssertionError: <filter object at 0x03001030> != : :item: ‘None.’
======================================================================
FAIL: test_getRoot (test_introspect.GetRootTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 154, in test_getRoot
self._checkRoot(input, terminator, output)
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 105, in _checkRoot
(input, terminator, output, root))
AssertionError: ‘’ != ‘spam’
- spam : :in: ‘spam’ :t: ‘’ :out: ‘spam’ :root: ‘’
======================================================================
FAIL: test_getRoot_Advanced (test_introspect.GetRootTestCase)
Traceback (most recent call last):
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 184, in test_getRoot_Advanced
self._checkRoot(input, terminator, output)
File “C:\Python33\Lib\site-packages\wx\py\tests\test_introspect.py”, line 105, in checkRoot
(input, terminator, output, root))
AssertionError: ‘’ != 'spam’
- spam_ : :in: ‘spam_’ :t: ‘’ :out: ‘spam_’ :root: ‘’
Ran 25 tests in 0.041s
FAILED (failures=5, errors=7)
Process completed, Exit Code 1.
Execution time: 00:01.227