Aaron added the comment:

Interesting. It continues to reuse the last one's stats once the path is no
longer valid.

>>> bak_path = r"C:\Users\EAARHOS\Desktop\Python Review\baseExcel.py"
>>> print(os.stat(bak_path))
nt.stat_result(st_mode=33206, st_ino=8162774324652726, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=29874, st_atime=1413389016,
st_mtime=1413389016, st_ctime=1413388655)
>>> bak_path += '.bak'
>>> print(os.stat(bak_path))
nt.stat_result(st_mode=33206, st_ino=42502721483352490, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=29999, st_atime=1413389088,
st_mtime=1413389088, st_ctime=1413388654)
>>> bak_path += '.bak'
>>> print(os.stat(bak_path))
nt.stat_result(st_mode=33206, st_ino=42502721483352490, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=29999, st_atime=1413389088,
st_mtime=1413389088, st_ctime=1413388654)
>>> bak_path += '.bak'
>>> print(os.stat(bak_path))
nt.stat_result(st_mode=33206, st_ino=42502721483352490, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=29999, st_atime=1413389088,
st_mtime=1413389088, st_ctime=1413388654)
>>> bak_path += '.bak'
>>> print(os.stat(bak_path))
nt.stat_result(st_mode=33206, st_ino=42502721483352490, st_dev=0,
st_nlink=1, st_uid=0, st_gid=0, st_size=29999, st_atime=1413389088,
st_mtime=1413389088, st_ctime=1413388654)
>>>

On Fri, Oct 24, 2014 at 1:49 PM, eryksun <rep...@bugs.python.org> wrote:

>
> eryksun added the comment:
>
> What do you get for os.stat?
>
>     bak_path = r"C:\Users\EAARHOS\Desktop\Python Review\baseExcel.py"
>     print(os.stat(bak_path))
>     bak_path += '.bak'
>     print(os.stat(bak_path))
>     bak_path += '.bak'
>     print(os.stat(bak_path)) # This should raise FileNotFoundError
>
> ----------
> nosy: +eryksun
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue22719>
> _______________________________________
>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22719>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to