Python for decision makers and business leaders Transcripts
Chapter: No Python here
Lecture: Probably not for mobile apps
0:00 We've spent some time talking
0:01 about why Python is so awesome
0:03 how many of the great things it does
0:04 and how flexible it is.
0:06 And flexibility it does have
0:09 but there are times
0:10 when you should not use Python
0:12 to solve certain problems.
0:14 Maybe this is because Python
0:15 is not very efficient at this problem.
0:17 Or, it might not work at all.
0:20 So we're going to talk quickly
0:21 about some of those situations.
0:23 You got a sense of that already.
0:25 Remember we did Python vs C++, vs MATLAB and so on.
0:29 And Python scored pretty high, I think.
0:31 There's a lot of green
0:32 but there are a few standouts
0:34 where there's some red in there.
0:36 And that's around mobile apps
0:37 and, to a lesser degree, desktop apps
0:40 but still, it's not maybe the best story
0:42 you got going on there.
0:45 So let's talk about those two situations
0:47 and just packaging up applications, in general.
0:51 Mobile: maybe you've heard of these things
0:52 these little smartphones, everybody has one everywhere
0:55 and having a mobile app is super important.
0:58 It turns out the story
0:59 of Python on mobile is not incredible.
1:03 Here's a data point for you to consider.
1:05 One of the biggest Python training sites out there
1:07 that teaches people how to build stuff with Python
1:10 the website that is built with Python
1:12 the company, the podcast that is about Python
1:15 when we had to go build our mobile apps
1:17 I went around and I looked at all the different options.
1:19 How could I possibly build this in Python?
1:21 You know what I decided?
1:24 There's not a reasonable way to do that.
1:26 Technically, I maybe, maybe could have pulled it off
1:29 with some of the things that are out there.
1:31 But it is not the mainstream way
1:33 and it's going to be jumping through a ton of hoops.
1:35 So, at Geniusy, we have an app
1:38 in the Apple App Store, and on Google Play.
1:40 Those were written in C# and .NET
1:42 using the Xamarin platform.
1:44 We have one code base for these two projects
1:47 which is actually pretty killer.
1:48 We're able to share almost all the logic
1:50 across those two operating systems
1:52 and there's two phones. So that's great
1:55 but, even though I wanted to
1:57 even though I tried, I could not find a way
1:59 to reasonably build our apps in Python, on mobile.
2:03 Now you might be saying
2:05 Michael, you can build your apps in Python on mobile
2:08 there's this thing called Kivy, K-I-V-Y.
2:11 Yes, technically, there is Kivy.
2:14 To me, my impression, I haven't built anything
2:16 in earnest with it
2:17 but my impression is it is mostly about building
2:19 kind of simulator game like interfaces.
2:22 And its ability to say, drag over a button here
2:25 and put a text box there
2:27 and have this stretch when it does this
2:28 and a video player goes there.
2:30 Didn't really think that it could do it.
2:32 And by the way, until we have something that looks like
2:35 this, a really cool development environment
2:38 were I can have a UI definition and a UI designer
2:41 and then my Python code, then I push a button
2:44 and it compiles into a thing that I drop on the App store.
2:48 Until I have that, there is no way Python is on par
2:51 for building mobile apps compared to, well, this.
2:54 This is literally how we built our mobile apps
2:57 for the App Store at Talk Python Training.
2:59 Thing you see on the screen is login page not XAML.
3:02 The code is on the left
3:03 this is XAML, like a WPF type of thing on .NET.
3:07 On the right we have both Android and IOS preview.
3:10 You can interact with the stuff on the right
3:12 the tool box or you can drag over buttons
3:14 and Carousel views and all kinds of stuff.
3:16 On the left we have our code
3:18 these compile all into like the final version
3:21 that gets shipped to the App Store.
3:23 Not only is there not something that's really
3:25 not quite close to this in Python.
3:27 There is like not anything that even approaches
3:30 this concept, not even close in Python.
3:33 And so until Python is on par with things like this
3:36 on Android studio or working with Android directly
3:40 in Kotlin or Xcode and Swift. Until its something like that
3:45 I personally would not use it. As much as I want to
3:48 unfortunately we are stuck doing something like this.
3:51 It worked out fine, but I would it's prefer python, it's just it's not.