qtconsole : allow copy with shortcut in pager #1091

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
2 participants
@Carreau
Member

Carreau commented Dec 3, 2011

closes #1088

Carreau added some commits Dec 3, 2011

qtconsole --pure, avoid 'user_expression'
	'user_expression' does not exist with --pure, be more carefull..
@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Dec 3, 2011

Member

I also added a little fix that avoid some error message when trying qtconsole with --pure as there won't be user_expressionin message comming from the kernel.

Actually I suspect that some of the gui menu of qtconsole might be broken with --pure

Member

Carreau commented Dec 3, 2011

I also added a little fix that avoid some error message when trying qtconsole with --pure as there won't be user_expressionin message comming from the kernel.

Actually I suspect that some of the gui menu of qtconsole might be broken with --pure

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Dec 3, 2011

Member

note that we might want to add a warning in the docstring of
console/console_widget.py: def can_copy(self):
Or change the implementation to check wether or not it returns true if selected text is in the pager...

Which way you think is the best ?

Member

Carreau commented Dec 3, 2011

note that we might want to add a warning in the docstring of
console/console_widget.py: def can_copy(self):
Or change the implementation to check wether or not it returns true if selected text is in the pager...

Which way you think is the best ?

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 4, 2011

Member

@Carreau - you are right, there are probably quite a few things broken in pure mode. I wish we would remove it, because nobody ever tests it, and there are huge amounts of duplicate code that typically are not updated in tandem with every change.

Member

minrk commented Dec 4, 2011

@Carreau - you are right, there are probably quite a few things broken in pure mode. I wish we would remove it, because nobody ever tests it, and there are huge amounts of duplicate code that typically are not updated in tandem with every change.

+ if text:
+ lines = map(transform_ipy_prompt, text.splitlines())
+ text = '\n'.join(lines)
+ QtGui.QApplication.clipboard().setText(text)

This comment has been minimized.

@minrk

minrk Dec 4, 2011

Member

Let's make 'transform_prompt` a widget trait (should be transform_classic_prompt in FrontendWidget, and transform_ipy_prompt in IPythonWidget), then we shouldn't have to override copy() in IPythonWidget at all.

@minrk

minrk Dec 4, 2011

Member

Let's make 'transform_prompt` a widget trait (should be transform_classic_prompt in FrontendWidget, and transform_ipy_prompt in IPythonWidget), then we shouldn't have to override copy() in IPythonWidget at all.

This comment has been minimized.

@Carreau

Carreau Dec 5, 2011

Member

I'm not quite comfortable with trait , I can give a shot, bu you'll probably be done before I read enough to do it the right way.

@Carreau

Carreau Dec 5, 2011

Member

I'm not quite comfortable with trait , I can give a shot, bu you'll probably be done before I read enough to do it the right way.

This comment has been minimized.

@minrk

minrk Dec 5, 2011

Member

Sorry, it can just be a class attribute. The traitness is unimportant.

@minrk

minrk Dec 5, 2011

Member

Sorry, it can just be a class attribute. The traitness is unimportant.

@minrk

This comment has been minimized.

Show comment
Hide comment
@minrk

minrk Dec 6, 2011

Member

When doing ipython qtconsole --pylab --paging vsplit, and do plot?, I cannot actually copy anything out of the pager area. So it would appear that this does not do what it claims, unless I am mistaken.

Member

minrk commented Dec 6, 2011

When doing ipython qtconsole --pylab --paging vsplit, and do plot?, I cannot actually copy anything out of the pager area. So it would appear that this does not do what it claims, unless I am mistaken.

@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Dec 6, 2011

Member

hum... I didn't thought of vsplit. I'll take a look.

Member

Carreau commented Dec 6, 2011

hum... I didn't thought of vsplit. I'll take a look.

copy pager also hsplit, vsplit
	check which of the two widget have focus to know from which to copy
@Carreau

This comment has been minimized.

Show comment
Hide comment
@Carreau

Carreau Dec 7, 2011

Member

@minrk,
this seem to work with hsplit/vsplit and without splitter

Member

Carreau commented Dec 7, 2011

@minrk,
this seem to work with hsplit/vsplit and without splitter

@minrk minrk closed this in 7a144e2 Dec 7, 2011

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment