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


Groups > comp.lang.python > #81637

Re: Where is path.py?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.073
X-Spam-Evidence '*H*': 0.86; '*S*': 0.01; 'args': 0.07; 'sys': 0.07; 'cc:addr:python-list': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'thanks.': 0.20; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'quite': 0.32; 'fri,': 0.33; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'nov': 0.38; 'name': 0.63; 'different': 0.65; 'here': 0.66; '2:30': 0.84; 'confusing': 0.84; 'subject:Where': 0.84; '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=csmLLtVoozeQ0YebvtUih2gs11PetK4RYy9jzQgcLtQ=; b=C0J/Q/oxu38qK5ed3FiJs76uE1td4bZOKHliDAd//qPkVu8MOC9hE2UHmsWVJ3SnYd eoE70pubprGphtKo8lFz7ZuqetaHzH7jGKC2O2zLsea7iMwzPH1xMAKSHkIMySO37Pva NJJ2NSjljgZ2RyNqji19YIcyf8Okb2cQi/dnNuhcJmQkHvbJHpFwska16QBg0K70gjX8 fRxCl9CxVvBkebe7A+ucXepniBjYhzcdKMt+wYYcpvSYx3EPEh32adQTlo1ZMjXA5+06 o3H/0MgzpxFYTM2jU6Hl6r4qr5QRHpyuQNiqotmtwxgaxzK66GLE9LYL7GdYBDzjkgbk bWYg==
MIME-Version 1.0
X-Received by 10.107.134.39 with SMTP id i39mr34816666iod.53.1417105092424; Thu, 27 Nov 2014 08:18:12 -0800 (PST)
In-Reply-To <41302A7145AC054FA7A96CFD03835A0A0B8FBD9D@EX10MBX02.EU.NEC.COM>
References <41302A7145AC054FA7A96CFD03835A0A0B8FBD9D@EX10MBX02.EU.NEC.COM>
Date Fri, 28 Nov 2014 03:18:12 +1100
Subject Re: Where is path.py?
From Chris Angelico <rosuav@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.16371.1417105101.18130.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1417105101 news.xs4all.nl 2905 [2001:888:2000:d::a6]:53395
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:81637

Show key headers only | View raw


On Fri, Nov 28, 2014 at 2:30 AM, David Aldrich
<David.Aldrich@emea.nec.com> wrote:
> Thanks.  But I don't quite understand.  If I use sys:
>
> import sys
>
> args = sys.argv[1:]
>
> I don't need to use 'from'.  What is different with using path?

You could instead say:

from sys import argv
args = argv[1:]

The only confusing bit here is that instead of "sys" and "argv", you
have "path" and "path", the same name twice. But it's the same thing
happening.

ChrisA

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


Thread

Re: Where is path.py? Chris Angelico <rosuav@gmail.com> - 2014-11-28 03:18 +1100

csiph-web