Dave Jones added the comment:

Hello Ian.
Thank you for the reply.

As I imagine you understand, I delete the "time.pyc" file every time it comes 
back.

That being said, there *is* a "time.py" script in there from some testing I was 
doing:

[jonesda0@toshiba pycode]$ ls -1tr *.py* | egrep "sp|time"
time.py
time2.py
test-sp.py
sp.py
--------------------------------------------
[jonesda0@toshiba pycode]$ cat time.py
i = 0
j = 0

while (i < 100000000):
    # i = i + 1
    i+=1
    # j = j + 1
    j+=1

print j

--------------------------

[jonesda0@toshiba pycode]$ python sp.py
100000000
Done.......
[jonesda0@toshiba pycode]$ ls -1tr *.py* | egrep "sp|time"
time.py
time2.py
test-sp.py
sp.py
time.pyc

------------------------------
I am not calling any sort of "time.py" anywhere:
[jonesda0@toshiba pycode]$ cat sp.py  ## still took about 25 seconds

import subprocess

print ("Done.......")
------------------------------

So where does this behavior come from?

[jonesda0@toshiba pycode]$ cat time.pyc  ## There is all sorts of Escape code 
in the file, obviously.

���Pc@s<dZdZx$edkr2ed7Zed7ZqWeGHdS(ii��iN(titj(((s/home/jonesda0/pycode/time.py<module>s

[jonesda0@toshiba pycode]$ file time.pyc
time.pyc: python 2.7 byte-compiled
[jonesda0@toshiba pycode]$ 


---------------------------------

[jonesda0@toshiba pycode]$ rm -f time.pyc
[jonesda0@toshiba pycode]$ mv time.py time.py.bad
[jonesda0@toshiba pycode]$ time python sp.py
Done.......

real    0m0.027s
user    0m0.021s
sys     0m0.005s

[jonesda0@toshiba pycode]$ ls -1tr *.py* | egrep "sp|time"
time.py.bad
time2.py
test-sp.py
sp.py

--------------------------
Your hypothesis is clearly accurate, but my question is now *WHY*?
I was in no way calling a python time function or time.py, it just happened to 
be in the directory!

Thanks

----------

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

Reply via email to