[IPython-user] paste frustrations

Robin robince@gmail....
Tue Mar 3 11:28:07 CST 2009


Whoops - forgot to reply-all... I think this is one of the only lists
I use that doesn't set the Reply-To header in the convenient
fashion...

On Tue, Mar 3, 2009 at 5:16 PM, Ville M. Vainio <vivainio@gmail.com> wrote:
> On Tue, Mar 3, 2009 at 6:40 PM, Robin <robince@gmail.com> wrote:
>
>> This is driving me absolutely batty - I have quite a few sets like
>> this I was planning to paste in - I'd appreciate any pointers on how
>> to load this text data into an ipython variable.
>
> Use %cpaste
>
> I.e. execute %cpaste, prepend "var =", paste, teminate with --, press
> enter. Worked ok on my linux at least

Even with cpaste I am having trouble - although it helps to see what
was pasted before executing it.
I am using Ipython 0.9.1 on os x 10.5.6 (intel):

It looks like the paste is getting corrupted even before I press
return on the cpaste, notice that some lines seem to have repeated
sections.

I thought it might be my terminal (iterm), but the same clipboard
contents paste fine into vim or cat << EOF. It is just Ipython that
seems to corrupt it. Could it be a problem with readline? I'm at a bit
of a loss...

Thanks
Robin

jm-g26b101:python robince$ ipython
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.
In [1]: cpaste
Pasting code; enter '--' alone on the line to stop.
:t=[(9.3397632896727334, 3.9363354606973098, 0.42145987415439512),
:(4.3050352785735022, 1.4195870603172269, 0.32975038959207209),
(9.4448435021078865, 3.2283211725646135, 0.34180779933983252),
(30.882126959540063, 10.515646349242058, 0.34050913536554767),
(18.739584235074293, 3.4047534747807249, 0.18168778090648108),
(20.579525126121009, 4.4268172177552572, 0.21510784095481503),
(31.34455228391959, 18.473414011818477, 0.58936601947559875),
(20.533289768609372, 10.882057757768182, 0.5299714697643978),
(14.359820397468086, 5.8368810414757837, 0.40647312291628235),
(11.367475697703732, 5.5771972957869815, 0.49062759790316457),
0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390:(9.4448435021078865,
3.2283211725646135, 0.34180779933983252),
(30.882126959540063, 10.515646349242058, 0.34050913536554767),
(18.739584235074293, 3.4047534747807249, 0.18168778090648108),
(20.579525126121009, 4.4268172177552572, 0.21510784095481503),
(31.34455228391959, 18.473414011818477, 0.58936601947559875),
(20.533289768609372, 10.882057757768182, 0.5299714697643978),
(14.359820397468086, 5.8368810414757837, 0.40647312291628235),
(11.367475697703732, 5.5771972957869815, 0.49062759790316457),
0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.03900:(30.882126959540063,
10.515646349242058, 0.34050913536554767),
(18.739584235074293, 3.4047534747807249, 0.18168778090648108),
(20.579525126121009, 4.4268172177552572, 0.21510784095481503),
(31.34455228391959, 18.473414011818477, 0.58936601947559875),
(20.533289768609372, 10.882057757768182, 0.5299714697643978),
(14.359820397468086, 5.8368810414757837, 0.40647312291628235),
(11.367475697703732, 5.5771972957869815, 0.49062759790316457),
0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.039006:(18.739584235074293,
3.4047534747807249, 0.18168778090648108),
:(20.579525126121009, 4.4268172177552572, 0.21510784095481503),
:(31.34455228391959, 18.473414011818477, 0.58936601947559875),
:(20.533289768609372, 10.882057757768182, 0.5299714697643978),
(14.359820397468086, 5.8368810414757837, 0.40647312291628235),
(11.367475697703732, 5.5771972957869815, 0.49062759790316457),
0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.715:(14.359820397468086,
5.8368810414757837, 0.40647312291628235),
(11.367475697703732, 5.5771972957869815, 0.49062759790316457),
0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580:(11.367475697703732,
5.5771972957869815, 0.49062759790316457),
:0,
(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.73755568314,
0.28060308946654944, 0.069996930041681948),
(:(6.5625172603511981, 1.4390827251477329, 0.21928821945235072),
:(5.5232685575496694, 0.60728243672534921, 0.10994982959777765),
:(9.3364031694382916, 4.0086578680815759, 0.42935783677417505),
(8.7408042963826933, 3.578152379722475, 0.40936191434960545),
(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.73755568314,
0.28060308946654944, 0.069996930041681948),
(65.389003180764703, 35.759200008054641, 0.54686871291186501),
(33.506564308941947, 12.385866499981992, 0.36965492450315346),
(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.3513771:(8.7408042963826933,
3.578152379722475, 0.40936191434960545),
:(27.485132774718977, 15.478069029050486, 0.56314332391682398),
(24.792903957879819, 14.349510209139623, 0.57877488790815823),
(14.039765307262702, 7.167404238714524, 0.51050741104674024),
0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.73755568314,
0.28060308946654944, 0.069996930041681948),
(65.389003180764703, 35.759200008054641, 0.54686871291186501),
(33.506564308941947, 12.385866499981992, 0.36965492450315346),
(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.3262591456,
14.409814668841014, 0.60169782483395906),
(21.45554987(21.45554987(21.45554987(21.45554987(21.45554987(21.4:(24.792903957879819,
14.349510209139623, 0.57877488790815823),
:(14.039765307262702, 7.167404238714524, 0.51050741104674024),
:0,
(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900162(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
(39.788522838248298, 20.203407627511119, 0.50776973323799268),
(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.73755568314,
0.28060308946654944, 0.069996930041681948),
(65.389003180764703, 35.759200008054641, 0.54686871291186501),
(33.506564308941947, 12.385866499981992, 0.36965492450315346),
(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.3262591456,
14.409814668841014, 0.60169782483395906),
(21.45554987(21.45554987(21.45554987(21.45554987(21.45554987(21.455549872623060136,
0.93628956064527102, 0.12805136103538389),
(10.137961511411733, 4.1828046135742589, 0.41258833039225012),
(2.4:(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.03900160390068618(7.0390068618(7.0390068618(7.0390068618(7.03900139(7.0390068618(7.0390068618(7.0390068618(7.0390068618(7.0390006897342,
3.2115148434520981, 0.29714170902525072),
:(39.788522838248298, 20.203407627511119, 0.50776973323799268),
:(7.5698440273147698, 1.9733857538581103, 0.2606904114189687),
:(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.995(5.71580794778(5.71580794778(5.71580794778(5.71580794778(5.73755568314,
0.28060308946654944, 0.069996930041681948),
:(65.389003180764703, 35.759200008054641, 0.54686871291186501),
:(33.506564308941947, 12.385866499981992, 0.36965492450315346),
:(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.35137713626(3.3262591456,
14.409814668841014, 0.60169782483395906),
:(21.45554987(21.45554987(21.45554987(21.45554987(21.45554987(21.455549872623060136,
0.93628956064527102, 0.12805136103538389),
:(10.137961511411733, 4.1828046135742589, 0.41258833039225012),
:(2.4745388769850183, 0.55557321962034234, 0.2245158582019344),
:(5.8985074093837104, 0.49624072527001289, 0.084129880803499951),
:(22.754193459628247, 11.799637880699656, 0.51856981446673678)]
:


More information about the IPython-user mailing list