Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #80899

Re: How modules work in Python

Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; '16,': 0.03; 'importing': 0.05; 'subject:Python': 0.06; 'here?': 0.09; 'part,': 0.09; 'pil': 0.09; 'subject:modules': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'open()': 0.16; 'wrote:': 0.18; 'library': 0.18; 'module': 0.19; 'thanks.': 0.20; 'appears': 0.22; 'example': 0.22; 'import': 0.22; 'cc:addr:python.org': 0.22; 'module,': 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'especially': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'img': 0.31; 'another': 0.32; 'url:python': 0.33; 'received:google.com': 0.35; 'module.': 0.36; 'url:listinfo': 0.36; 'method': 0.36; 'url:org': 0.36; 'nov': 0.38; 'question,': 0.38; 'pm,': 0.38; 'url:mail': 0.40; 'new': 0.61; 'offer': 0.62; 'contains.': 0.84; 'joel': 0.91; 'shell,': 0.91; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=HljR0bKmrRjwjS/f3nzHuHarHSU9dKcIbKtPa0PBFUk=; b=VE2OBdzVoA1+KPmVrMG99Zk8H+dH6FlPcDsEnRuUAx6Zp6YPYNUkkuOZSYjKy61bF+ d5jJXYgFYnGBWVpzog5stB+sHVu8GzpsXnyySEUmMLoDcbGE7tgcdGP/Efxg/yG6BoOu jMmAeKeZ664vov3udx9MQpmsY5VFfbRJ0IlLV2dDmwcNiWLUEb26fcbZhlkUGK81cuzs P9YCcFtTvyMG19aYwttzLCv49LTkQAOsrs/exfa5zzPJC8p6Vtn33i4dXuLemq+VHEPt UwcScYKWEi6sHn7qZ37rQLTN49h/YWHIFyMlv3xV5chXqfghCNWxdGhmatj6B2AX/Tko sxTQ==
MIME-Version 1.0
X-Received by 10.140.49.107 with SMTP id p98mr28309225qga.20.1416170174740; Sun, 16 Nov 2014 12:36:14 -0800 (PST)
In-Reply-To <CAA+hu4WstWquKEJ3C4AnWqbcNb5Y55G+xmywzF1hhEei9NQi=A@mail.gmail.com>
References <CAA+hu4WstWquKEJ3C4AnWqbcNb5Y55G+xmywzF1hhEei9NQi=A@mail.gmail.com>
Date Sun, 16 Nov 2014 15:36:14 -0500
Subject Re: How modules work in Python
From Joel Goldstick <joel.goldstick@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.15897.1416170182.18130.python-list@python.org> (permalink)
Lines 34
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416170182 news.xs4all.nl 2865 [2001:888:2000:d::a6]:42937
X-Complaints-To abuse@xs4all.nl
Path csiph.com!usenet.pasdenom.info!bete-des-vosges.org!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Xref csiph.com comp.lang.python:80899

Show key headers only | View raw


On Sun, Nov 16, 2014 at 2:36 PM, Abdul Abdul <abdul.sw84@gmail.com> wrote:
> 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.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

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
it contains.

-- 
Joel Goldstick
http://joelgoldstick.com

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: How modules work in Python Joel Goldstick <joel.goldstick@gmail.com> - 2014-11-16 15:36 -0500

csiph-web