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.
filenav - a simple file navigator
-
Thanks @dgelessus, it would be great add the possibility of delete and move files and folders, zip and unzip files. Great software congrats
-
I love the full 'panel" view implementation. I would be cool if you could find a way to auto scroll to any newly opened views.
Bug: Quick Look Preview "Done" button does nothing and system is hung.
I tried switching slim over to 'panel' and it does not work the same. I got it to crash once.
Thanks also for providing litenav. This is a really great example app for the NavigationView.
-
I'm aware that Quick Look (or any other function that overlays a second UI) causes Pythonista to hang in panel view, but there's unfortunately nothing I can do about that. Views presented in panel mode do not respond to the close method as they should, so there is no way to hide filenav before opening the quick look sheet.
Automatic scrolling is a good idea and should be easy to add, thanks for the suggestion.
-
The favorites list now has a "plus" button to add new favorites from the UI, no need to edit
favorites.json
anymore. It shouldn't be too hard to implement this for folder views as well to create new files/folders.Known problem - it is impossible to use list reordering controls in a panel view. Dragging a move handle is registered as a horizontal swipe to switch between console and editor, which cancels the list item dragging. @omz this is most likely bug in Pythonista, I've experienced it previously with table views in sidebar mode.
-
Zip files on Ipad?
I am using Pythonista on an Ipad Air for an introductory Python course. I am new to programming and to apple products (the tablet is my wife's) and am bewildered by the lack of a file handling utility. I am stubbornly determined to figure this all out.
I attempted to download the following in order access a problem set for the course:
https://courses.edx.org/c4x/MITx/6.00.1x_5/asset/ProblemSet4.zip
No sucess to either Dropbox or Google Drive. Would filenav be able to do that? Or do I need to get an app like Goodreader? And please let me know if this is the right forum to be asking this.
Thank you @dgelessus -
Dgelessus- yeah, that's a pet peeve of mine (I wish just the title bar switched to editor, since
touch_moved
are off limits in panel. ) I have noticed some other components, like scrollbar do correctly capture the touch move, as long as the touch is a certain distance away from the edge of the screen. Have you tried moving the component away from the edge ? -
Cynicuss:
I'd recommend installing stash, by copying the getstash script and running it. If you add at all comfortable with the commandline, this has a ton of feature.Otherwise, you can always download a file using urllib.urlretrieve, and use other python libs to unzip...
In stash, downloading from a url would be
wget https://courses.edx.org/c4x/MITx/6.00.1x_5/asset/ProblemSet4.zip
After which you can use the unzip command on the downloaded file.
-
Filenav doesn't have any un/zipping capabilities at the moment, though there are a few other scripts that can do that. If you know the basics of how to use a shell, StaSh is probably the easiest way. An external app like GoodReader is usually not a good choice if you want to get the files back into Pythonista - there's no way to pass entire folders or multiple files between apps, and Pythonista is not allowed to accept files via "open in" because of Apple's app review guidelines.
-
@cynicuss, I used StaSH:
Just copy and paste the
get_stash.py
code into Pythonista and run it to download and build StaSH. Then runstash.py
and...StaSh v0.4.0 [~/Documents]$ mkdir MITx [~/Documents]$ cd MITx [MITx]$ wget https://courses.edx.org/c4x/MITx/6.00.1x_5/asset/ProblemSet4.zip [MITx]$ unzip * [MITx]$ cd ProblemSet4 [ProblemSet4]$ ls ps4a.py ps4b.py test_ps4a.py words.txt
-
Thank you people. I installed StaSH and am reminded of how ignorant I am of the cmd line. The blessing is that this amazing piece of work will force me to figure it out. Live, lose, and learn!
Thanks again. -
So I just updated
filenav
to be compatible with Pythonista 3. Hopefully it'll be useful for snooping around in Pythonista internals until stash is updated (which might take a while, considering how much more complex it is). -
@dgelessus , just installed in on v2.x , it's very impressive and really a must have if you are new to this file system.
However the name is very unassuming for how full featured it is. -
@dgelessus said:
So I just updated
filenav
to be compatible with Pythonista 3. Hopefully it'll be useful for snooping around in Pythonista internals until stash is updated (which might take a while, considering how much more complex it is).It may take a while before StaSh is ready for Python 3. Honestly I am not even sure I want to do that. So far I have zero use case for Python 3. I am lack of both experience and incentive ...
-
@ywangd I really think you should try to make it Python 3 ready. It's really an essential and very useful tool for Pythonista. Even if you don't plan to migrate to Pythonista 3, I think most of the community does. I would be willing, as I'm sure most would, to help in some small way. Much of the problems with Python 3 StaSh could be fixed by
lib2to3
-
@ywangd There's no excuse for staying on Python 2 now that Pythonista supports Python 3.
;)
Okay, most user scripts are not Python 3-compatible, but in most cases it isn't hard to "update" a script to Python 3. There is alsolib2to3
which can do most of the work for you. Stash is one of the largest Pythonista projects out there, so that will of course be a little more difficult than the average script. -
We need to figure this out since Stash is now a vital component of Pythonista IMHO. I really believe that it should be included with the core package since it is that important to everyday workflow. There are just some many simple things your can do in Stash that could take hours to accomplish in the UI.
-
I read a bit on how to port Python 2 code. It seems that 2to3 is a convenient tool to make the code Python 3 compatible, but the code will then become not compatible with Python 2.
Ideally, I'd like to have a single code base that is compatible for both Python 2 and 3. There are tools as well but needs more human intervention. Anyway I'll attempt to have single code base first. If this proves to be difficult, I'll fall back to have separate code base for 2 and 3.
-
Supposedly the six module is a good way to help keep one codebase that works with 2.x and 3.x..
though, this was always my fear with a too early switch to 3.x though.... rather than fix bugs or adding new features it seems like omz, ywangd and others will have to expend a certain amount of energy getting things to work with 3.x and maintaining possibly multiple codebases.
One crucial question: will the pythonista modules have the same api in both versions? Will there be differences in ctypes, objc, etc?
-
A while back I think I tried to make stash use Unicode strings whereever possible, so non-ASCII characters are handled correctly and for eventual Python 3 forward compatibility. I think I got stuck when
ConfigParser
was unable to work with Unicode in Python 2. I'm trying to look into this again, though the stash codebase has grown and changed a lot since I last worked on it, so I may be the wrong person to attempt this. -
I have passed all the files through two porting tools,
futurize
andpython-modernize
and the code is now pushed as the py3 branch.The codebase is mostly just processed by tools without any manual checking. So I doubt it would just run with Python 3 or even Python 2. But it serves as a starting point nonetheless.
@dgelessus sorry for hijack your thread. I'll post update on this thread onwards.