pasting statements into shell on Windows behaves differently from other IPython shells and breaks scrolling

20 views
Skip to first unread message

Rod Holland

unread,
Sep 30, 2014, 5:27:09 PM9/30/14
to ie...@googlegroups.com
When I paste a few lines of code into the shell the final input number increments in the shell but the pasted lines are only available as a block to the cursor arrow and the scrolling breaks.  Typical behavior in IPython allows for up and down scrolling of pasted lines.  Is the different IEP behavior intended?

Example:

I have 4 lines of input in the shell

In[4]  w = 6

I past in the following lines

a=1
b=2
c=3

and see

In [7] a=1
b=2
c=3

After the past I cannot the up arrow key cannot get past In[7] which shows the full block.  In other words it appears that line breaks are ignored in the past operation and scrolling cannot go back.  Is this a Windows issue?

Thanks.

 
 

Rod Holland

unread,
Sep 30, 2014, 5:36:56 PM9/30/14
to ie...@googlegroups.com
I think the issue is related to line endings

Here is some code in the editor:



except:

       print('unitc not found')

      pass


# begin equations

jst_DL = 3.8*PSF

ply_DL = 2.1*PSF

part_DL = 10.0*PSF

equip_DL = 0.5*KLF

basic_LL = 40*PSF

trib_width = 2*FT


and here it is with 'show line endings' turned on:


exc

   print('unitc not found')

  p


# begin equations

jst_DL = 3.8*P

ply_DL = 2.1*P

part_DL = 10.0*PS

equip_DL = 0.5*K

basic_LL = 40*PSF

trib_width = 2*FT

Rod Holland

unread,
Sep 30, 2014, 5:58:53 PM9/30/14
to ie...@googlegroups.com
I see now that %paste, %cpaste and %autoindent are not implemented so I guess I should not expect this to work.


On Tuesday, September 30, 2014 2:27:09 PM UTC-7, Rod Holland wrote:

Almar Klein

unread,
Oct 7, 2014, 8:54:17 AM10/7/14
to ie...@googlegroups.com
> When I paste a few lines of code into the shell the final input number
> increments in the shell but the pasted lines are only available as a
> block to the cursor arrow and the scrolling breaks. Typical behavior in
> IPython allows for up and down scrolling of pasted lines. Is the
> different IEP behavior intended?

The behavior is at least expected, although it might be improved.

Since its more common in IEP to just execute a block of lines using
Ctrl-enter (or select the lines and press F9) the support for
multi-lines in the shell itself is not very advanced.

- Almar


>
> Example:
>
> I have 4 lines of input in the shell
>
> In[4] w = 6
>
> I past in the following lines
>
> a=1
> b=2
> c=3
>
> and see
>
> In [7] a=1
> b=2
> c=3
>
> After the past I cannot the up arrow key cannot get past In[7] which
> shows the full block. In other words it appears that line breaks are
> ignored in the past operation and scrolling cannot go back. Is this a
> Windows issue?
>
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Interactive Editor for Python" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to iep_+uns...@googlegroups.com
> <mailto:iep_+uns...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages