Robert Kern | 1 Oct 01:30
Picon
Gravatar

Re: Problem Installing Enable (Repost)

On Tue, Sep 30, 2008 at 15:22, luis cota <lo.maximo73@...> wrote:
> lcota$ export
> WX_CONFIG=/usr/local/lib/wxPython-unicode-2.8.8.1/bin/wx-config
> lcota$ cd /usr/local/lib/wxPython-unicode-2.8.8.1/
> lcota$ ls
> bin    include    lib    share
> lcota$ cd bin
> lcota$ ls
> wx-config    wxrc        wxrc-2.8
> lcota$ pwd
> /usr/local/lib/wxPython-unicode-2.8.8.1/bin
> lcota$ ls
> wx-config    wxrc        wxrc-2.8

Ah. sudo is blowing away most of your environment variables before it
runs easy_install. Instead of setting WX_CONFIG, put
/usr/local/lib/wxPython-unicode-2.8.8.1/ on your PATH in front of
/usr/bin. $PATH goes through, but variables sudo doesn't know about
don't.

$ export PATH=/usr/local/lib/wxPython-unicode-2.8.8.1/:$PATH
$ sudo easy_install Chaco

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco
(Continue reading)

luis cota | 1 Oct 01:48
Picon

Re: Problem Installing Enable (Repost)

Thanks - this seems to have fixed the problem, I can now complete the installation using easy_install.  I had to make a modification though, the path to add is bin, so I added this line to my ~/.profile:

export PATH=/usr/local/lib/wxPython-unicode-2.8.8.1/bin:$PATH

Now on to building the latest releases from the src trunk :)

On Tue, Sep 30, 2008 at 6:30 PM, Robert Kern <robert.kern-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
On Tue, Sep 30, 2008 at 15:22, luis cota <lo.maximo73-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> lcota$ export
> WX_CONFIG=/usr/local/lib/wxPython-unicode-2.8.8.1/bin/wx-config
> lcota$ cd /usr/local/lib/wxPython-unicode-2.8.8.1/
> lcota$ ls
> bin    include    lib    share
> lcota$ cd bin
> lcota$ ls
> wx-config    wxrc        wxrc-2.8
> lcota$ pwd
> /usr/local/lib/wxPython-unicode-2.8.8.1/bin
> lcota$ ls
> wx-config    wxrc        wxrc-2.8

Ah. sudo is blowing away most of your environment variables before it
runs easy_install. Instead of setting WX_CONFIG, put
/usr/local/lib/wxPython-unicode-2.8.8.1/ on your PATH in front of
/usr/bin. $PATH goes through, but variables sudo doesn't know about
don't.

$ export PATH=/usr/local/lib/wxPython-unicode-2.8.8.1/:$PATH
$ sudo easy_install Chaco

--
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco

_______________________________________________
Enthought-dev mailing list
Enthought-dev-oRDGkvazHdacsI7C1d+pp9BPR1lH4CV8@public.gmane.org
https://mail.enthought.com/mailman/listinfo/enthought-dev


_______________________________________________
Enthought-dev mailing list
Enthought-dev@...
https://mail.enthought.com/mailman/listinfo/enthought-dev
Gary Pajer | 1 Oct 04:40
Picon

Comments on examples, esp. Chaco

I don't know what made me think of these things right now, but they crossed my mind ... so here they are:

1.  I think it's a little strange to have the example scripts available only through svn.   (Unless I'm wrong about that.)  They are somewhat hard to get to.  But "philosophically"  we're requiring new users to download svn, while svn is something that we probably want new users to avoid.  I understand the desire to keep them out of the nuts and bolts of the distribution.  Perhaps all of them could be put in something like a zip file which could be unfurled either in site-packages or somewhere else the user desires.   (?)

2.  The Chaco tutorials are not stand-alone scripts.   They import from other scripts.  That makes them hard to follow.  I, for one, became confused when I got started and gave up on the tutorials.

3.  Some chaco examples are wx applications.  This confuses the beginner, and makes it hard for the transitional student (for example, me at that time in my education) to figure out how to make an enthought/chaco (non-wx) application.

4.  Some chaco examples import from some kind of demo framework.   It's not at all clear what that framework does, nor do the examples help to learn how to code without it.  I, for one, never figured it out.

I could probably learn a lot by making all these changes myself and "donating" them to the cause.  I'll align my head in that direction, but results won't come fast as my chaco skills are sketchy, and I'm up for tenure at the present time ...

