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

Name space / Package issues #13

Closed
giampaolo opened this issue May 23, 2014 · 2 comments
Closed

Name space / Package issues #13

giampaolo opened this issue May 23, 2014 · 2 comments

Comments

@giampaolo
Copy link
Owner

From billiej...@gmail.com on February 18, 2009 06:08:07

What steps will reproduce the problem?  
1. >>> import psutil
2. >>> psutil
3. <module 'psutil' from
'/usr/local/lib/python2.4/site-packages/psutil/__init__.pyc'>
4. >>> dir(psutil)
['Process', 'ProcessInfo', '__builtins__', '__doc__', '__file__',
'__name__', '__path__', '_pslinux', 'get_process_list', 'os', 'psutil',
'sys', 'test']
5. >>> psutil.psutil
<module 'psutil.psutil' from
'/usr/local/lib/python2.4/site-packages/psutil/psutil.pyc'>
6. >>> dir(psutil.psutil)
['Process', 'ProcessInfo', '__builtins__', '__doc__', '__file__',
'__name__', '_platform_impl', '_pslinux', 'get_process_list', 'os', 'sys',
'test']



Anomalies:

- step 4: 'psutil' shouldn't be there
- step 4: '_platform_impl' is missing
- step 6: '_platform_impl' is available in psutil.psutil (?)

Original issue: http://code.google.com/p/psutil/issues/detail?id=13

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 18, 2009 07:35:45

_platform_impl should not be visible since it is prefixed with an underscore 
are importing everything from psutil directory/module with "from psutil import 
which excludes "private" members.

The psutil.psutil module object is created because of the same import - the 
around it appears to be to place our code in __init__.py which I'm not all that 
of. I vote for leaving this alone for now and if we find a good reason we need 
move the code we can just move everything from psutil.py into __init__.py 
some later date.

@giampaolo
Copy link
Owner Author

From jlo...@gmail.com on February 18, 2009 09:56:23

Let's mark this as WontFix for now until/unless we need to change it someday.

Status: WontFix

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

No branches or pull requests

1 participant