Prabhu Ramachandran | 1 Nov 11:34 2005
Picon

Re: [Envisage-dev] bindings & naming contexts

>>>>> "David" == David C Morrill <dmorrill@...> writes:

    David> Martin Chilvers wrote:
    >> Howdee Peter ...  I still think that 'Binding's should be
    >> passed around more than they are since they are really what our
    >> notion of a resource is - basically a name coupled with some
    >> object.  Of course we should probablt hide the naming system
    >> implementation and create a subclass of binding called, I
    >> dunno, Resource ;^)

    David> To that end I added a Naming trait a while back that is
    David> basically a mapped trait...the value is the fully qualified
    David> Naming name, and the mapped value is the corresponding
    David> object. We are using that trait at several places in the
    David> Converge app...

Hmm, could someone kindly explain what bindings, names and the naming
system and resources are and how they should be used?

Thanks.
Prabhu

Peter Wang | 2 Nov 00:52 2005

Re: [Envisage-dev] enthon 1077 missing readline

Rick Ratzel wrote:
>  Peter, until this is fixed you can set your PYTHONPATH to find win32con:
> Z:\>set PYTHONPATH=c:\Python23_1077\lib\site-packages\win32\lib

I just realized... this seems to disable Ctrl-Z exiting from the shell.  You 
now have to use Ctrl-D, even though the help at the prompt says "Use Ctrl-Z 
plus Return to exit."

-Peter

Martin Chilvers | 2 Nov 16:13 2005

Re: [Envisage-dev] bindings & naming contexts

Hi Prabhu,

>     David> Martin Chilvers wrote:
>     >> Howdee Peter ...  I still think that 'Binding's should be
>     >> passed around more than they are since they are really what our
>     >> notion of a resource is - basically a name coupled with some
>     >> object.  Of course we should probablt hide the naming system
>     >> implementation and create a subclass of binding called, I
>     >> dunno, Resource ;^)
> 
>     David> To that end I added a Naming trait a while back that is
>     David> basically a mapped trait...the value is the fully qualified
>     David> Naming name, and the mapped value is the corresponding
>     David> object. We are using that trait at several places in the
>     David> Converge app...
> 
> Hmm, could someone kindly explain what bindings, names and the naming
> system and resources are and how they should be used?

The Converge application has the notion of a 'workspace' which is 
basically hierarchical and persistent storage very much like a file 
system (in fact the actual implementation that we use *is* the file 
system!).  Under the covers we have implemented the workspace using a 
generic  naming system interface in the spirit of X/Open XFN and Java 
JNDI (we ripped the API off of JNDI mostly).

For a good intro to naming systems, bindings, names etc Google for JNDI 
or naming etc.

We use the workspace in the Converge app to give the user the notion of 
(Continue reading)

Peter Wang | 3 Nov 00:45 2005

Re: [Envisage-dev] enthon 1077 missing readline

Peter Wang wrote:
> 
> I just realized... this seems to disable Ctrl-Z exiting from the shell.  
> You now have to use Ctrl-D, even though the help at the prompt says "Use 
> Ctrl-Z plus Return to exit."
> 

Also, Tab no longer works (to just insert a tab), and up/down arrow keys no 
longer go through the previous python history.  Maybe I shouldn't have 
listened to rick, after all...

-peter

Rick Ratzel | 3 Nov 01:37 2005

Re: [Envisage-dev] enthon 1077 missing readline


   up/down arrows work for me...aren't those the lay-person's CTRL-p CTRL-n?
CTRL-p and CTRL-n work though, right?

   This works for me for TAB:

import readline
readline.parse_and_bind( "tab: tab-insert" )

>   Date: Wed, 02 Nov 2005 17:45:28 -0600
>   From: Peter Wang <pwang@...>
>
>   Peter Wang wrote:
>   > 
>   > I just realized... this seems to disable Ctrl-Z exiting from the shell.  
>   > You now have to use Ctrl-D, even though the help at the prompt says "Use 
>   > Ctrl-Z plus Return to exit."
>   > 
>
>   Also, Tab no longer works (to just insert a tab), and up/down arrow keys no 
>   longer go through the previous python history.  Maybe I shouldn't have 
>   listened to rick, after all...
>
>
>   -peter

--

-- 
Rick Ratzel - Enthought, Inc.
515 Congress Avenue, Suite 2100 - Austin, Texas 78701
512-536-1057 x229 - Fax: 512-536-1059
(Continue reading)

Joe Cooper | 4 Nov 06:07 2005

Re: [Envisage-dev] enthon 1077 missing readline

Shall I modify something in the installer to make defaults more sensible?

We can also probably fix the prompt so it informs people that Ctrl-D is 
the EOF signal.  As you all may know, Ctrl-D is the One True 
End-Of-File, and all others are imposters...Ctrl-Z+Enter is an 
abomination and those preferring it shall be banished.

