First off, make a backup of any file you try this on,
because it's going to go bye-bye.
Open a python file. Change something in it. Hit 'x' (the
upper right thingy, on Windows) to close the program. It
will ask you if you want to save changes.
Click 'yes'. The program will close.
Your file will now be 0 KB.
Woot!
Logged In: NO
oh great, i just tested it again, and I can't get the problem to
repeat itself.
however, it happened to me twice, and i had to restore from
backups twice, so I know i am not insane!
Logged In: YES
user_id=228025
So did you get a save file dialog or was this on a file that already existed?
There is a known bug where trying to save to a read-only dir or some other
file exception during save with be ignored incorrectly, maybe that was the
issue?
Please specify OS, versions of Python, wxPython, PythonCard.
Logged In: YES
user_id=1320802
Ok it happened to me again today, so I know I'm not crazy.
The only unusual thing I can think of is that I had several files
open at once, and was doing stuff like copying and pasting
from one window into another, making new windows,
using 'save as' on both the old and new windows, and various
combinations thereof. I still can't reproduce the bug exactly,
though.
Here is the info you requested kasplat, from
pythoncard 'about' box.
PythonCard version: 0.8.1
wxPython version: 2.6.1.0
Python version: 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC
v.1310 32 bit (Intel)]
Platform: win32
(XP with service pack 2)
Logged in as limited user.
Logged In: NO
PythonCard doesn't start under python 2.4.1 (win32).
Logged In: NO
Ive been having that same problem... i traced it down to my
file having a string in it with both a "" and a "" in it... not
sure which one was doing but i think it was prob. both.
anyways it wouldnt save the file and it would distroy the file. i
took them out and now it works fine now.
Logged In: YES
user_id=1320802
By the way, when I open this same file in IDLE (the
default python editor for windows) it opens just fine.
However when I save it it gives me an error about a 'non
ascii character' and asks me to put a '-encoding-cp-1252-'
or whatever at the top of the file.
i put the encoding tag in, and tried to open in
pythoncard. again, it truncated the file to 0kb.
i assume pythoncard cannot deal with non-ascii characters
(i guesss that is 'BP Islam. Bahá'ísm. Theosophy '
in my example file) very well; at the least it should
save the data instead of wiping it out.
Logged In: NO
This problem is still with us! I don't think there were any other than normal printable characters in the small file, which I shall eventually remember & thus recreate. PythonCard v0.8.2, Python v2.5.1.1 (I believe that it said this some where but I can't find it now). The above description fits exactly.
marshallsavage@earthlink.net
Index.. Very nice :)
Index.. Peachy :)