ETS mysteries

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ETS mysteries

braidedlogix
I am about to, and I really mean it this time, take a break from all of my efforts on updating ETS. As it stands, ETS core packages (Traits, TraitsUI, Pyface, Chaco, Enable, and Mayavi) are all but ready for Python 3. My sandbox branch at github/braidedlogix has mostly functioning widgets, and virtually all of the demos are working for TraitsUI, Chaco, and Mayavi mlab, with either a wxPython Phoenix or PyQT5 backends. With a proper build environment and prereqs, this is pretty easy to set up with the version of ets.py from github braidedlogix/ETS_py3. Almost everything is running great, BUT a few really notable quirks on specific backends and specific OS:

1. It is not possible to embed widgets in grid cells yet under all OS and wxPython, although custom cell attributes work fine with the standard editor
2. Under Win 7 (but not 8+) and wxPython, the Mayavi engine does not render completely. Double clicking tree items and a quick resize leads to editable views, but this is certainly less than desirable.
3. VTK windows don't embed properly (only use a quarter of the space) under OSX and retina display for PyQT5
4. The HTML editor works fine but segfaults on exit under PyQT5 and OSX. This means the Chaco and TraitsUI demos segfault on exit.
5. For all OS and backends, some instances that are implicit subclasses through "provides" decorators do not clear the trait type checking (line 1348 of traits.trait_handlers.py). Disabling this check is required to make a few of my favorite demos, most notably the Envisage.examples.plugins.tasks.attractors, run.

For those folks brave enough to make attempts to update their favorite legacy apps, you should scour your codes for places where special things were done to "fix" undesirable behaviors under 2.8. I've had to disable almost all of these patches to prevent many at-best-laggy responses.

Now, a few mysterious behaviors. All of these have the common property of being a core wxpython widget with a subclassed wx.Window or wx.Panel as parent:
1. A wx.html.HTMLWindow fails to render html strings or simple page layouts. For strings, the html formatting is stripped and the remaining text is displayed. For two websites tested, raw html text was returned. In all cases, passing the same arguments in the wxPython demo gave properly rendered output. Changing over to a wx.html2.Webview engine gets around the problem.
2. Under Linux Mint, the animated GIF widget works fine, but under win7 and OSX, a "handler not supported" message pops up, even though animation works fine under the wxPython demo.
3. For an Ubuntu 16 VM with gtk3 build, everything in the demo works fine, but under ETS, wxPython can't read image files. A gtk2 build works fine for ETS.

The first and third problems are significant but can be bypassed, and the other one is pretty inconsequential but really irritating.  The only difference between the demos and the ets versions are the parents. What happens between parent and widget, or what activities are introduced, that intercept/interrupt the normal operation of the widgets?

Cheers,Eric

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

ETS mysteries

firefox
> my efforts on updating ETS. As it stands, ETS core packages (Traits,
> TraitsUI, Pyface, Chaco, Enable, and Mayavi) are all but ready for
> Python 3. My sandbox branch at github/braidedlogix has mostly
> functioning widgets, and virtually all of the demos are working for
> TraitsUI, Chaco, and Mayavi mlab, with either a wxPython Phoenix or
> PyQT5 backends.


well, quite a portion of the demos do not work. take e.g. this one:



python3 ./traitsui_window.py

/usr/local/lib/python3.5/dist-packages/IPython/frontend.py:21:

ShimWarning: The top-level `frontend` package has been deprecated since
IPython 1.0. All its subpackages have been moved to the top `IPython` level.

"All its subpackages have been moved to the top `IPython` level.",
ShimWarning)

Traceback (most recent call last):
   File "./traitsui_window.py", line 20, in <module>
     from traitsui.api import View, Item

ImportError: No module named 'traitsui'



--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ETS mysteries

braidedlogix


python3 ./traitsui_window.py

/usr/local/lib/python3.5/dist-packages/IPython/frontend.py:21:

ShimWarning: The top-level `frontend` package has been deprecated since
IPython 1.0. All its subpackages have been moved to the top `IPython` level.

"All its subpackages have been moved to the top `IPython` level.",
ShimWarning)

Traceback (most recent call last):
   File "./traitsui_window.py", line 20, in <module>
     from traitsui.api import View, Item

ImportError: No module named 'traitsui'



I have spent little time getting the Pyface examples updated, focusing instead more specifically on the folders

traitsui/examples/demo
chaco/examples/demo
mayavi/examples/mayavi/mlab

I have just updated the Pyface demo folder so that most examples work, at least under wxPython. On the whole, these demos are a bit outdated, are definitely skewed toward wxPython, and oddly enough don't always behave well (odd because Pyface is a pretty thin wrapper around wxPython). There may be some clues from this bad behavior that could help tackle some of the mysteries.

In your case, the error message that's triggered by the "from traitsui.api import View, Item" suggests that traitsui isn't in the Python path. With a wxPython backend, you should get a different message related to a completely outdated Ipython interface for wxPython that I may fix in a few months after I finish a few higher-priority things. My just-now-updated version of this script, which removes importing the unused IPythonWidget, now runs fine under qt4 or wx.

Cheers,Eric


--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: ETS mysteries

braidedlogix
>also, the pyface editor  "python_editor.py"  demo looked good at first.
>I  managed to open a text file with it. Second time around, it stopped opening files altogether with some error about > NULL or whatever.
>not exactly a stable thingy.

I've just given the pyface/examples/python_editor.py a thorough test with files open, edited, saved, reopened, different directories, on OSX, Linux Mint, and Win 7, using qt4 (with PyQT5) and wx backends, and I can't trigger any faults.

I definitely appreciate your courage and the time you are taking to test this sandbox package out. It would be helpful to know your OS, Python version, and backend (wx or qt4) to help narrow issues down a bit.

Just to be clear about my development environments for all OS versions:

Anaconda Python 3.6, with PyQT5, wxPython Phoenix 4.0.0a3.dev (conda install -c gsecars wxpython), vtk7.1.0 (conda install -c clinicalgraphics vtk=7.1.0),  fonttools (pip install fonttools)

ETS installation:
ets.py from https://github.com/braidedlogix/ETS_py3 copied to /my/ets/directory

cd /my/ets/directory
python ets.py clone
python ets.py develop

Before running examples:
Under Linux or OSX

export ETS_TOOLKIT=wx 
or
export ETS_TOOLKIT=qt4

Under Windows
set ETS_TOOLKT=wx  OR qt4

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.