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
-
@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.