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.
WebIDE
-
The other day I was going to work on a program on my iPad, while sitting next to my laptop. It seemed silly to be writing on an on-screen keyboard when I had a nice keyboard right next to me. Codea has a feature called AirCode, which starts up a web server on the iPad which lets you connect using a computer and write code in a browser and save it to the iPad when you're done. I made something like this using bottle for Pythonista. It doesn't work on my iPad because I have an old version of Pythonista (my iPad can only run iOS 5.1.1), but I have tested it on an iPod with the latest version of Pythonista. If anyone has any suggestions or bug reports, I'd be glad to hear them. Also, if anyone has any idea why it doesn't work on old Pythonista, I'd really appreciate help.
GitHub project here: https://github.com/Ivoah/WebIDE
-
-
The first link you posted is a program that requires something to be installed on the computer, where's mine is browser based, just like AirCode. The second just ends up pointing back to the first, so what was the point of them?
-
what was the point of them?
The point was merely to link to other forum articles on the same topic. That saves people from having to search. Before adding a new topic to the forum, it is useful to search to see if that topic has already been discussed. If so, it is better to add your comments to an existing thread than to create a brand new thread.
I find your code in the repo above to be really cool and I would encourage others to check it out.
-
@ccc Though in general I agree, I think that multiple projects (especially by different people) should not go into the same thread, even if they are similar. Otherwise only the first project in the thread's OP is easily visible and the others are buried under general comments. It's also confusing to discuss two similar, but separate projects in one thread, as it's not always clear which one you're talking about in each post.
-
this is really freaking cool! ty
-
@Ivoah , this looks great. I started the app on one ipad and connected via another ipad. I was just trying to test as I don't have a laptop or was not with my desktop computer.
I know this defeats the purpose doing it like this. But I can see the communication works.
And this may be important or not. But using safari on another ipad to connect, I got a small view of the file as in the pic below.
I haven't had a chance to view it through a desktop yet
Anyway, looks great
-
@Phuket2 Yep, that's what it's supposed to look like.
-
One thing I absolutely love on my macbook is Transmit Disk. It's a feature of Panic's wonderful app Transmit. Basically, what it does is mount a remote FTP server as a disk, and it appears like a USB drive would. It's a magical little thing such that every change I make on the drive is automatically reflected on my web server. It's absolutely awesome.
Anyway, this allows me to edit files on my server using my text editor of choice, Atom. Something like this would be great for mirroring Pythonista files, as I'm able to be much more productive on my Mac.
The Pythonista editor really does do a great job, though, it's everything I could hope for and more considering the tight restrictions it dances around.
-
@Webmaster4o Doesn't OS X support that natively? There's a "Connect to Server ..." option in one of the Finder's menus, there you can enter a server URL to connect to. This works at least with SMB (Windows), AFP (Apple) and FTP. Though last I tried the FTP support was a little broken and I could only read, not write, so perhaps it is useful after all.
-
@dgelessus Maybe, I've never noticed that in Finder. This isn't really the main functionality of Transmit, it's a general purpose FTP client, but I certainly appreciate this feature, as it works absolutely seamlessly.
-
Yeah, I'm pretty sure OS X has the ability to mount an FTP server like a flash drive natively. Anyways, it should be pretty trivial to make an FTP server in Pythonista, using something like this: python ftp server example
-
Finally tried this, and I have to say: Very cool idea and impressive implementation! Thanks for sharing!
-
I wonder if it might be possible to run the server on a background thread, so that it doesn't block the interpreter, and it would be possible to add a "Run" button in the web interface...
Another interesting addition might be Bonjour support via
objc_util
(NSNetService
or something). I don't really have experience with this, so I don't know how hard that would be, but when using Safari/Mac, you wouldn't have to know the IP address of the iOS device... -
@omz From when I've used bonjour, it's really quite cool. The VNC app I use supports it out of the box, and it's really neat. With no prior setup, I can VNC into my macbook from my iPad, and I don't have anything running on the MacBook. They kind of just magically discover each other :)
-
I've implemented Bonjour support, see my pull request.
This way, "Pythonista WebIDE" automagically shows up in Safari's bookmarks menu when it's running. You may need to enable the Bonjour menu in Safari's Advanced preferences.
-
Thanks @omz! I've merged your pull request.
-
This is awesome. Thanks for making this. Now I just need to figure out a way to access it at my school computers.
-
to run the server on a background thread, so that it doesn't block the interpreter,
I tried to run it under the famous Stash shell.
but Stash only supports python 2, and this is for python 3. -
File "...WebIDE.py" with open(fullname, encoding = 'utf-8', mode = 'r') as in_file: # Open the file... TypeError: 'encoding' is an invalid keyword argument for this function
so the problem is function open
after google I added some lines like this:import sys if sys.version_info.major == 2: import codecs open = codecs.open
now it's t compatible with both python 2 and 3.