Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor improvements to text placement in qtconsole #1053

Merged
merged 1 commit into from Dec 6, 2011
Merged

minor improvements to text placement in qtconsole #1053

merged 1 commit into from Dec 6, 2011

Conversation

minrk
Copy link
Member

@minrk minrk commented Nov 27, 2011

  • allow before_prompt=True behavior to have effect during raw_input
  • append 'cannot restart' message before the prompt, so it doesn't
    get mixed up with input.

This isn't quite there yet. A known issue - subsequent prints during raw_input are inserted above the previous print, rather than below. While these messages do not get into the input area, they can still prevent raw_input from accepting Enter for submission or Esc for clearing. I presume the issue is simply improperly updating the prompt cursor location during raw input.

A background printer, to get stdout coming at peculiar times during input:

import threading
def printer():
    while True:
        time.sleep(1)
        print time.time()
t = threading.Thread(target=printer)
t.start()

This branch is ipython-owned, so people with more qtconsole knowledge (e.g. @epatters) are welcome to commit the parts I'm missing.

* allow `before_prompt=True` behavior to have effect during raw_input
* append 'cannot restart' message before the prompt, so it doesn't
  get mixed up with input.
@fperez
Copy link
Member

fperez commented Nov 27, 2011

This one is tied to #993, which it should help a lot with. It's definitely one of our remaining key issues before we can put 0.12 out, so any help will be greatly appreciated. Pinging @prabhuramachandran who recently contributed some improvements to the Qt code, in case you have some insights. As explained in #993, it's really easy right now to 'wedge' the qt console when taking raw input from the user, such as is the case during %debug sessions.

This PR already massively improves things, so if nothing else we'll merge it as-is. But it would be great if folks with better understanding of the Qt code spot ways to improve the situation.

@Carreau, you might also have some ideas, given your recent work on the console.

In any case, I'm just trying to ping anyone who can help us out :)

@prabhuramachandran
Copy link
Contributor

I'm afraid, with SciPy.in coming up this weekend plus end of semester craziness, I simply don't have the bandwidth to give you any sensible comments at this point. :(

@fperez
Copy link
Member

fperez commented Nov 30, 2011

No worries, Prabhu, totally understood. Have a great time at Scipy.In!

BTW, if you or your team later on have some bandwidth, you can filter the issues list to view only the Qt console issues. If you spot anything there that you can take a crack at, we'd greatly appreciate it. We don't have too much Qt expertise in the core team, so all of this rests mostly on @epatters' shoulders; it would be great to have some extra hands on those bugs.

@fperez
Copy link
Member

fperez commented Dec 6, 2011

OK, this is already such an improvement that I'm merging it. In the future we may work on a better solution, but we need this fix now.

fperez added a commit that referenced this pull request Dec 6, 2011
minor improvements to text placement in qtconsole.

This closes #993, and although it's not the long-term implementation we want, it does fix the user-facing problem pretty robustly.
@fperez fperez merged commit 2ee14fc into master Dec 6, 2011
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
minor improvements to text placement in qtconsole.

This closes ipython#993, and although it's not the long-term implementation we want, it does fix the user-facing problem pretty robustly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants