file changed on disk

30 views
Skip to first unread message

josef...@gmail.com

unread,
Apr 28, 2012, 7:03:36 AM4/28/12
to spyd...@googlegroups.com
I'm using eclipse with pydev as my second editor especially when
working on a larger project.

Does spyder check whether a file that is in the editor has been changed on disk?

My impression (no systematic check) is that spyder does not do it. I'm
still on spyder 2.1.7 and I started to avoid having the same files
open in several editors.
In the thread on syntax highlighting partial file loading was
mentioned, which seems to me might make the problem worse if several
editors access the same file on disk.

Thanks,

Josef

Pierre Raybaut

unread,
Apr 28, 2012, 8:00:09 AM4/28/12
to spyd...@googlegroups.com
Hi there,

2012/4/28 <josef...@gmail.com>:
> I'm using eclipse with pydev as my second editor especially when
> working on a larger project.
>
> Does spyder check whether a file that is in the editor has been changed on disk?

Yes, the file status is checked everytime Spyder's editor window gains
focus (so typically, when switching from an external editor to
Spyder's, it will have focus and so it will check whether the file has
been modified on disk or not):
http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/editor.py#1531

If it's not, then it's a bug.

> My impression (no systematic check) is that spyder does not do it. I'm
> still on spyder 2.1.7 and I started to avoid having the same files
> open in several editors.
> In the thread on syntax highlighting partial file loading was
> mentioned, which seems to me might make the problem worse if several
> editors access the same file on disk.

Oh no, this has nothing to do with it, at least in my own post. When I
mentioned the fact that syntax highlighting could be done only to
displayed text (not to the whole text), this does not prevent the
editor from loading the whole text at once: it just won't process it
at once.

-Pierre

> Thanks,
>
> Josef
>
> --
> You received this message because you are subscribed to the Google Groups "spyder" group.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.
>

josef...@gmail.com

unread,
Apr 28, 2012, 8:39:48 AM4/28/12
to spyd...@googlegroups.com
On Sat, Apr 28, 2012 at 8:00 AM, Pierre Raybaut
<pierre....@gmail.com> wrote:
> Hi there,
>
> 2012/4/28  <josef...@gmail.com>:
>> I'm using eclipse with pydev as my second editor especially when
>> working on a larger project.
>>
>> Does spyder check whether a file that is in the editor has been changed on disk?
>
> Yes, the file status is checked everytime Spyder's editor window gains
> focus (so typically, when switching from an external editor to
> Spyder's, it will have focus and so it will check whether the file has
> been modified on disk or not):
> http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/editor.py#1531
>
> If it's not, then it's a bug.

I just tried it out, and it doesn't work for me. I don't get the
warning from the isModified part and I don't get automatic reload if
the file is no isModified.

Could it be related to the number of open editor files? I have maybe a
hundred files or more open in the editor, more than can be seen in the
two columns in Browse Tabs.

Thanks for spyder.

Josef

josef...@gmail.com

unread,
Apr 28, 2012, 10:18:28 AM4/28/12
to spyd...@googlegroups.com
On Sat, Apr 28, 2012 at 8:39 AM, <josef...@gmail.com> wrote:
> On Sat, Apr 28, 2012 at 8:00 AM, Pierre Raybaut
> <pierre....@gmail.com> wrote:
>> Hi there,
>>
>> 2012/4/28  <josef...@gmail.com>:
>>> I'm using eclipse with pydev as my second editor especially when
>>> working on a larger project.
>>>
>>> Does spyder check whether a file that is in the editor has been changed on disk?
>>
>> Yes, the file status is checked everytime Spyder's editor window gains
>> focus (so typically, when switching from an external editor to
>> Spyder's, it will have focus and so it will check whether the file has
>> been modified on disk or not):
>> http://code.google.com/p/spyderlib/source/browse/spyderlib/widgets/editor.py#1531
>>
>> If it's not, then it's a bug.
>
> I just tried it out, and it doesn't work for me. I don't get the
> warning from the isModified part and I don't get automatic reload if
> the file is no isModified.

I upgraded to spyder 2.1.9 it works, both automatic reload and the
popup if isModified

Thanks,
Josef

anatoly techtonik

unread,
May 15, 2012, 5:48:17 AM5/15/12
to spyd...@googlegroups.com
Just in case we'll need it - there is handy module that does filesystem access monitoring - http://pypi.python.org/pypi/watchdog
Reply all
Reply to author
Forward
0 new messages