an email to iep_+unsubscribe@googlegroups.com
<mailto:iep_+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iep_+unsubscribe@googlegroups.com.
Hey, I run it, and it said no sleep module, so I deleted that line, and then it said no time module, so I imported time. Here's the version of the program I ran:
import os
import time
# Simulate saving a file in IEP
filename = 'Try2.py'
with open(filename, 'wb') as f:
f.write(b'x' * 100)
# Right after saving, IEP gets the mtime
mtime1 = os.path.getmtime(filename)
# A little while later, at focusInEvent, IEP gets mtime again
time.sleep(1.0)
mtime2 = os.path.getmtime(filename)
print(mtime1 == mtime2, mtime1, mtime2)
This are the results I get in Python3:
True 1415123757.5311644 1415123757.5311644
True 1415123868.7713225 1415123868.7713225
True 1415123871.9274006 1415123871.9274006
True 1415123879.8203368 1415123879.8203368
True 1415123887.7792277 1415123887.7792277
True 1415124396.5326853 1415124396.5326853
True 1415124405.4936879 1415124405.4936879
True 1415124411.9678059 1415124411.9678059
I tried looking for sleep module, but couldn't find it. Also, There's no Dropbox.
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iep_+uns...@googlegroups.com.
Interesting. IEP uses ``os.path.getmtime(filename)`` to establish modification times. It stores that time-value right after saving. Maybe there is some sort of synchronisation issue, where getmtime actually gets the value from *before* the save.
Does the message occur when you want to save, or right after saving? i.e. is the save successful?
- Almar
On 03-11-14 20:35, godi...@gmail.com wrote:
Hey, I'm editing a file that is saved in a virtual drive (and has to be,
for testing purposes).
every time I make a change to it and save, I get the message:
File has been modified outside of the editor:
F:/....
Do you want to reload?
I've attached a screenshot. This is incessant - how do I stop it?
--
You received this message because you are subscribed to the Google
Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to iep_+unsubscribe@googlegroups.com
<mailto:iep_+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iep_+unsubscribe@googlegroups.com.
True 1415182708.0 1415182708.0
True 1415182708.0 1415182708.0
True 1415182713.0 1415182713.0
And for the second code:
import os
import time
# Simulate saving a file in IEP
filename = 'F:\TRY1'
with open(filename, 'wb') as f:
f.write(b'x' * 100)
# Check directly after saving
mtime1 = os.path.getmtime(filename)
# Check for a while
etime = time.time() + 10.0
while time.time() < etime:
mtime2 = os.path.getmtime(filename)
assert mtime1 == mtime2
print('all is fine')
On the first run of a certain filename it gives back all is fine, but on the second (and third, fourth,etc.) of a same filename (e.g. 'F:\TRY1') it returns:
Traceback (most recent call last):
File "<tmp 3>", line 16, in <module>
assert mtime1 == mtime2
AssertionError
Interesting. IEP uses ``os.path.getmtime(filename)`` to establish modification times. It stores that time-value right after saving. Maybe there is some sort of synchronisation issue, where getmtime actually gets the value from *before* the save.
Does the message occur when you want to save, or right after saving? i.e. is the save successful?
- Almar
On 03-11-14 20:35, godi...@gmail.com wrote:
Hey, I'm editing a file that is saved in a virtual drive (and has to be,
for testing purposes).
every time I make a change to it and save, I get the message:
File has been modified outside of the editor:
F:/....
Do you want to reload?
I've attached a screenshot. This is incessant - how do I stop it?
--
You received this message because you are subscribed to the Google
Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to iep_+unsubscribe@googlegroups.com
<mailto:iep_+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iep_+unsubscribe@googlegroups.com.
all is fine
>>> (executing lines 1 to 20 of "<tmp 1>")
Traceback (most recent call last):
File "<tmp 1>", line 18, in <module>
raise RuntimeError('File modified after %f seconds' % (time.time()-starttime))
RuntimeError: File modified after 1.173440 seconds
from here I'll give you just the last line
RuntimeError: File modified after 1.033213 seconds
RuntimeError: File modified after 1.017766 seconds
RuntimeError: File modified after 1.144906 seconds
RuntimeError: File modified after 1.047736 second
an email to iep_+unsubscribe@googlegroups.__com
<mailto:iep_%2Bunsubscribe@googlegroups.com>
<mailto:iep_+unsubscribe@__googlegroups.com
<mailto:iep_%2Bunsubscribe@googlegroups.com>>.
For more options, visit https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to a topic in
the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/__topic/iep_/oonWVuTXfPs/__unsubscribe
<https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe>.
To unsubscribe from this group and all its topics, send an email to
iep_+unsubscribe@googlegroups.__com
<mailto:iep_%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to iep_+unsubscribe@googlegroups.com
<mailto:iep_+unsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iep_+unsubscribe@googlegroups.com.
<mailto:iep_%252Bunsubscribe@googlegroups.com>>
<mailto:iep_+unsubscribe@
<mailto:iep_%2Bunsubscribe@>__goo__glegroups.com
<http://googlegroups.com>
<mailto:iep_%2Bunsubscribe@__googlegroups.com
<mailto:iep_%252Bunsubscribe@googlegroups.com>>>.
For more options, visit
https://groups.google.com/d/____optout
<https://groups.google.com/d/__optout>
<https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>>.
--
You received this message because you are subscribed to a
topic in
the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/____topic/iep_/oonWVuTXfPs/____unsubscribe
<https://groups.google.com/d/__topic/iep_/oonWVuTXfPs/__unsubscribe>
<https://groups.google.com/d/__topic/iep_/oonWVuTXfPs/__unsubscribe
<https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe>>.
To unsubscribe from this group and all its topics, send an
email to
iep_+unsubscribe@googlegroups.____com
<mailto:iep_%2Bunsubscribe@__googlegroups.com
<mailto:iep_%252Bunsubscribe@googlegroups.com>>.
For more options, visit
https://groups.google.com/d/____optout
<https://groups.google.com/d/__optout>
<https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>>.
--
You received this message because you are subscribed to the Google
Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from
it, send
an email to iep_+unsubscribe@googlegroups.__com
<mailto:iep_%2Bunsubscribe@googlegroups.com>
<mailto:iep_+unsubscribe@__googlegroups.com
<mailto:iep_%2Bunsubscribe@googlegroups.com>>.
For more options, visit https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to a topic in
the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/__topic/iep_/oonWVuTXfPs/__unsubscribe
<https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe>.
To unsubscribe from this group and all its topics, send an email to
iep_+unsubscribe@googlegroups.__com
<mailto:iep_%2Bunsubscribe@googlegroups.com>.
For more options, visit https://groups.google.com/d/__optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Interactive Editor for Python" group.
To unsubscribe from this group and stop receiving emails from it, send
--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Editor for Python" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iep_/oonWVuTXfPs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iep_+unsubscribe@googlegroups.com.