Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How to get code into pythonista?
-
I see that you can export a python script from pythonista and Email it to yourself (or export an xcode project, etc). But how do you go the other direction? If I have a python script on my desktop computer how do I get that into pythonista on my iOS device?
-
Have a look at <a href="http://omz-software.com/pythonista/forums/discussion/6/a-simple-http-server#Item_1" target="_blank">this thread</a>
Is this what you are looking for? -
I think so. Thanks!
-
You can always just cut and paste the code into Pythonista but the gisthub trick is also useful.
-
I'm actually having trouble with that - I pulled up the link for the "New from Gist" script in safari on the iPhone and I don't see any way to copy the script contents to the clipboard. If that worked it would be fine. If I use the "copy" command it only copies the page link. Tapping on the page contents doesn't give any select/copy options. How do you copy code from a Safari page so you can then paste it into pythonista?
-
Alright here's what I do:
Open up a gisthub code. Then place your finger on a word until a magnifying glass appears, then release to select one word (or you can double tap a word). You will notice two little circles on the corners of the highlighted word. You can pull those apart to select more text.
Once you select the block of text, an option to "Copy" should automatically appear somewhere on your screen.
http://static.iphonelife.com/sites/iphonelife.com/files/2009Fall/Thumbs/CopyPaste2.jpg
http://www.wikihow.com/Select-Phrases-of-Text-on-an-iPhone/iPod-Touch/iPad
Then just open up Pythonista and paste the code into Pythonista. To paste, all you need to do is tap on the empty line 1 of Pythonista's code window and it will give you the option to paste.
I hope that helps.
-
awesome, thanks! As an aside, I see you can save a script to a gist on github. I noticed, though, that if the script already exists it adds a new one with the same name in github as opposed to updating the existing script.
Any idea how to update an existing gist as opposed to adding a new one with the script contents?
-
.