Search code examples
pythonipad

How use python on ipad?


Recently, I've found that the ipad can run python with a special python interpret. But editing the code on ipad is a terrible nightmare. So how can I push the python code which has been edited completely on PC into the ipad and run it?


Solution

  • If you are using Python for IOS, the following should work, although I haven't yet tried it myself.

    Email the program to your own e-mail account as text. Then read the e-mail message on your iPad in any one of several e-mail applications. Cut and paste the text from the e-mail message into the python editor.

    Don't cut and paste the code into the interpreter. Then you can't save it, at least not in the current version of Python for IOS. Instead, click on the second icon on the bottom (I think that's the icon, my iPad is at home and I'm not home now), to open the editor. You can save files from the editor using the menu button on the upper right; there's a "save" menu item that allows saving the code to a file on the iPad.

    I'll be trying this tonight. Sorry for posting this before trying it, but I'm not sure I'll return to this question later. It 'should' work. (Famous last words!)