In article ,
Thomas Rachel
wrote:
>Am 11.09.2012 05:46 schrieb Steven D'Aprano:
>>
>> Good for you. (Sorry, that comes across as more condescending than it is
>> intended as.) Monkey-patching often gets used for quick scripts and tiny
>> pieces of code because it works.
>>
>> Just beware that if
Am 11.09.2012 05:46 schrieb Steven D'Aprano:
Good for you. (Sorry, that comes across as more condescending than it is
intended as.) Monkey-patching often gets used for quick scripts and tiny
pieces of code because it works.
Just beware that if you extend that technique to larger bodies of code,
On 09/11/2012 03:13 PM, ruck wrote:
>
>
> I'm not sure how I could have known that ntpath was already imported, since
> *I* didn't import it, but that was the key to my confusion.
>
import sys
print sys.modules
--
DaveA
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Sep 12, 2012 at 5:13 AM, ruck wrote:
> I'm not sure how I could have known that ntpath was already imported, since
> *I* didn't import it, but that was the key to my confusion.
One way to find out is to peek at the cache.
>>> import sys
>>> sys.modules
There are quite a few of them in
On Tuesday, September 11, 2012 12:21:24 AM UTC-7, Tim Golden wrote:
> And so it does, but you'll notice from the MSDN docs that the \\?
> syntax must be supplied as a Unicode string, which os.listdir
> will do if you pass it a Python unicode object and not otherwise:
I was saying os.listdir doesn'
On 11/09/2012 04:46, Steven D'Aprano wrote:
> On Mon, 10 Sep 2012 15:22:05 -0700, ruck wrote:
>
>> On Monday, September 10, 2012 1:16:13 PM UTC-7, Steven D'Aprano wrote:
> [...]
>>> That's not so much a workaround as the officially supported API for
>>> dealing with the situation you are in. Why d
On Mon, 10 Sep 2012 15:22:05 -0700, ruck wrote:
> On Monday, September 10, 2012 1:16:13 PM UTC-7, Steven D'Aprano wrote:
[...]
> > That's not so much a workaround as the officially supported API for
> > dealing with the situation you are in. Why don't you just prepend a
> > '?' to paths like they
On Monday, September 10, 2012 1:16:13 PM UTC-7, Steven D'Aprano wrote:
> On Mon, 10 Sep 2012 10:25:29 -0700, ruck wrote:
>
>
>
> > In Python 2.7.2 on Windows 7,
>
> >
>
> > os.walk() uses isdir(),
>
> > which comes from os.path,
>
> > which really comes from ntpath.py,
>
> > which really c
On Mon, 10 Sep 2012 10:25:29 -0700, ruck wrote:
> In Python 2.7.2 on Windows 7,
>
> os.walk() uses isdir(),
> which comes from os.path,
> which really comes from ntpath.py,
> which really comes from genericpath.py
>
> I want os.walk() to use a modified isdir() on my Windows 7. Not knowing
> any
In Python 2.7.2 on Windows 7,
os.walk() uses isdir(),
which comes from os.path,
which really comes from ntpath.py,
which really comes from genericpath.py
I want os.walk() to use a modified isdir() on my Windows 7.
Not knowing any better, it seems to me like ntpath.py would be a good place to
int
10 matches
Mail list logo