Ok, actually I don't care one way or the other, but I don't know how to 
change it...the pure python readline that we have to have for ipython to 
work right is a GNU readline emulator, so it acts like GNU readline in 
most ways.  I don't know how to change it to work in the Windows-ish way 
of the standard Python prompt minus readline.  Rick seems to be a 
limitless font of knowledge on this subject (as always)...Any ideas?

Rick Ratzel wrote:
>    up/down arrows work for me...aren't those the lay-person's CTRL-p CTRL-n?
> CTRL-p and CTRL-n work though, right?
> 
>    This works for me for TAB:
> 
> import readline
> readline.parse_and_bind( "tab: tab-insert" )
> 
> 
> 
>>  Date: Wed, 02 Nov 2005 17:45:28 -0600
>>  From: Peter Wang <pwang@...>
>>
>>  Peter Wang wrote:
>>  > 
(Continue reading)

Fernando Perez | 4 Nov 05:12 2005
Picon

Re: [Envisage-dev] enthon 1077 missing readline

Joe Cooper wrote:
> Shall I modify something in the installer to make defaults more sensible?
> 
> We can also probably fix the prompt so it informs people that Ctrl-D is 
> the EOF signal.  As you all may know, Ctrl-D is the One True 
> End-Of-File, and all others are imposters...Ctrl-Z+Enter is an 
> abomination and those preferring it shall be banished.
> 
> Ok, actually I don't care one way or the other, but I don't know how to 
> change it...the pure python readline that we have to have for ipython to 
> work right is a GNU readline emulator, so it acts like GNU readline in 
> most ways.  I don't know how to change it to work in the Windows-ish way 
> of the standard Python prompt minus readline.  Rick seems to be a 
> limitless font of knowledge on this subject (as always)...Any ideas?

I'm not sure what combination you folks are using, b/c ipython itself does 
indicate that Ctrl-D is the exit combo, even under win32:

             # Platform-specific configuration
             if os.name == 'nt':
                 # readline under Windows modifies the default exit behavior
                 # from being Ctrl-Z/Return to the Unix Ctrl-D one.
                 __builtin__.exit = __builtin__.quit = \
                      ('Use Ctrl-D (i.e. EOF) to exit. '
                       'Use %Exit or %Quit to exit without confirmation.')
                 self.readline_startup_hook = readline.set_pre_input_hook
             else:
                 self.readline_startup_hook = readline.set_startup_hook

So I imagine that your problem is that you are pulling in readline but not 
(Continue reading)

Joe Cooper | 4 Nov 07:31 2005

Re: [Envisage-dev] enthon 1077 missing readline

Hey Fernando,

We're on the subject of the standard Python prompt at the moment.  When 
readline is installed, it picks up a Linux-ish set of behaviors, and 
Peter was whining about it.  Your stuff is fine.

Fernando Perez wrote:
> Joe Cooper wrote:
> 
>> Shall I modify something in the installer to make defaults more sensible?
>>
>> We can also probably fix the prompt so it informs people that Ctrl-D 
>> is the EOF signal.  As you all may know, Ctrl-D is the One True 
>> End-Of-File, and all others are imposters...Ctrl-Z+Enter is an 
>> abomination and those preferring it shall be banished.
>>
>> Ok, actually I don't care one way or the other, but I don't know how 
>> to change it...the pure python readline that we have to have for 
>> ipython to work right is a GNU readline emulator, so it acts like GNU 
>> readline in most ways.  I don't know how to change it to work in the 
>> Windows-ish way of the standard Python prompt minus readline.  Rick 
>> seems to be a limitless font of knowledge on this subject (as 
>> always)...Any ideas?
> 
> 
> I'm not sure what combination you folks are using, b/c ipython itself 
> does indicate that Ctrl-D is the exit combo, even under win32:
> 
>             # Platform-specific configuration
>             if os.name == 'nt':
(Continue reading)

Fernando Perez | 4 Nov 06:35 2005
Picon

Re: [Envisage-dev] enthon 1077 missing readline

Joe Cooper wrote:
> Hey Fernando,
> 
> We're on the subject of the standard Python prompt at the moment.  When 
> readline is installed, it picks up a Linux-ish set of behaviors, and 
> Peter was whining about it.  Your stuff is fine.

That's what I figured.  I was trying to point out a simple way to make the 
exit message be correctly displayed: you need to rewrite 
__builtin__.exit/quit, which is where python stores that message.

Sorry if I wasn't clear.

Cheers,

f

Joe Cooper | 4 Nov 07:57 2005

Re: [Envisage-dev] enthon 1077 missing readline

Hey Fernando,

While I've got you handy...I'm getting the following on Linux:

WARNING: Readline services not available on this platform.
WARNING: The auto-indent feature requires the readline library

Does that mean we need the pure Python readline, even though we have 
real GNU readline on the Linux system, or am I missing something else?

(It also has garbage output on the prompt, but I'll tackle that after 
this error is understood.)


Gmane