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.
PyCharm plugin idea
-
Hi,
when I don't use Pythonista, I do use PyCharm on my Mac. Would anyone be interested in PyCharm plugin allowing you to run / test project remotely in Pythonista? It's still just an idea, if lot of people will like it, I'll probably do it. Still investigating, not promising anything, I have no idea how much work this is (never wrote plugin for IntelliJ IDEA).
Z.
-
Hi zrzka, in my opinion it is a good idea to have a full working Python environment that works remotely for any tasks that Pythonista alone can not perform (due to the lack of not-pure python built-in libraries for internal storage limits, certainly not due to its very nice and powerful IDE and files manager).
In my opinion, the key points for an addition of "batteries" available online through a remote full working Python with X Gb of ram, Y cpu power and Z Gb of storage (for saving scripts or full projects) are:
- free account with login (with pay option if user wants more features or more computation power);
- possibility to install/setup not-pure Python libraries inside the remote Python core; as user can not install not-pure python libraries in Pythonista, he should at least install them with the remote Python core (that, most likely, should have a built-in set of compilers to build libraries written with combination of C,C++,Fortran, etc...);
- good integration with Pythonista IDE, that is:
a) the output of any work performed with the remote Python should be imported easily inside Pythonista console or variables manager (so 2d or 3d plots, videos, images, arrays, pretty printed latex formulas, etc...);
b) all files that are saved inside the remote hard-disk should be saved also inside Pythonista, if user wants (backup);
c) with smartphone it is good, in my opinion, to perform some tasks with the minimum number of keys to touch, so if user is coding his main script with Pythonista and the script needs to link to the remote Python core to perform some tasks that Pythonista can't do (scipy, pandas, fipy, etc...), it would be a good idea to allow user to use the remote core with functions that are executed inside the main script: to run the script user should only touch the classical key |> that executes pure-Pythonista pieces of code, then executes not-pure Pythonista pieces of code with the remote service, then executes pure-Pythonista pieces of code with the output of the remote service, and so on.
These are only some key points to think of a more powerful use of great Pythonista.
Thanks
Regards
Matteo -
Hi Matteo,
that's also nice idea, thanks for the input! I would rather see opposite direction -> allow desktop users (faster development, better IDE, ...) to develop Pythonista scripts / apps. Lot of people has just iPhone, small iPad, no external keyboard, ... and it's quite pain to develop something bigger.
For example, I can't imagine that I'll develop same apps I did again without Black Mamba and external keyboard. Surely possible, but it will be big pain and very slow process.
Anyway,
thanks again! -
@zrzka , I was actually thinking the same thing. I started writing a reply. Then I finally deleted it. It seemed like it would be very hard for anyone to do. But if it could be done it would be great to be able to code from PyCharm to Pythonista. My simple understanding of maybe how it could be done is running a server app in StaSh that you connect to from a PyCharm Plugin to be able to load projects(directories) and edit them in PyCharm and sync them back to Pythonista. Then even better if you could run the code and have it show up in an emulator window on the mac.
LOL, I am close to deleting this reply again....
What is really needed is an iOS Emulator on the Mac. I have never really understood why they haven't done it. I guess marketing/security etc... Its such a shame though. I have often though how cool would it be to have my iOS apps turn up as widgets under macOS. I assume this is something only apple could ever do. Even a slow Emulator would be nice.
Oh, well, i wont delete this reply. But will drink another whisky :) -
@Phuket2 not so hard on Pythonista side, you can just run script which can listen, ... and use the other interpreter for executing what you have done. Not sure about IDEA, total Java noob :)
There's an iOS Simulator and quite frankly, this simulator is superior. But you can use it with Xcode only when you're developing apps. I don't see a big use for standalone iOS emulator, so, you can run whatever you want inside it, even apps you do not have source code for and are installed on your devices only. I disagree that it's a shame :)
-
@zrzka , hmmmm....yes you are right! God damm it!! LOL. I think I have opened XCode 3 times or something. Just to look and by accident via file association. Just from what I have seen, I know you could run your own app there, but didn't realise you could run any of the apps there. I will take a look in the morning and see if I can make heads or tails of it. I am pretty sure I am in the app dev program. So I should have all I need, i think....
-
@zrzka Hi zrzka, sorry but I can't understand your idea, which between the following two:
- use Pythonista to create, remotely, softwares that are compiled with XCode IDE, available only for Mac and installed on a remote computer;
or - use Pythonista IDE to create scripts or full python libraries using, as main core, a remote python environment installed in a remote desktop (for Win, Linux, Mac)?
If your idea is the first one, so I'm not very interested on it, because I have not a Mac and I don't want to learn the programming language for XCode.
If your idea is the second one, I like it very much. Based on a script by JonB (thanks!), for now I'm working on a very simple script that, imported in other scripts, can pass, like a function, several full sage external files to SageMathCell and can use the output of the several remote computations for any porpuses inside main script created with Pythonista using the idevice itself. The only type of outputs I want, from sage server to Pythonista, is real/complex MxN arrays (or numbers): with arrays user can create plots or animation of several plots using only Pythonista built-in libraries (matplotlib for example).
My target is to have more math power inside Pythonista, and Sage can offer, for now, updated remote python libraries like scipy and pandas. I' m working also, in my spare time, to create a modified version of the FiPy library (that can solve numerically PDEs systems with Finite Volume Method) in order to use it with Pythonista: the solver of FiPy should be replaced by the remote solver provided by SageMathCell, that can use any scipy numerical solvers.I'm still learning to program in python and it is very nice. But I have no programming background, so my python solution could be not nice.
Thanks
Regards
Matteo - use Pythonista to create, remotely, softwares that are compiled with XCode IDE, available only for Mac and installed on a remote computer;
-
@Matteo Neither one. Kind of opposite direction of your point 2.
When I'm on Mac, I use PyCharm. Far superior IDE for Python development than Pythonista. To be clear, I love Pythonista and it's nothing against it. Sometimes, it's faster to use PyCharm than Pythonista. And when I open project in PyCharm, I can run it if it doesn't depend on Pythonista modules. Otherwise I have to mock Pythonista modules and do some crazy things. But still, it's hard to mock UI, interactions, ...
And I'm thinking about plugin, which can ...
- sync project to Pythonista OTA,
- run / debug it inside Pythonista OTA
... from PyCharm. This also assumes some script on the Pythonista side, but it's the smallest problem in this idea.
To sum it up, I would like to develop for Pythonista on my desktop. Use iPad & Pythonista during development like iPhone simulator (not acutally simulator, because it's real app, real environment, ...). And when finished, just run the result within Pythonista.
-
@zrzka Thanks zrzka for your explanation, I have understood. Too advanced for me, sorry, I don't know PyCharm (never used it), but thank you anyway for your work.
Bye
Matteo -
Guys, another simple idea. But unlikely unless some rules change. But if there comes a day where Pythonista files could be hosted on something file Dropbox this could provide write/edit/run workflow. I use a folder on Dropbox when I am at home playing around on different MacOS devices for coding. I generally use PyCharm, but sometimes use other simple lightweight Python UIs. Also with venv, is still fast enough for me.
This is a little dis-jointed, but a remote drive idea still gives you more options. Again, would depend on the rules and the speed you could read and write to the device. Mind you we are talking about kbs in most cases.
I could imagine, it would not suit everyone as if you are offline so are your files, although that could be handled switch a background process that mirrored your virtual remote volume so to speak. Maybe what I say is dribble. I am not sure. I was just surprised how well it worked on my various devices using MacOS.