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

Examples syntax (avoid errors installing on Python 3) #1595

Merged
merged 4 commits into from Apr 14, 2012

Conversation

takluyver
Copy link
Member

Installing on Python 3 attempts to byte-compile the example files for some reason (#1470), mostly just choking on print statements. This just updates the print statements. It doesn't get rid of all the errors, but it's half a dozen, rather than filling up the terminal with errors. The remainder are harder to clear up without adding an abstraction layer, which runs counter to the point of examples.

For a single argument, the brackets don't make any difference on Python 2: print(x) will work exactly like print x. Where it's called with multiple arguments, I've put from __future__ import print_function at the top of the file.

I also spotted a couple of lingering references to ipclusterz, which was the name of the new ipcluster before we dropped the old parallel framework, so I cleaned them up.

@fperez
Copy link
Member

fperez commented Apr 14, 2012

Great, thanks for doing this. I was pretty annoyed by that flood of errors last night when testing on py3, so I'm glad you went through this effort. Merging now.

fperez added a commit that referenced this pull request Apr 14, 2012
Update examples syntax to be Python3 compliant (this avoids errors when installing on Python 3, since examples don't get modified by 2to3 at installation time).
@fperez fperez merged commit 3a21b6c into ipython:master Apr 14, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Update examples syntax to be Python3 compliant (this avoids errors when installing on Python 3, since examples don't get modified by 2to3 at installation time).
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

2 participants