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


Groups > comp.lang.python > #81637

Re: Where is path.py?

References <41302A7145AC054FA7A96CFD03835A0A0B8FBD9D@EX10MBX02.EU.NEC.COM>
Date 2014-11-28 03:18 +1100
Subject Re: Where is path.py?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.16371.1417105101.18130.python-list@python.org> (permalink)

Show all headers | 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