Monday, January 23, 2023

How To Code & Use Python On An iPad

5 Ways To Use Python On An iPad - Native apps, cloud IDEs... here's how to code in Python on any iPad.
https://davidamos.dev/5-ways-to-use-python-on-an-ipad/
"*   a-Shell (Free): A full-featured Unix terminal with Python and many other tools. https://holzschu.github.io/a-Shell_iOS/
*    Carnets (Free): A local Jupyter client with Python, NumPy, pandas, and other stats and data science packages. https://holzschu.github.io/Carnets_Jupyter/
*    Juno ($15): A unique, premium Jupyter client that also includes Python and many scientific and data-related packages. https://juno.sh/
*    Juno Connect ($10): A beautiful Jupyter client for connecting to remote servers. https://juno.sh/junoconnect/
*    Codeanywhere Cloud IDE ($6/mo, $86+ /2 years): Code on all of your devices with a modern VS Code-inspired IDE (it even runs most of the marketplace extensions!). You can even share your environment live with teammates, with Google Docs-like collaboration tools. https://codeanywhere.com/?ref=davidamos
...
Tip: If you use Apple's Magic Keyboard for iPad, then you don't have a physical Esc key. This makes working in vim painful until you figure out that Cmd + . works like Esc. "


A guide to writing code on an iPad:
 https://coder.com/blog/a-guide-to-writing-code-on-an-ipad
"There are two possibilities for writing code with an iPad. You can elect to use a native iOS app or use the iPad as a thin client to connect to an IDE running on another machine or server."
"... there are a ton of code editors in the iOS app store, many of them fairly mediocre. Here are a few of the best and most popular ones.
Textastic ($9.99) -
Textastic is probably the most popular code editor for iOS, and for good reasons. It supports syntax highlighting of more than 80 programming and markup languages. Its interface is snappy and uses the native iOS framework Core Text. You can access files via FTP, SFTP and WebDAV or from Dropbox or Google Drive. It also integrates with the iOS Git client Working Copy (more below), allowing you to access projects on GitHub, GitLab, and other repositories. It has an SSH terminal built-in to let you connect to your remote servers.

Koder ($5.99) -
Like Textastic, Koder has been around for over a decade. Its feature set is very similar to Textastic as well, with syntax highlighting, support for FTP, SFTP, WebDAV, Dropbox, and Google Drive file access, and integration with Working Copy for Git repositories.

Pythonista -
While Textastic and Koder take the Swiss army knife approach to supported languages, Pythonista, as you might guess from the name, focuses solely upon Python. ...

Pythonista provides a full-featured editor, includes some popular libraries like NumPy and MatPlotLib, allows you to run your scripts directly on your device, and has an integrated debugger.

One of the best things about Pythonista is its integration with iOS. Your scripts can access data from the clipboard, your contacts, reminders, and photos, as well as your device's motion sensors and geo-location data. It also supports the split-screen feature available on iPad Air2 and newer iPad Pros.

However, you are limited to using either Python 2.7 or 3.5. Additional libraries can also be a bit of a pain to install at times.

Working Copy -
If you are going to use your iPad and a native editor or IDE for anything more than playing around, you are going to need to install Working Copy so that you can access Git repositories. Working Copy is the standard Git client for iOS. The free version allows you to clone repositories, but if you want to push your commits you'll need to purchase the paid version."


"Using a cloud-based IDE for writing code on an Ipad:
Cloud-based IDEs offer the developer an experience much more similar to working on their local machine. If you use your iPad as a highly portable client to access your cloud-based development environments then you can use fully-featured IDEs and skip the workarounds needed when using native iOS apps.

code-server -
Thousands of developers use code-server every day to run VS Code on any machine and access it through the browser. It's an open source project maintained by the developers of Coder (more specifically about Coder later). Depending upon your needs, you can install it on an old machine you have lying around or on a beefy VM. I have it running on an older Mac Mini in my home lab, and many others have installed it on a Raspberry Pi or on a low-cost (or even free) platform like Railway (https://coder.com/videos/how-to-code-on-an-ipad-using-code-server-and-railway).
Once it is installed you can use your iPad (or any other machine) to connect and work just as if you were running VS Code locally. There's even a page in the docs specifically for accessing your code-server installation using an iPad (https://coder.com/docs/code-server/latest/ipad).
A really handy feature of code-server is that if you start it with the --link command you'll get TLS, authentication, and a dedicated URL for accessing your IDE out of the box — no having to mess with Let's Encrypt certificates.


