Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81634 > unrolled thread
| Started by | MRAB <python@mrabarnett.plus.com> |
|---|---|
| First post | 2014-11-27 15:21 +0000 |
| Last post | 2014-11-27 15:21 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Where is path.py? MRAB <python@mrabarnett.plus.com> - 2014-11-27 15:21 +0000
| From | MRAB <python@mrabarnett.plus.com> |
|---|---|
| Date | 2014-11-27 15:21 +0000 |
| Subject | Re: Where is path.py? |
| Message-ID | <mailman.16368.1417101697.18130.python-list@python.org> |
On 2014-11-27 14:10, David Aldrich wrote:
> Hi
>
> I am running Python 2.7 on Windows 8.1. Today I installed path.py
> using easy_install:
>
> easy_install path.py
>
> The example code that I've seen imports path.py as follows:
>
> from path import path
>
> I am fairly new to Python and have a few questions about this:
>
> 1) Why is 'from path' required here?
>
The syntax:
from <module> import <name>
will import the name <name> from the module <module>, so:
from path import path
will import the name 'path' (a class) from the module 'path'.
> 2) I am using Microsoft's PTVS IDE to develop my code. It is not
> displaying code completion for path.py (it works for the standard
> libraries). How would I tell PTVS about path.py?
>
> Perhaps I just need to know where path.py is as I can't find it in my
> filesystem.
>
Try:
import path
print path.__file__
Back to top | Article view | comp.lang.python
csiph-web