New iPadOS and new, improved Pybites exercise workflow

Posted on Wed 25 September 2019 in Python • 3 min read

The other day I wrote an article on how I have been working with Pybite exercises on my iPad. Since the code editor on the website didn't work well on an iPad (in my case iPad Pro 11") the workflow I did previously worked fine but contained a number of steps with copy- and -pasting into the Pythonista app.

Yesterday I installed the brand new iPadOS (13.1). I had my suspicions that it would work much better when coding directly in the website's code window. And that's how it turned out to be. Coding with the on-screen keyboard still has most of the problems I'd seen before. But with my external Apple Magic keyboard it seems everything works fine now, and I can do the exercises as intended right on the website. Nice!

My new workflow

Personally, I will probably still do most of my Pybite exercises in the Pythonista app. One reason is that I get features like:

  • debugging
  • autocomplete
  • coding off-line

But with the new iPadOS even the workflow coding in Pythonista can be improved by using the Pybites GitHub functionality. So here I present the new improved workflow.

The new Safari on iPadOS now has a download manager, just like on the Mac. It downloads files by default to a folder in your iCloud Drive called Downloads. This made me think that instead of a lot of copy- and pasting, like before, maybe I could use the PyBites GitHub feature. My Pythonista files is already in a different folder in my iCloud Drive.

Getting the exercise files into Pythonista

In the first step I go to the Pybite excercise and click on the GitHub button. And then download bite

Pybites download bite image Download exercise files for PyBites website

In the top right corner of Safari I press the Download Manager button, and can see that the ZIP-file has been downloaded.

Safari downloads image Safari downloads

If I click on the downloaded file there, ICloud Drive opens and I can see the ZIP-file in my Downloads folder. Pressing the ZIP-file unpacks it to a folder.

Icloud Drive unzip image Unzip the downloaded file

I select the folder in the iCloud Drive and choose Move. Then I browse to my Pythonista bitesofpy folder and choose to move the folder over there.

Do the exercise

Time to fire up Pythonista and go to the newly downloaded folder, and do the exercise.

Pythonisa code image Do the exercise in Pythonista

Submit the code

In this workflow it is only one copy/paste. When the tests has passed, I just copy the code from Pythonista and paste it in the exercise code window on the website. Press the Save and run tests button and I'm done! Some new scores on my Dashboard and a step further to my next Ninja Belt!

Maybe I can get rid of the last copy/paste step with the help of Working Copy App. It is something that I might try out in the future.

Conclusion

The new IPadOS together with a new Safari version has made it much easier to do PyBite exercises on iPad, regardless if you want to code directly on the website or in an editor like Pythonista.

I hope it also opens up new experiences in the future to other web based coding. Like for instance the upcoming Visual Studio Code Online.