7 Best Python IDEs for iPad and iPhone in 2023 (Free) - If you are a Python enthusiast and wish to code Python on iOS or iPadOS while you are out and about, it is now possible with these 7 free IDEs.  https://ninja-ide.org/best-python-ide-for-ipad-iphone/
" Contents:
*    Pyto – Overall Best Python IDE for iPhone
*    Juno – Free Python IDE for iPad
*    Libterm – Free Python code editor and shell for iOS
*    Git2Go – Lightweight app to write Python code
*    Pythoni-run – Python IDE app for beginners
*    Carnets – Best App to use Python on iPad
*    Juno Connect – Python via Notebooks on iPhone

*    Python IDE for iOS and iPadOS FAQs
   +     Is the Python IDE for iPad different then iOS?
   +    Can you code Python from your iPad or iPhone?
   +    Is it safe to code Python from your iPhone?"
   

How to use Python on iPad - Learn how to use an iPad to create Python scripts:
https://towardsdatascience.com/how-to-use-python-on-ipad-9a9bd97c40
"...the best way that I have found so far to use Python on an iPad is through Google Colab. It is a free tool available to everyone having a Gmail/Google account."


 Pyto - Python 3 - Coding Python Scripts: https://apps.apple.com/us/app/pyto-python-3/id1436650069
"Pyto is a Python 3.10 IDE for iPhone and iPad. Run code directly on your device and offline. You can run scripts from Shortcuts and code your own home screen widgets."


The 2021 guide to coding on an iPad Pro: https://medium.com/@ow/the-2021-guide-to-coding-on-an-ipad-pro-5428d062c5ff
"While you still can't download my favorite code editor, Visual Studio Code, directly to the iPad, Microsoft has made the next best thing available: GitHub Codespaces.

Codespaces is a fully cloud-based version of the Visual Studio Code you're likely already familiar with, complete with virtual servers, so you can actually build and test your code — without needing to jump through hoops. And, best of all, it's completely free (at least for individual accounts, for now)."


My top Python IDEs for iPad:  https://blog.devgenius.io/my-top-python-ides-for-ipad-3f777023155c
"Juno: Juno is a clean, powerful and fully supported iOS application for displaying and editing .ipynb files (Jupyter Notebooks) right from the comfort of your iPad. Currently, it has support for many popular data science libraries such as NumPy, MatPlotLib, Seaborn, and Pandas, as well as upcoming support for Scikit Learn and Tensorflow. It boasts a clean and easy to use UI with full keyboard shortcut support for the iPad Pro's magic keyboard, as well as all the functionality that you would expect to receive from any ordinary Jupyter notebook platform.
...

Carnets: Much like Juno, Carnets supports many of your favourite libraries, and supports external library extensions. It also sports a similar user interface style to the classic browser-based Jupyter, which may be more appealing to some users. Since this version is free however, it lacks some of the bells and whistles that Juno has to offer, for example:

    External keyboard shortcuts are severely limited, for example there are no shortcuts for deleting cells or undoing actions.
    External package support for Carnets is much more limited than that of Juno – packages can be installed, but are not always guaranteed to work.
    The user interface is not properly optimised for use on an iPad, and can be a pain to use.

Whilst this does not put Carnets in a particularly good light, the application does have a couple of features up its sleeve that Juno does not have to offer, such as direct access to documentation through the task bar, widget support and finally the ability to save and revert to custom checkpoints. These are just the most important features, and there are likely to be more useful little quirks within the application, so I encourage you to try it out for yourself.
...

Pythonista: When I first started looking for an IDE to use on my iPad, I noticed that there were a lot of paid ones which were practically the same as the default Python IDE for desktop, so I thought to myself – "this isn't worth it, it'll only be more stressful". But then I came across Pythonista, and it was anything but!

Pythonista is a fantastic tool for writing and debugging Python code from the convenience of your iPad or iPhone. It includes a simple user interface with plenty of custom themes to choose from, access to python files from any location (including Dropbox), and the ability to have multiple python scripts open at once. Its automatic code completion paired with offline access to Python documentation makes writing within the IDE an absolute joy.

