Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'importing': 0.05; 'subject:Python': 0.06; 'here?': 0.09; 'part,': 0.09; 'pil': 0.09; 'subject:modules': 0.09; 'subject:How': 0.10; 'python': 0.11; 'open()': 0.16; 'library': 0.18; 'module': 0.19; 'thanks.': 0.20; 'appears': 0.22; 'example': 0.22; 'import': 0.22; 'module,': 0.24; 'question': 0.24; 'idea': 0.28; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'img': 0.31; 'another': 0.32; 'received:google.com': 0.35; 'module.': 0.36; 'method': 0.36; 'question,': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=/Z7ej5aG4WKvlGMN5cOmbsLLiEQIuygOsCaU6/sz08E=; b=0NLysaGstl1hunTXeGbAJtVdaEoiqKDUbwpnfAogD9MLI11bfplX+qn6dHimh5DjBW okNdtwJD3V1Hm2zOluDnrhKxFiB8vOjQPdgX+JgQPj0NmMBWcgio47rL0CZ7TcG9q3QW Dxq/+cTnKzRO+/UJZRyi9oUAHIF3aoydHR7UsxaOKgVmwG+fHQAzYzoFLlbiGRsJKUkv XGfPiOmYnshVOY5b31MxOUYURhw5FWD9vu+h1gaTd48e6mbfmnV2ERIEYeADnXaOoarw Snevsi8jzVoe9kR+Vg4BFLVI0Biiv2KzWp2AnibBETPe/jJ7YzEgJYwtKOBMiAQnD3p9 /CAw== MIME-Version: 1.0 X-Received: by 10.182.92.234 with SMTP id cp10mr2621615obb.53.1416166588714; Sun, 16 Nov 2014 11:36:28 -0800 (PST) Date: Sun, 16 Nov 2014 20:36:28 +0100 Subject: How modules work in Python From: Abdul Abdul To: python-list@python.org Content-Type: multipart/alternative; boundary=001a11c305047692b70507fefae6 X-Mailman-Approved-At: Sun, 16 Nov 2014 21:20:14 +0100 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416169215 news.xs4all.nl 2883 [2001:888:2000:d::a6]:60476 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80896 --001a11c305047692b70507fefae6 Content-Type: text/plain; charset=UTF-8 Hello, 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 (PIL): 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? Thanks. --001a11c305047692b70507fefae6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I'm new to Python, and just have a = small question, and thought you might have an idea on it.

I came acr= oss the following example that uses the Python Imaging Library (PIL):
from PIL import Image
img =3D Image.open('xyz.jpg')

I k= now that PIL is a module. And, I think that Image is also a module, especia= lly 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 insid= e it?

Thanks.
--001a11c305047692b70507fefae6--