mayank0110 / pynguin

Automatically exported from code.google.com/p/pynguin
GNU General Public License v3.0
0 stars 0 forks source link

backup~1.pyn left at home directory #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Not deterministic, I can't specify an exact sequence.

What is the expected output? What do you see instead?
I was *not* expected backup~1.pyn files left in my home dir.

What version of the product are you using? On what operating system?
0.14 on Arch Linux, Python 3.3.

Please provide any additional information below.

Original issue reported on code.google.com by miki.teb...@gmail.com on 14 Apr 2013 at 12:09

GoogleCodeExporter commented 9 years ago
Thanks for the report.

You can disable backups, or change where they are left in the
Settings -> Preferences -> Backups

Or are you saying that you think the default should be to
have the backups turned off?

Or are you saying that even after setting up the Backups
setting the backup is being left in the wrong place?

Original comment by miss...@hotmail.com on 14 Apr 2013 at 12:25

GoogleCodeExporter commented 9 years ago
I'd take door number 3. Backups should be in another place (~/.pygnuin/backups 
?)
Also, backups should be cleaned once the program exits.

Original comment by miki.teb...@gmail.com on 14 Apr 2013 at 12:34

GoogleCodeExporter commented 9 years ago
> Backups should be in another place (~/.pygnuin/backups ?)

Well, that's why I left it as a setting. You can put them anywhere you like, or 
turn them off completely.

On Windows, for instance, dot directories are not the culture (and won't be 
invisible, so creating that folder may also annoy people).

> backups should be cleaned once the program exits.

I think that would make the backups much less useful, but I can add an option 
to remove backups on exit.

Original comment by miss...@hotmail.com on 14 Apr 2013 at 12:45

GoogleCodeExporter commented 9 years ago
>> Backups should be in another place (~/.pygnuin/backups ?)
> Well, that's why I left it as a setting.
I agree, but the default should be "sane" :)

> On Windows, for instance, dot directories are not the culture (and won't be 
invisible
Usually applications place things in %APPDATA%/<program> folder (might have 
changed, it's been a happy while I've been away from windows).

>> backups should be cleaned once the program exits.
> I think that would make the backups much less useful.
I thought backups are just for when the application crashes. But I might get 
this wrong. I the probably case that I am - don't delete the backup files.

Original comment by miki.teb...@gmail.com on 14 Apr 2013 at 1:38

GoogleCodeExporter commented 9 years ago
Pynguin tries pretty hard to save the backups in a sane place. It saves them
where you are saving your files, or where you configure it to save them.

Files will be dropped in your home directory, at least until you open or
save a file somewhere else. Since the program is aimed at beginners, I would
rather not hide the backups. That would most likely mean that backups would
never be seen when needed.

For me, the backups are more than anything else a hedge against students
closing out of the program without remembering to save.

I think the backup file is a lesser annoyance than losing work.

I do think the default name should be changed though. I will change it to
'pynguin_backup~N.pyn' to make it more clear where the file is coming from.

Original comment by miss...@hotmail.com on 27 Apr 2013 at 3:28

GoogleCodeExporter commented 9 years ago
> That would most likely mean that backups would never be seen when needed.
You can always add the option to restore backup from pygnuin itself, and it 
will know the location (open file selection dialog in that directory).

> I think the backup file is a lesser annoyance than losing work.
OK, that's a valid statement :) It's was mostly my OCD acting up when seeing 
these files.

Original comment by miki.teb...@gmail.com on 27 Apr 2013 at 4:05

GoogleCodeExporter commented 9 years ago
> You can always add the option to restore backup from pygnuin itself

I like that idea. Plus the whole configuration thing could be removed...

The biggest problem is that it would require some research on where
exactly to store the backups on each platform, though I wonder if Qt
has support for that (like for settings). In fact, I wonder if the
whole backup could just be stuck in to settings...

Anyhow, I am certainly willing to entertain a patch, or if not I will
look in to it.

Original comment by miss...@hotmail.com on 29 Apr 2013 at 12:15

GoogleCodeExporter commented 9 years ago
Probably something like https://gist.github.com/tebeka/5532386

Original comment by miki.teb...@gmail.com on 7 May 2013 at 1:04

GoogleCodeExporter commented 9 years ago
If you want to keep the backups in folders,
I think it may be better to use the Qt QDesktopServices:

http://pyqt.sourceforge.net/Docs/PyQt4/qdesktopservices.html

Original comment by miss...@hotmail.com on 7 May 2013 at 10:27