But aside from the glamorous themes and pages of built in documentation, Pythonista comes with a plethora of other features to justify its £9.99 price tag. Some of these features include, but are not limited to:

    The ability to run your code using either Python 2.7 or 3.6.
    The ability to run graphical programs inside the compiler using hardware accelerated rendering modules such as Python's built in "scene" module.
    The ability to plot graphs and save them as images using MatPlotLib.
    Access to iOS' built in "Shortcuts" app allowing users to place custom written programs on the users Home Screen.
    Extensive keyboard support for the dedicated users like myself.
    A unique UI editor for the aspirational designers looking to get started on iOS.
...

Pyto: Perhaps it's no coincidence that Pyto is the top rated free Python IDE on the App Store, as it is very close in comparison to Pythonista. Not only is it a fantastic free alternative to Pythonista, it also runs native Python 3.8, as opposed to the centuries old Python 3.7…

Although it doesn't include offline documentation, it does grant users access to multiple windows at once, which is a particularly compelling feature for users who have come from VS Code on the desktop. Not only that, it also features support for modules such as Sklearn, which none of the aforementioned IDEs support. If that's not enough, you also have the ability to 'pip install' other Pypi modules.
...

Juno Connect: Before we go into the specifics, I should indeed confess that Juno Connect DOES NOT run natively on your iOS device. It is simply an IDE which allows you to connect to a service running Jupyter Notebooks. This could be your desktop computer at home, a Microsoft Azure server, or perhaps a private external server that you're collaborating on.

With all that being said, Juno Connect DOES however grant you access to a familiar Jupyter Notebook interface, allowing the user to have multiple notebooks running at once. This does come as a relief after using Juno for a prolonged amount of time, since that IDE completely shuts down the notebook that you're working in every time you want to open another one, and there's no option to have multiple windows open at once.

Another huge relief is that since you are running your notebook from a server within this IDE, you have access to any Python library or extension (as long as your computer actually runs it). ..."


Download Python for Other Platforms:  https://www.python.org/download/other/
"Pythonista (http://omz-software.com/pythonista/index.html) is a complete development environment for writing Python scripts including third-party libraries and system integration on your iPad or iPhone.

Pyto (https://pyto.app/) also provides a complete development environment for running Python 3 including many third-party libraries and system integration on an iPad or iPhone."


The 5 Best Coding Apps for iOS to Code on the Move: https://www.maketecheasier.com/coding-apps-for-ios/

"Swift Playgrounds (Free) https://apps.apple.com/us/app/swift-playgrounds/id908519492
... This app started out as Apple's initiative to make learning Swift fun, and it grew over the years. Today, you'll find a whole range of lessons ...
The app also gives you a blank canvas for your coding, where you can practice, inspect your code, and even code something from scratch. You can easily preview your app next to your code editor, which is something other coding apps simply can't do. It also integrates with iPadOS frameworks and allows you to submit your app to Apple's App Store."

"Koder Code Editor (Free) https://apps.apple.com/us/app/koder-code-editor/id1447489375
Koder is a fully-baked development environment built specifically for iOS and iPadOS with support for over 80 programming languages, syntax highlighting, and auto-complete, making this app incredibly powerful. If we dare to say it, Koder seems like a bulletproof option ..."

"Pythonista 3 ($9.99) https://apps.apple.com/us/app/pythonista-3/id1085978097
For the Python coders out there, Pythonista 3 is a complete Python editor for coding on your iPad or iPhone. While Python developers would be familiar with the standard libraries provided, Pythonista's benefits include the ability to interact with native iOS features, like location data, contacts, reminders, photos, and more."

"Buffer Code Editor ($9.99)  https://apps.apple.com/us/app/buffer-editor-code-editor/id502633252
Like other coding apps for iOS, Buffer Editor provides a native and purposely-built development environment. We're sure that pretty much all your needs as a developer will be met by this app. That starts with Buffer's highly customizable interface, letting you switch between a bunch of themes easily. On top of that, the app is highly optimized for iPhones and iPads, supporting various multitasking operations."

10 Useful Python One-Liners You Must Know: https://www.maketecheasier.com/useful-python-one-liners/

No comments: