Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Restore files and folders from Trash
-
Hi all, sorry maybe this question has been asked (I've not searched, sorry): when I try to restore files or folders from Pythonista Trash folder, they are put in the main Documents folder, not according to the original path. Am I wrong with something or it is normal?
Thank you
Bye -
This should usually only happen for files that were trashed before the 3.2 update. Does it also happen for files you delete now?
-
@omz Hi, I have Pythonista 3.1 (301016), and for the first time I've deleted a folder but I wanted to restore it, and I noticed that the restored folder has been restored in Documents main folder (the same main folder where I see Trash folder), and not in the full path where the folder was.
Do you mean that in Pythonista 3.2 now the files/folders are restored in original path?Thank you for reply
Regards -
On the latest beta I just deleted a file from the widgets dir in the examples dir. Then I restored it from the trash and it worked. The only thing I notice is that the timestamp must of changed. I sort by date, and the restored file ended up at the top of the list, where it was listed last when i deleted it.
Not sure thats an issue. I have never had to think about the correct protocol for restoring files. eg. is it a move or a delete and re-write. -
@Phuket2 You're right, the last update date/time is modified but not the creation date/time.
You could, perhaps, sort on it. -
@cvp , thanks for the info. Is not important to me. It just raised a question in my head, how should you deal with that suituation. I am not sure how the modification date works, in mean in its entirety. But I would have thought that a move from one dir to another dir would not trigger a change to the mod date. Maybe it does. I am not sure. As I say, I have never really had to think about it before
-
@Phuket2 I update the modification date when moving files to the trash, so recently deleted/restored files are easier to find.
-
@omz , yes that makes sense. It's one of those tricky ones though. You have to decide how to best handle it as it is a compromise. I assume ideally you could do both, a queue for trash sort correctly and the ability to restore the file untouched.
But look, i know this is just splitting hairs. I might make a difference in another app/system. But here I am sure its not a problem -
Sorry @omz, so files/folders restoring from Trash is preserving full original path in new Pythonista 3.2? Is it possible to restore them in original full path also with Pythonista 3.1 version?
Best regards
Bye -
@Matteo Not possible with 3.1, but if you have that, 3.2 is a free upgrade...
-
@omz Ok thank you!
-
However I prefer to wait upgrading due to some issues related to python2.7 interpreter of the new version 3.2 ( that I read in this forum, however @omz thank you very much for your support on this Great App!). As I use mainly only python 2.7, I'm afraid about problems on running my scripts with python 3.6, that I dont use often.
The full original path of restored files from Trash is not a big problem, and I dont want to upgrade only for itRegards
-
@Matteo It depends on what modules you're using. As far as I know, the crashing issue is only when showing a
matplotlib
plot in Python 2.7. I haven't heard of any other crashes or major issues on Python 2.7 only. But I can totally understand that you don't want to upgrade in this situation, especially because it's almost impossible to downgrade iOS apps to an older version.In any case, I would recommend looking into Python 3 at some point. Python 2 will no longer be supported after 2020 (the exact end of support date is not decided yet), and many libraries will stop supporting Python 2 around that time. Of course this doesn't affect any of your existing code, Python 2 won't break after 2020, but you won't get any updates and can't use most new code.
If you have some short scripts that aren't very complex, you can try running them on Python 3, and see if you run into any problems. Many common Python-2-to-3 problems are trivial to fix (adding parentheses to
print
s, updating uses of functions and modules that were renamed, etc.). The "Python 2 to 3" editor action can help with that, but I would recommend making a backup of your code first - automatic translation is never perfect. -
@dgelessus Hi thanks for useful info about python versions, I use Python mainly (only) for scientific purposes (for work that is: calculation tools/scripts for environmental/mechanical eng. , and for hobby) and I use mainly python 2.7 for best compatibility with my scripts, that are largely ported from my fortran90 database with a very basic manual rewriting from fortran to python.
So compatibility is for me a substantial problem. But I will begin to use python 3.6 as you suggest :-)
Regards
Bye