How modules work in Python
joel.goldstick at gmail.com
Sun Nov 16 21:36:14 CET 2014
On Sun, Nov 16, 2014 at 2:36 PM, Abdul Abdul <abdul.sw84 at gmail.com> wrote:
> I'm new to Python, and just have a small question, and thought you might
> have an idea on it.
> I came across the following example that uses the Python Imaging Library
> from PIL import Image
> img = Image.open('xyz.jpg')
> I know that PIL is a module. And, I think that Image is also a module,
> especially we are importing it.
> I also understood the Image,open() part, as it appears we are using the
> method open() from the Image module.
> My question is, where did PIL go here? Can a module have another module
> inside it?
You can learn what PIL has to offer by going into the python
interactive shell, and import PIL . Then type help(PIL) to learn what
More information about the Python-list