On 03/11/2014 04:54 AM, Hans Fangohr G wrote:
On 03/10/2014 08:17 AM, dhf wrote:
I was working on two open/windows or panels - on one i had my main
program in the other i hadall the related functions (python 2.7) when I
saved my work, i guess i was in the wrong panel and cross-overwrote
while saving my functions file on to the main code. I since recreated
most of it. I can see how this can easily happen again.
I still don't see how this could happen in a normal save operation. Each panel
represents a separate file. If you just saved the file you where in, it would
save to itself not another file. Now if you did a Save As then anything is
possible, but that requires a conscious effort and is something you can do in
any program.
This is a common pattern I see when teaching beginners: in IDLE, for example,
they edit the python file hello.py in the python file editor, and execute it in
the python shell window. At some point, they want to explicitly save their
file, and select 'save' WHILE IN THE CONTEXT OF THE SHELL, and then save the
log of commands and outputs from the shell into the file hello.py (at that
point overwriting the actual code).
I see what you are saying, I just could not replicate this in Spyder. If
I had a file with unsaved changes in the editor and invoked Save while I
was in a console it saved the changes in the file only, it did not
overwrite it with the console contents. If there where no unsaved
changes in the file editor the only choice I had was Save As. Invoking
that opened a file dialog where it is possible to pick an existing file.
Doing so though threw up a warning dialog that I was about to overwrite
an existing file. So I guess it could be done but you would have to work
at it.
This seems completely implausible to be possible to those of us who have been
in the business for some time, but in saying that we make (incorrectly) a huge
number of assumptions about what people know.
I don't know how this kind of data loss can easily be prevent; I certainly
agree that - if what is outlined above was the case - this is nothing Spyder
specific.
I just downloaded mercurial
That's one way of addressing this, and keeps saving my skin :)
Agreed, though I should have mentioned when I made the version control
suggestion, that regular backups are important also. Version control is
only as good as the last commit. You make a bunch of changes off a
commit and then have an oops you are back to rebuilding from the last
commit. Having something that is backing up the files regularly is
extra insurance.
Best wishes,
Hans
--
Adrian Klaver
[email protected]
--
Adrian Klaver
[email protected]
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.