Samples Seem Broken (financial_plot.py)

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

Samples Seem Broken (financial_plot.py)

lcota
It seems the samples I have are broken. I recently had to make some edits to financial_plot.py to get it to work by prepending enthought. to each import and modifying the traitsui.api import to read import traits.ui.api. Is this how it should read in the latest version of the ETS tools?

Here are the new import statements

from enthought.enable.example_support import DemoFrame, demo_main

# Enthought library imports
from enthought.enable.api import Window, Component, ComponentEditor
from enthought.traits.api import HasTraits, Instance
from enthought.traits.ui.api import Item, Group, View

# Chaco imports
from enthought.chaco.api import ArrayDataSource, BarPlot, DataRange1D, \
        LinearMapper, VPlotContainer, PlotAxis, FilledLinePlot, \
        add_default_grids, PlotLabel
from enthought.chaco.tools.api import PanTool, ZoomTool

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Samples Seem Broken (financial_plot.py)

Corran Webster
Hi Massimo,

We are in the process of re-factoring the namespaces for the various ETS projects to make Traits, Chaco and some other ETS packages top-level namespaces, rather than living in enthought.*

It looks like the version of the example that you were using was using the new namespaces, but the version of ETS that you have installed is not the new version.  You should look for the examples directory in your installation to get the correct versions of the examples, or you should get your examples from the "old-namespaces" branch of Chaco on github.  Either that, or you should install the current head of the master for all of ets from the github repo.

-- Corran

On Tue, May 17, 2011 at 1:05 AM, Massimo <[hidden email]> wrote:
It seems the samples I have are broken. I recently had to make some edits to financial_plot.py to get it to work by prepending enthought. to each import and modifying the traitsui.api import to read import traits.ui.api. Is this how it should read in the latest version of the ETS tools?

Here are the new import statements

from enthought.enable.example_support import DemoFrame, demo_main

# Enthought library imports
from enthought.enable.api import Window, Component, ComponentEditor
from enthought.traits.api import HasTraits, Instance
from enthought.traits.ui.api import Item, Group, View

# Chaco imports
from enthought.chaco.api import ArrayDataSource, BarPlot, DataRange1D, \
        LinearMapper, VPlotContainer, PlotAxis, FilledLinePlot, \
        add_default_grids, PlotLabel
from enthought.chaco.tools.api import PanTool, ZoomTool

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev



_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Samples Seem Broken (financial_plot.py)

Robert Kern
On Tue, May 17, 2011 at 11:44 AM, Corran Webster <[hidden email]> wrote:

> Hi Massimo,
>
> We are in the process of re-factoring the namespaces for the various ETS
> projects to make Traits, Chaco and some other ETS packages top-level
> namespaces, rather than living in enthought.*
>
> It looks like the version of the example that you were using was using the
> new namespaces, but the version of ETS that you have installed is not the
> new version.  You should look for the examples directory in your
> installation to get the correct versions of the examples, or you should get
> your examples from the "old-namespaces" branch of Chaco on github.  Either
> that, or you should install the current head of the master for all of ets
> from the github repo.

See this message for more details on using the old-namespaces branches:

  https://mail.enthought.com/pipermail/enthought-dev/2011-May/029135.html

--
Robert Kern
Enthought
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev