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.
Python 3.x Progress Update
-
Thanks, @omz. One more thing, both methods of 2to3 conversions are seem to be currently broken:
-
@Webmaster4o Hmm, I have a suspicion that this might have to do with you using a custom theme. I have to admit that I didn't really test this properly. Could you check if that error goes away if you use one of the built-in themes?
-
@omz Yep, it does.
Another suggestion, I suggest that you implement syntax highlighting for the "confirm" screen with the 2to3 conversions.
-
@omz
objc_util.on_main_thread
(and possibly other decorators) should usefunctools.wraps
to copy the old function's metadata to the new one. For example at the moment thehelp
function is basically useless on functions decorated with `on_main_thread':>>> import editor >>> help(editor.annotate_line) Help on function new_func in module objc_util: new_func(*args, **kwargs) >>> help(editor.annotate_line.__closure__[0].cell_contents) Help on function annotate_line in module editor: annotate_line(lineno, text='', style='warning', expanded=True, filename=None, scroll=False)
-
@omz I have to say that you are raising the bar, BIG TIME, P3 is becoming a real professional Python development tool, is there a way to do PayPal donations, I personally think Pythonista is undervalued in the App store, my personal opinion though.
That's very kind of you, but I really wouldn't feel comfortable taking donations. Pythonista is doing quite well, actually – over the last 3 years, I've managed to convince an average of 50 people every day to buy the app, and as a solo developer without a lot of expenses, I think that's pretty good. :) There are a lot of projects that need donations much more than I do.
-
objc_util.on_main_thread (and possibly other decorators) should use functools.wraps to copy the old function's metadata to the new one.
Good point!
-
@omz Well, I am glad the App is selling so well, a very well deserve recognition to a flawless execution and plenty of very powerful functionality, for a very limited and constrained environment, aka iOS Sandbox, but at the same time, thanks to Pythonista with a lot of potential. I use my iPad Pro as my main device 70% of the time, looking forward to increase it to 90%.
-
@omz said:
@Webmaster4o I don't know yet for how long P2 will be around after I release P3; probably a while though. As for the new features in the latest 3.0 beta: those will all be in the next 2.0.1 beta as well.
I guess this means P2 will gradually retire after P3 is released? Future updates are only for P3?
-
@ywangd A lot of this depends on how well the Py3 edition is received, whether a lot of people are still buying the Py2 edition afterwards, etc. In the Python community as a whole, the transition to Python 3 has been slow, but I don't really know what that means for Pythonista. It's a very specific environment, and a lot of the concerns people have about Python 3 might just not apply to an iOS app.
To be honest, I don't really like the idea of having two very similar apps. I'm a bit worried that some people might not read the description, get the wrong version, write angry reviews, email me that I'm greedy, etc.
From a technical standpoint, it's not that hard for me to keep both versions updated – apart from the underlying Python implementation, 99% of the code (UI etc.) is shared, and modifying the custom modules in a way that they work in both versions was honestly not as hard as I expected.
-
@omz wow, 3 * 365 * 50 > 50,000 Pythonistas, that's quite a global tribe!
-
@OI. I think a key put off word for @omz here might be donation. I am just guessing, but I know for myself it would be. But I feel the same as you, I want to give more.
@omz you really do go out of your way to continually upgrade and expand everything about Pythonista, let alone the support you provide.
Maybe funds you collect from contributions via PayPal could be used by you to outsource things like icon collection/cataloging, or other edge type tasks you don't really have time for. Well, they could be used for anything. Should be up to you.
@omz, sorry to bring it up again. I think it embarrasses you. It's not meant to. I think there are some very well meaning people out there that want to contribute more on the financial side. The reality is some people are further along in thier careers and can afford to put in more than others.The contributions never need to be made public, nor should it imply and type of service from you.
Anyway, if you decide to do such a thing, I would just feel I am investing in something that gives me a lot of pleasure. Just the amout of help you have given me here in the forum, both directly and indirectly is mind blowing when you look at how much I have paid for the software. There is no correlation actually. Pythonista being under valued does even come close to expressing the reality.
I hope you reconsider. I personally think there in a reasonable case to let those who can afford it to contribute more without belittling anyone else who can not.
-
@omz - I think that you should just do a bundle that includes both the 2 and 3 versions but discounted appropriately. This will serve to illuminate new users about the 2 vs 3 issue with Python as a language and show new users how it is the definitive choice on IOS.
-
This thread is getting really long so I may just start another about the new template you posted to github. I am coming at this with virtually no knowledge of XCode development so my feedback should be taken in that context. At this point I have simply setup for XCode development on a squeaky clean Mac Mini. I read the Reame on the Github site but it had nothing about how to "install" the template. I spent a few days researching this and learned that it depends on a number of factors. So my feedback for now would be to add some text to the Readme to discuss this. I think the Readme should state the 3 or 4 ways to download the package and install it and why you would pick each of the methods. Something along these lines ...
-
Checkout the distribution using XCode source code control and recommend a destination location and then how to do a build using the stock XCode dev environment (not the command line) - then run in the simulator and then deploy to your device.
-
Download the distribution as a ZIP file, unpack it and then move the pieces into their "correct" locations. This one would probably best be done using the command line only.
-
Install the distribution using CocoPod? I have no experience with this yet and don't know what is involved. However - this seems to be one of the most modern methods for keeping the dependencies between all the parts of your App under control and easy to maintain.
-
Other? Maybe document the tools you are specifically using in your development environment as it might be illuminating.
New users of the template may also be wondering what the supplied process does anywhere the result end up. Does it produce universal binaries or only ones targeting IOS. Mac OSX support? etc. I am just looking at this as if this is a SDK offering and that Pythonista is the demo app for this SDK. You have mentioned that at least one developer has taken the framework out of your distribution and put it into another project so this seems appropriate.
-
-
On the donation/financial contribution topic. I can understand that @omz feels uncomfortable taking donations, this brings notions of charity. But me and many other are more than willing to contribute financially to the apps, to show appreciation for this wonderful tool and to help with/speed up future development. If there would be an anti-sale day for the new Python 3 version with a higher price (5x?) I would buy it that day.
-
@Oscar me too, same day!!
-
@omz Even though I realize this has been discussed as likely very problematic I really do think the ultimate solution is to sunset Pythonista 2.7-only version, and bake a python 2.7 mode into Pythonista 3 even if it requires a toggle and an app restart because as you mention yourself there will be people who are like "I got the wrong version, 1 star!!!!" Or maybe just a superficial 2.7 compatibility mode where it runs 2to3 tools , and some module compatibility tool I've read about in a new directory.
-
@omz Thanks for the new features in Pythonista 2. I'm still using that as my primary version.
-
regarding StringIO and cStringIO. It's my understanding that in Python3 there is no
cStringIO
. It's also my understanding that in Python2cStringIO.StringIO
was faster thanStringIO
. Since in Pythonista3cStringIO
gives anImportError
, I'm wondering whether the fastercStringIO
is gone or ifStringIO
is now that faster version by default with the simpler name.I'm using this as
file=cStringIO.StringIO(urllib2.urlopen(url).read())
as part of a circle mask view from url function made with (I believe) the help of @jonb and/or possibly @ccc. (They're both so damn helpful) -
I like python 3.5 but my heart is for 2.7 <3
-
@Tizzy There's just one
StringIO
implementation in Python 3, it's basicallycStringIO
with a different name, and it's been moved to theio
module.If you just want to use
StringIO
on Python 3, usefrom io import StringIO
. If you want compatibility with both versions, you could use something like:import sys if sys.version_info[0] >= 3: from io import StringIO else: from cStringIO import StringIO
You could also use the
six
compatibility layer:from six import StringIO # works for Python 2+3