Support running directories with __main__.py files. Closes #9812 #9813

Merged
merged 1 commit into from Jul 26, 2016

Projects

None yet

2 participants

@controversial
Contributor

Note that this does not add support running zip files via the same mechanism, which the python executable does support.

@controversial controversial Support running directories with __main__.py files
Note that this does not support running zip files.
5752257
@takluyver takluyver commented on the diff Jul 26, 2016
IPython/core/shellapp.py
@@ -100,7 +100,7 @@
class InteractiveShellApp(Configurable):
"""A Mixin for applications that start InteractiveShell instances.
-
+
@takluyver
takluyver Jul 26, 2016 Member

Not a big deal, but if you're contributing to IPython/Jupyter more in the future, we will ask you to configure your editor not to strip whitespace in lines you haven't touched - it can create needless merge conflicts, and it makes git blame less useful.

@controversial
controversial Jul 26, 2016 Contributor

Sorry! I didn’t even notice Atom did that on save. If I contribute more in
the future I’ll fix that.

On Tue, Jul 26, 2016 at 4:24 PM Thomas Kluyver notifications@github.com
wrote:

In IPython/core/shellapp.py
#9813 (comment):

@@ -100,7 +100,7 @@

class InteractiveShellApp(Configurable):

"""A Mixin for applications that start InteractiveShell instances.

Not a big deal, but if you're contributing to IPython/Jupyter more in the
future, we will ask you to configure your editor not to strip whitespace in
lines you haven't touched - it can create needless merge conflicts, and it
makes git blame less useful.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ipython/ipython/pull/9813/files/57522575ad2a69eaa7a931f98221b758d787fd74#r72329425,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ5Yr3y6_sBxQNFmFcDYKfSgPZLIlAF_ks5qZmzsgaJpZM4JVivP
.

@controversial
controversial Jul 26, 2016 Contributor

@takluyver Should I fix this now or just in the future?

@takluyver
takluyver Jul 26, 2016 Member

No worries - Atom's behaviour is a sensible default for new files, but a bit annoying for big codebases like this with trailing whitespace already there. We'll live with it for this PR.

@takluyver
Member

And I think the actual fix looks good; thanks!

@takluyver takluyver added this to the 5.1 milestone Jul 26, 2016
@takluyver takluyver merged commit c0bff86 into ipython:master Jul 26, 2016
@controversial
Contributor

Awesome! Glad I helped. Maybe I'll tackle zip archives later, I'll see. I don't actually need that behavior, though, so I probably won't.

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