There is pythonista on iOS, which does actually allow you to do quite a bit, though it runs inside a sandbox and doesn't have access to phone functions, which would be a security nightmare.
Can you even code on an iPad? Python maybe, but in general iOS apps are heavily locked down and restricted, so no popping up the terminal and installing random stuff that Apple doesn't allow you to.
Well, part of the work is sort of done...
​
On iOS, it already has the replete:// scheme registered, so all that is required is for the app to accept certain arguments and decide what to do with them.
​
Say, it could be that if you invoke replete://scipt1.cljs/arg1/arg2 it could invoke the script1.cljs with arguments arg1 & arg2. But some more code is required to handle that.
​
Pythonista already does something like that and at the end of the script, it invokes the new URL, which can be just a path to Shortcuts.
​
Not sure how this is done on Android platform.
As far as I know there is no way to compile code in iOS, but there are interpreters for different languages like Python and MATLAB/Octave. I use Pythonista 3, which has a lot of common Python libraries built in. I mainly use numpy and matplotlib and they work well for the most part.
Pythonista's pretty good, but it's like $10. I don't think you can add modules arbitrarily due to iOS limitations, so make sure it has the ones you want if that's a deal-breaker.
You can write code in Pythonista on iOS. The display libraries aren't portable, but all the rest of your code would be.
The RasPi 400 is also really nice as a standalone computer, just get a cheap LCD screen.
No, pythonista can't run scripts directly on the shortcuts app unlike scriptable. It does have integration with stuff like camera, photos, reminders, appex(share sheet), bluetooth etc.
Here's a helpful docs page:
Per documentation
http://omz-software.com/pythonista/docs/ios/canvas.html
> The canvas module contains functions for creating non-interactive, 2D vector graphics on iOS. It is suitable for drawing simple graphs/diagrams or line art.
> All functions work on a single canvas that is shown in the output area of Pythonista. Images created this way can be exported to the device’s photo library or copied to the clipboard, though it is currently not possible to do this programmatically.
Yes, it's a problem. Though you could try pythonanywhere. They have free accounts. If you have an iOS device I've found pythonista to be surprisingly complete.
This is two (major) steps removed from what you're talking about but on iOS (step 1) there is a really cool python (major step) app that support numpy and matplotlib called Pythonista
Depending on what language you need to program in it might work. You can do a fair amount in Python with Pythonista, and in PHP with DraftCode. I personally use Screens to remote into a Mac for other programming needs on an iPad - using my iPhone as the trackpad. You could also use Amazon WorkSpaces with a Linux box (or Windows), I believe it's even free for the first year.
> So I’d expect in Apples future utopia that children are at least playing with basic neural nets in Python.
Then they can use the python IDE. http://omz-software.com/pythonista/
> And if you’re giving one to a 16yr old
If a 16 year old is still in middle school, then they're not taking University courses.
For iPad:
Termux for android if you want a linux environment. Several different programs for SSHing. Scratch. ...
If you have to do writing get yourself a keyboard. And I would recommend a tablet because I've found that programming in a phone is no fun.
First off: I only have an iPad for a coding environment. I do have a Mac, but after a long day in front of a computer I don't really feel like sitting in front of one at home, so all of my work is being done on an iPad.
Initially I started out using <strong>Codea</strong>, which is Lua based. I have since switched over to <strong>Pythonista</strong>. I'm using esper for ECS, and iOS specific libraries for display. I have all of the display code separated out so that (hopefully) I'll be able to use different libraries for Windows/Mac/Linux without too much work (yes, I'm an optimist ;) ). Other than those 2, I'm writing everything else myself. esper is really the only library I'm using outside of the Python Standard Library barring the iOS specific stuff.
Yes, providing a suitable IDE exists for a given platform and given that the OS of the device has support for the given programming language then anyone can compose and execute code on such devices. For an example for the python language (an extremely common language in many academic circles second maybe only to java in terms of available libraries) there is the pythonista IDE for iOS. The way that computers work is that any high level code (human readable) can be translated to machine readable assembly code or machine code by the CPU for the CPU to carry out varying memory allocation commands. This applies to tablets as they are computers with an attached monitor in the form of a touch screen.
To reiterate, you could make a base 8 calculator on a iPad and run it on the same device, you could make a financial planner, or you could make a graphical shape generator, and much much more. Anything you can program you can run, given my two provisions at the top.
Pythonista3 is a decent iOS app that is surprisingly complete. Of course, like all tablet apps the keyboard is slower than a normal one.
Don't know about websites. I've never used one.
Pythonista is good and surprisingly complete with numpy, matplotlib and turtle and possibly others. Like all iOS apps it's a bit limited by the soft keyboard, but it's certainly OK for a beginner.
Agree with this. If you must, Pythonista is the closest you will get to a local Python environment on iOS with no need for WiFi. I’ve used it a bunch and can confirm it is pretty legit. But there are considerable limitations. It will not be a complete substitute for working on a computer.
Another option that’s out there, but which I can’t vouch for as I’ve never used it, is Juno. Where Pythonista offers you a Python interpreter and a sandbox for running scripts, Juno offers you a notebook-style interface. It also does not require WiFi to run Python code IIRC.
But given the limitation of Python on iOS, especially for development, a much better solution would be to just SSH from your iPad into a remote server somewhere with Python on it. Juno has a sister app for this, Juno Connect, if you like using notebooks. Otherwise, any terminal-style app (e.g. Blink, i$H) should allow you to SSH and start a Python/iPython shell remotely. Then it will be just like you’re on a real computer, but on your iPad. Of course, this all requires an internet connection, so...
I think If you wanted to just use the built in standard python libraries/functions you would be fine, there are plenty of IOS python interpreters out there, but the moment you try to use something for instance like BS4 you will run out of luck, I think the majority of the issues would come from the operating system not knowing what to do with the code. This is an interesting project that has C level API access, so you could potentially port what you need over, not entirely sure about that though. They do seem to have some decent libraries ported: http://omz-software.com/pythonista/docs/ios/objc_util.html
All that is quite a bit of work though and I'm not even sure it would work well or at all, if you are set on using the iPad I'd recommend remote accessing either your laptop or a VPS.
Apple is a bit funny about letting interpreters on their system. But there are two main Python apps, that both allow some interaction with the IOS system.
Pythonista (http://omz-software.com/pythonista/) might be what you are looking for. In addition to the standard libraries, it has a number of specialty libraries for interacting with the local OS including location system, contacts, and so on. I do not know if it works with the notification system, but I believe it does. It also has a custom GUI system specifically for IOS which looks a lot nicer than TKinter which normally comes with a stock Python.
Pyto is quite similar, and it's a bit cheaper (https://pyto.app/) It has most of the same features. I know it does work with the notification system and the local file system. It also has access to a lot of great built in libraries and the ability to create home screen widgets, which sounds a lot like what you are wanting.
I've used them both. Currently I have Pyto running and I use it all the time, but mainly just to test code ideas or do a quick demo. (I teach programming in Python as well as other languages.)
Pythonista ( http://omz-software.com/pythonista/ ) is an option for offline, it isn't Anaconda, but it comes with a fair few modules, and it's possible to install others. If you're accessing remote instances, I use Prompt2, but there's also Blink which is supposed to be better for intermittent connections.
Oh great. Glad to be wrong. I'm assuming it can't do anything like access files or directories though? How sandboxy is the sandbox?
EDIT:
> no access to iOS functions required.
But http://omz-software.com/pythonista/
>In addition to the powerful standard library, Pythonista provides extensive support for interacting with native iOS features, like contacts, reminders, photos, location data, and more.
The learning resources in the wiki might be useful. If you have an iPhone then I recommend pythonista which runs standalone on the phone and is surprisingly complete. Similar apps exist for android.
The learning resources in the wiki is where you start. On iOS pythonista is a reasonable environment.
I have no opinion on this app. But if you need/want Python on your iPhone/iPad I'm in love with Pythonista (http://omz-software.com/pythonista/). It has nice bindings to the phone APIs and allow installing pure python packages.
P.S. I'm not related to this project.
could you theoretically skip the raspi and do it straight from the device?
been looking into this myself in order to change the ANC mode on my sony noise cancelling headphones
Pythonista is a pretty full featured IDE for Python that you can run on iOS. It also appears as a quick action, so you can run Python scripts through it directly from other files or the clipboard on your phone.
Continuous is a C#/F# IDE for iOS. It uses Xamarin for providing UI, but lacks an interactive console. Unfortunately, I find this makes it hard to learn the basics with as they tend to start out making interactive console applications.
In both of these cases, you're going to miss out on some basic concepts due to them functioning so differently on iOS (particularly reading/writing files and dealing with file paths).
That said, you don't need a particularly powerful laptop to run Visual Studio and start working on basic C# applications, even with UIs. You could probably get a functional system for a couple hundred dollars and it would allow you to do a lot more.
I have a Surface Pro 4 which was not cheap when it came out but is a couple years and 3 revisions back now. It has a 7th gen i5 and 8GB of RAM. If you can find a system with something similar, you'll find learning programming to be much more enjoyable (I know I did/do).
I have not tried any of these but it does seem like pybee is your best bet. Not sure how mature the toolchain is.
Also, if it is just for you, Pythonista may be fruitful
If you want to run your python script from iOS check http://omz-software.com/pythonista/index.html you can combine it with scheduler to run it recurrently https://www.codementor.io/gergelykovcs/how-to-run-and-schedule-python-scripts-on-ios-fqfxvyp7x
The app is not open source, sorry.
The inspiration for this was another iOS app, Pythonista - an IDE for python.
I personally like the idea of having an iPad app that I can use to quickly write and test small code snippets - for example testing out a particular web API or trying to understand a certain algorithm. And I think JavaScript is a very good language for something like this.
Writing a small business application on an Iphone, using Pythonista 3 (http://omz-software.com/pythonista/) which is a $10 app.
While it's annoying that the integration of Pythonista and a PC doesn't work well enough, I'm amazed what is possible on an iPhone: You can have an app with several forms that collect data and then send them away using requests.
A little warning, if want to try it out, make sure you have a bluetooth keyboard. Without it, writing code of the phone is not much fun.
Also the Pythonista URL Scheme Documentation might be useful to refer to for more complex scripts, such as ones that you need to pass arguments to.
I'd love to have that too. The closest that I can find is something called Pythonista for iOS:
http://omz-software.com/pythonista/
Not quite the full IPython/Jupyter, but a step in the right direction.
I would highly recommend bs4. When I was first getting into programming I wanted to do some scraping and this made it feel incredibly intuitive. It's got good documentation as well.
http://omz-software.com/pythonista/docs/ios/beautifulsoup.html
You're correct; IFTTT recipes will only make copies of your photos (and there's a file size constraint). That would be kind of pointless anyway, as Dropbox has an option in the app to backup your photos. Your best bet might be to see if you can use Pythonista and write a Python script to either move the photo from Camera Roll to Dropbox or else copy it to Dropbox and delete the original from Camera Roll.
EDIT: It seems that deleting the image isn't possible; this is an App Store (and therefore iOS) limitation. See here.
I'm not familiar with bs4. Did you check the type of what select returns? Does that return value have a get_text() method or text attribute. type
and dir
will help you.
I'm trying to do a calender/todo type thing where you can pick a date, write the to do and push a button to add it to a table that is shown.
So most of my code is based on button_clicked. I have read about textfield and table on http://omz-software.com/pythonista/docs/ios/ui.html but I can't figure out how to add the text in textfield to the table.
Thank you for answering and hope this explain my issue a bit better
I do some coding on my iPad using Pythonista, largely because I intend the code I'm writing there to run on the device. All of this code is devoted to a very particular purpose, and often relies on some background work and code being produced on a normal computer.
Pythonista has some clever bits to make coding in an iPad editor a bit nicer (sliding your finger across the top row of the on-screen keyboard allows fine control of the cursor, a feature Apple should steal immediately), but nothing beats a proper keyboard and cursor control for longer coding sessions.
It has modules for graphics, animation, multi-touch, and so on. Check the "Pythonista Modules" info on the Pythonista for more info.
Pythonista can export scripts as Xcode projects for the Mac that can then be used build standalone iOS apps. I don't know what other steps are required to make a pure iOS app from the Xcode.
Pythonista, a full featured Python development environment for iOS.
In any case, the iPhone is perfectly capable of compiling code, but restrictions on the OS level generally prevent it. It is able to do any general purpose computing task on a hardware level, though.
I found this recently, http://omz-software.com/pythonista/. They have libraries to do 2d drawing and such that you run right on your iPad. You can also export an xcode project that I guess you can submit as a real iPad app to Apple. I haven't had much of a chance to play with it yet but looked pretty promising. I think the thing I didn't like about it was that the screen origin is in the bottom left instead of the top left like pygame.