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

Notebook output is invisible when printing strings with \r\r\n line endings #2560

Closed
ghost opened this issue Nov 8, 2012 · 4 comments · Fixed by #2561
Closed

Notebook output is invisible when printing strings with \r\r\n line endings #2560

ghost opened this issue Nov 8, 2012 · 4 comments · Fixed by #2561
Milestone

Comments

@ghost
Copy link

ghost commented Nov 8, 2012

Some command line tools opt to use \r\r\n line endings. While the terminal and Qt console handle this with no apparent problems, the Notebook prints blank lines.

When using the Android Debug Bridge in the Notebook, you get blank lines as output, with one blank line for each actual line it should have printed. This can likely be reproduced by writing a quick script that prints a few lines with \r\r\n line endings to stdout and then run it from the Notebook.

I had a look at prettify.js, where I assume the change needs to be made, but I don't know much about regular expressions, nor JavaScript for that matter, so it was beyond me to be honest.

Thanks to Thomas for figuring out cause of the problem.

@takluyver
Copy link
Member

Looks like it's in utils.js, around line 194.
On Nov 8, 2012 9:55 PM, "Carl Smith" notifications@github.com wrote:

Some command line tools opt to use \r\r\n line endings. While the
terminal and Qt console handle this with no apparent problems, the Notebook
prints blank lines.

When using the Android Debug Bridge in the Notebook, you get blank lines
as output, with one blank line for each actual line it should have printed.
This can likely be reproduced by writing a quick script that prints a few
lines with \r\r\n line endings to stdout and then run it from the
Notebook.

I had a look at prettify.js, where I assume the change needs to be made,
but I don't know much about regular expressions, nor JavaScript for that
matter, so it was beyond me to be honest.

Thanks to Thomas for figuring out cause of the problem.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2560.

@ghost
Copy link
Author

ghost commented Nov 8, 2012

Got it. I'm just looking at it now. I still don't have a clue about regular expressions, but leave it with me. It's a pretty simple task, so I'll figure it out.

@takluyver
Copy link
Member

I think I have a fix

On 8 November 2012 23:46, Carl Smith notifications@github.com wrote:

Got it. I'm just looking at it now. I still don't have a clue about
regular expressions, but leave it with me. It's a pretty simple task, so
I'll figure it out.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2560#issuecomment-10210188.

@takluyver
Copy link
Member

Have a look at PR #2561

minrk added a commit that referenced this issue Mar 5, 2013
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant