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

Move plumbum.cmd hack into __init__.py #45

Merged
merged 1 commit into from
Nov 10, 2012

Conversation

agfor
Copy link

@agfor agfor commented Nov 9, 2012

I found it a bit confusing that you could

from plumbum.cmd import some_command

but you couldn't

import plumbum.cmd

I went looking at __init__.py and found it wasn't there at all, as I would expect it to be.

This patch moves the module hack into __init__.py so it can be easily found, and gives it a name (in addition to adding it to sys.modules) so it can be directly imported.

It also simplifies the code slightly, removes the hardcoded use of plumbum as the package name so that plumbum can be used as a subpackage, and allows:

plumbum.cmd["some_command"]

as local does.

tomerfiliba added a commit that referenced this pull request Nov 10, 2012
@tomerfiliba tomerfiliba merged commit f6910b7 into tomerfiliba:master Nov 10, 2012
@tomerfiliba
Copy link
Owner

thanks - it's in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants