With this simple module:
#!/usr/bin/python
#file: foo.py
import ctypes
class Foo(ctypes.Structure):
pass
In iPython:
In [1]: import foo
In [2]: foo.
Foo
ctypes
ctypes
is a module used inside the module foo
, it should not be shown to the user. The goal is to hide ctypes
from the auto-completion offered by ipython
Is this solution too cumbersome?
import ctypes as __ctypes