-gary

_______________________________________________
Enthought-dev mailing list
Enthought-dev@...
https://mail.enthought.com/mailman/listinfo/enthought-dev
Dave Kammeyer | 1 Oct 06:57

Re: Comments on examples, esp. Chaco

Hi Gary,

Thanks for your comments.  We do have an examples directory, which is 
supposed to come with the eggs, however, it may be a bit difficult to 
find...

I agree with your comments about being wx applications vs. (I assume you 
mean) TraitsUI applications.  Many of those demos, and the demo 
framework were written prior to it being easy to put an Enable component 
into a TraitsUI (the ComponentEditor).  Since there was a bit of 
boilerplate code to setup a wx window and put a Chaco plot into it, we 
abstracted that out and you can see the result.  I think that the demos 
could be improved to not need this.  I believe there has been some 
effort recently here to do that, but I'm not sure of its status.

-Dave

Gary Pajer wrote:
> I don't know what made me think of these things right now, but they 
> crossed my mind ... so here they are:
>
> 1.  I think it's a little strange to have the example scripts 
> available only through svn.   (Unless I'm wrong about that.)  They are 
> somewhat hard to get to.  But "philosophically"  we're requiring new 
> users to download svn, while svn is something that we probably want 
> new users to avoid.  I understand the desire to keep them out of the 
> nuts and bolts of the distribution.  Perhaps all of them could be put 
> in something like a zip file which could be unfurled either in 
> site-packages or somewhere else the user desires.   (?)
>
> 2.  The Chaco tutorials are not stand-alone scripts.   They import 
> from other scripts.  That makes them hard to follow.  I, for one, 
> became confused when I got started and gave up on the tutorials.
>
> 3.  Some chaco examples are wx applications.  This confuses the 
> beginner, and makes it hard for the transitional student (for example, 
> me at that time in my education) to figure out how to make an 
> enthought/chaco (non-wx) application.
>
> 4.  Some chaco examples import from some kind of demo framework.   
> It's not at all clear what that framework does, nor do the examples 
> help to learn how to code without it.  I, for one, never figured it out.
>
> I could probably learn a lot by making all these changes myself and 
> "donating" them to the cause.  I'll align my head in that direction, 
> but results won't come fast as my chaco skills are sketchy, and I'm up 
> for tenure at the present time ...
>
> -gary
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Enthought-dev mailing list
> Enthought-dev@...
> https://mail.enthought.com/mailman/listinfo/enthought-dev
>   
Gael Varoquaux | 1 Oct 07:39
Favicon
Gravatar

Re: Comments on examples, esp. Chaco

On Tue, Sep 30, 2008 at 10:40:57PM -0400, Gary Pajer wrote:
>    1.  I think it's a little strange to have the example scripts available
>    only through svn.   (Unless I'm wrong about that.)  They are somewhat hard
>    to get to.  But "philosophically"  we're requiring new users to download
>    svn, while svn is something that we probably want new users to avoid.  I
>    understand the desire to keep them out of the nuts and bolts of the
>    distribution.  Perhaps all of them could be put in something like a zip
>    file which could be unfurled either in site-packages or somewhere else the
>    user desires.   (?)

Yeah, this is partly a limitation of eggs. If you get the source package
from PyPI, you'll get the examples.

Believe me, this was a hotly debated problem, and we had to resolve to
that for a purely technicaly reason.

Gaël
Aaron Digulla | 1 Oct 10:04
Favicon
Gravatar

Re: Feedback to TableEditor (Was: TabularEditor)

Quoting bryce hendrix <bhendrix@...>:

> The TabularEditor is pretty feature limited because it is based on the
> wx ListEditor. The features you are requesting should all be in the
> TableEditor. Let us know if you have any questions/suggestions.

It seems that I can't reorder table rows using the cursor keys or by  
dragging them with the mouse.

I also encountered a bug when I try to link to tables. A chapter  
contains a List(Scene). In the UI, I have two tables and I want to  
show the list of scenes in the second table when a chapter is selected  
in the first table. Here is the code:

...
     selectedChapter = Instance(Chapter, transient=True)
     scenes = Property
...
                 UIItem('object.scenes', show_label = False,
                     editor = TableEditor (...)
...
     @property_depends_on('selectedChapter')
     def _get_scenes(self):
         return [] if self.selectedChapter is None else \
                self.selectedChapter.scenes
...

When I try to run this code, I get this exception:

...
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\has_traits.py", line 2892, in on_trait_change
     listener.register( self )
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 451, in register
     value = getattr( self, type )( new, name, False )
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 678, in _register_simple
     return next.register( getattr( object, name ) )
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 362, in register
     if (new is None) or (new is Undefined) or (new in self.active):
   File "C:\prg\EPD-Python25\lib\weakref.py", line 274, in __contains__
     return wr in self.data
TypeError: list objects are unhashable

Please let me know if you need more info to track this bug down.

Regards,

--

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/
Thomas Königstein | 1 Oct 10:34
Picon

flow() mechanics

Hi all,
I'm looking for a way to plot a flow of particles. The data I have are the vectors (six arrays: three coordinates, three velocities) of many particles. I can plot them nicely with enthought.mayavi.mlab.quiver3d(), but I'd like to see a continuous flow, like the one mlab.flow() delivers.
Now, how can I achieve this? I haven't quite understood how flow() actually works. To my surprise, just testing flow() with random vectors:

from numpy import random
def r():
    return 20*(random.random((15,15,15))*0.5-1)
import enthought.mayavi.mlab as m
m.flow(r(),r(),r(),r(),r(),r())

always delivers the same picture of a quite monotone flow ( http://img507.imageshack.us/img507/5719/10012008102613xz0.png ), instead of something chaotic, what would be what I expected.
Can someone give me a hint in the right direction? Can I plot something like this: http://img402.imageshack.us/img402/8853/10012008103206ia1.png as flow at all?

Thanks in advance, cheers

Thomas

_______________________________________________
Enthought-dev mailing list
Enthought-dev@...
https://mail.enthought.com/mailman/listinfo/enthought-dev
nelson - | 1 Oct 12:44
Picon

"remote" traits

Hi all!
   I have an application that run on a server that expose a REST
interface (optionally also an XMLRPC interface). I wonder if I can use
traits and envisage to build a client application that get and edit
through trais ui objects which values are stored on the server. Which
technique i can use? I think to build a proxy object tha communicate
to the server on CRUD requests, but it must be a traits object, and i
can't figure out how to make it possible. Any suggestion?

thanks in advance,
  nelson

--

-- 
Consulenze Linux e Windows

http://nelsonenterprise.net
Aaron Digulla | 1 Oct 13:28
Favicon
Gravatar

Cached properties and lists

Hello,

I have a property which depends on traits in elements of a list. I  
want to cache this property. I tried this:

class Duration(HasTraits):
     duration = Long

class Project(HasTraits):
     duration = Property(depends_on='[durations[],durations:duration]')

     @cached_property
     def _get_duration(self):
         sum = 0.0
         for child in self.children:
             print child, child.duration
             sum += child.duration
         for d in self.durations:
             print d, d.duration
             sum += d.duration
         return sum

When I run this code, I get the exception:

Traceback (most recent call last):
   File "src\de\pdark\pytt\model.py", line 115, in <module>
     p1 = Project(name='p1')
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\has_traits.py", line 3586, in _init_trait_listeners
     getattr( self, '_init_trait_%s_listener' % data[0] )( name, *data )
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\has_traits.py", line 3618, in _init_trait_property_listener
     self.on_trait_change( pre_notify, pattern, priority = True )
   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\has_traits.py", line 2886, in on_trait_change
     listener.set( handler         = ListenerHandler( handler ),
AttributeError: 'NoneType' object has no attribute 'set'

When I remove 'durations[]', I get no exception but the property is  
not updated when durations are added to the project.

Any ideas? Is there a way to "invalidate" a cached property from an  
listener to the list?

Regards,

--

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/
Aaron Digulla | 1 Oct 15:20
Favicon
Gravatar

Exception in TreeEditor

Hello,

I'm stuck with the TreeEditor. See the attached source.

As soon as I click on a project node, I get this exception (and a huge stack):

   File  
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\ui\tree_node.py", line 473, in is_node_for
     object.has_traits_interface( *self.node_for_interface ))
AttributeError: 'TraitListObject' object has no attribute  
'has_traits_interface'

I know this is related to the trait daysList but not why. How do I  
specify the list of durations to display? I tried to use the days Dict  
directly but that isn't supported either.

Any ideas?

Regards,

--

-- 
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/
Attachment (model.py): text/x-python, 11 KiB
_______________________________________________
Enthought-dev mailing list
Enthought-dev@...
https://mail.enthought.com/mailman/listinfo/enthought-dev

Gmane