[traits] ShellEditor issue...

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

[traits] ShellEditor issue...

fred-2
Hi all,

In the following CME, how can I have independant python shells?

self.name is the same for all python shells, for instance.
And I don't want this.

TIA.


Cheers,

--
Fred

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

tabbed_shell_traits.py (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [traits] ShellEditor issue...

Didrik Pinte-2

On 15 Feb 2011, at 16:02, Fred wrote:

> Hi all,
>
> In the following CME, how can I have independant python shells?
>
> self.name is the same for all python shells, for instance.

You mean the name attribute of the ControlPanel ?

> And I don't want this.


It is not the case. What you see is not the full name because of the width of the editor.

 view = View(
        HGroup(Item('add_button', show_label=False)),
        Item('nb_tabs',    style='readonly'),
        Item('name',       style='readonly', width=100)
    )

Adding a width to the Item('name') solves the issue.

-- Didrik



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

Re: [traits] ShellEditor issue...

fred-2
Le 15/02/2011 17:48, Didrik Pinte a écrit :

>
> On 15 Feb 2011, at 16:02, Fred wrote:
>
>> Hi all,
>>
>> In the following CME, how can I have independant python shells?
>>
>> self.name is the same for all python shells, for instance.
>
> You mean the name attribute of the ControlPanel ?
Mmmh, please look at the two snapshots attached.

self.name is equal to 'foo1' in both case.

In tab foo0, it should be equal to foo0, not foo1.


Another example.

If you set a = 2 in the first tab, a is also known in the second tab.

--
Fred

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

snapshot1.png (30K) Download Attachment
snapshot2.png (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [traits] ShellEditor issue...

Didrik Pinte-2

On 15 Feb 2011, at 18:35, Fred wrote:

> Le 15/02/2011 17:48, Didrik Pinte a écrit :
>>
>> On 15 Feb 2011, at 16:02, Fred wrote:
>>
>>> Hi all,
>>>
>>> In the following CME, how can I have independant python shells?
>>>
>>> self.name is the same for all python shells, for instance.
>>
>> You mean the name attribute of the ControlPanel ?
> Mmmh, please look at the two snapshots attached.
>

Got it. Strange behaviour. I can replicate it. Trying to understand what happens.

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

Re: [traits] ShellEditor issue...

fred-2
In reply to this post by fred-2
Hi all,

Is anybody has any news about this issue:

https://mail.enthought.com/pipermail/enthought-dev/2011-February/028459.html

Moerover, I would like to have some NumPy functions defined in my python
shell (like isnan, array, etc...).

How could I do that, without typing in the shell editor "from numpy
import..." each time I raise the editor UI?

TIA


Cheers,

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