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.
Pythonista 1.6 Beta
-
Ole, I saw your post about the new Workflow app, and I went and downloaded it. I see that it has support for Editorial and Pythonista.
I am supposing you are adding some type of extensions support in this version, I am just wondering if you are now considering adding something a little special for this new (and soon to be very popular) app.
-
@TutorialDoctor what is this workflow app you speak of?
-
Workflow: Powerful Automation Made Simple by DeskConnect
It is a way to automate in IOS, like Automator for the mac, or Launch Center Pro. But it is so advanced as to be able to use Pythonista and Editorial to enhance automation.
You can pass command line arguments from the app to a pythonista script, and use the result elsewhere in the app, or as an extension for other apps.
These workflows can be saved on the home screen, or can be used from the share sheet as an extension of its own.
-
@TutorialDoctor Thank you, Looks very interesting, Just picked it up.
-
Not to make this thread about Workflows.app - but there currently is a bug that when you call a workflow from the action extension which calls a Pythonista script that takes input (args) - Pythonista will open but the script will not run.
-
I have been finding bugs myself, but I expect as much from such an app. That is why I am wondering if this 1.6 update will make the process a little better. The Workflow app is fresh-baby new.
If Pythonista is getting Bluetooth support, then having Editorial, Pythonista, and Workflow, along with the Switch Controls (if you use it) makes the iPad one of the most productive mobile devices ever, and at this point, I find it more productive than my laptop in some cases.
Then all we will be waiting for is more power from the hardware side.
-
Does anyone have any example scripts of things that you could do with the new
cb
BLE module? I have a couple of Light Blue Beans and don't really know where to start. -
@hyshai I started with the examples. Just edit them. I used them to find all the services and characteristics availiable on bt devices. Then I started reading to see what info I could get. See if you can find info on Light Blue Beans in reguards to the offered characteristics and services. I just tinkered and played and have a Raspberry Pi working headless over bt.
-
I have been looking for a way to use an iPod touch as a switch control for the iPad. Anyone know if the BLE module would allow this? I haven't downloaded the beta, because I don't want to overwrite the current version.
I'd like a software switch control.But it would seem the pi could be used to interface the interaction?
-
@briarfox
Thanks - I'm trying to wrap my head around profiles, services and characteristics and what they each are/do.I'm wondering if Pythonista will be able to read serial output https://punchthrough.com/bean/arduino-users-guide/#wireless-serial
-
@hyshai - Briarfox is correct that you should be able to just hack one of the examples and pickup a "Bean" peripheral and find its services and characteristics. You probably already have the LightBlue App already, so you can use its internal browser to check that your python code is seeing these things. The Bean docs are very unclear on how they expect you to access it and which characteristics to use. What I have learned is that they want you to communicate via one of the provided "Scratch" characteristics and not use the serial characteristic. The Scratch characteristics allow you to easly read and write up to 28 bytes of data. I have written Arduino sketches that do this and verified that the cb module can access these. I would like to get the serial communication method working as well because it allows you to access all the on board sensors without involving the Arduino. The Arduino part of the bean sucks down power rapidly so you can easily write sketches that don't do much but kill you battery within hours.
That's the good news. The cb module works fine for a single Bean. The bad news is that the cb module does not seem to be designed to support more then one peripheral at a time. I have four beans and have been struggling to write an app that can reliably browse and manage them. The cb callbacks run in multiple threads and I am having difficulty figuring out how to correctly deal with this. The code I currently have is way to ugly to share. You will notice from the docs and samples that did_discover_characteristics, did_write_value, did_update_value to not give you the peripheral that these callback are associated with so you have to match it up yourself and this is tricky.
There are also some other caveats. There is something going on with "weak references" that you have to be very careful with. The docs tell you to keep a reference to the peripheral object passed to you and this seems to be true of any other objects such as services and characteristics. If you don't keep a reference to these for the duraction of their use, you can see them get garbage collected on you and then you are in trouble.
I have also found out the hard way that the only reliable way to test a script is to completely restart Pythonista each time. If you don't do this, you can see the same periheral reported during a scan for peripherals with different object addresses. You can have "old" ones and "new" ones that are actually the same peripheral. The code I am currenty working on tries to cache references to all peripherals, services, and characteristics in a tree of dictionaries keyed by the uuid of the object. It should be easy, but I am learning python and don't know how to code it so that it is thread safe yet.
-
Hi @Omz. Sorry it took so long for me to get back to you, I was somewhat busy for a while.
Anyway, I found a few possible quirks.
<ul>
<li>[Major] Some scripts are deleted after accessing them, then closing the app. The file remains, but is blank when an attempt is made to access it.</li>
<li>[Minor] When typing, a random character is occasionally chosen between spaces, instead of the intended character. This might just be a problem with my keyboard, though.</li>
</ul> -
@TutorialDoctor, I just downloaded Workflow. It's a nice app, but the gallery doesn't display the top row of workflow categories on my iPad Air 2. Anyone else experiencing this problem?
-
@wradcliffe
Thanks so much for your thorough post - very helpful! I'm going to see what I can come up with using your tips and gotchas. -
I had an odd occurrence today in the IDE. I came back to my iPad after leaving it sit for a few hours. Went into Pythonista and found my self browsing in the App bundle section of the environment. It was COOL. When I moved down into Documents folder again it was all over and I can't say how I got into the place. Is there some trick to getting there in the IDE that is know? Now that I know it's possible - I want it!
UPDATE: I figured it out. Use importfinder to open up the code to a module like "wave" in the editor. Then make Pythonista exit while the editor is open. Start up Pythonista again and you find it browsing the directory where that code exists. It is a long way back from this location using the Back button to get to Documents again.
-
@wradcliffe, this has always been possible, albeit with the help of a few scripts. I don't think Apple's kernel sandboxing applies to the accessibility of the app bundle. The method in which you were able to access the app bundle is strange, to say the least.
-
Paramiko module version included in 1.6 beta?
This is a pretty minor question, but I thought I'd ask: Would someone helping with the 1.6beta mind checking this? (In REPL/Console just enter 'import paramiko;paramiko.__version__' )
Pythonista 1.5 comes with v1.13.0 of this module. I've been digging into the Paramiko APIs the past few weeks and was just wondering if the included version had been updated.
Thanks!
-
Just checked, the 1.6 beta has the same version of paramiko as 1.5.
-
Only a few more days till this beta build expires, a new one coming soon? Still some thoughts of mine:
- [Bug] When archiving a folder/picking a script to send as an email in the export menu, the email share sheet is never presented.
- [Bug] Some scripts are deleted after accessing them, then closing the app. The file remains, but is blank when an attempt is made to access it.
- [Feature Request] Color picker dialog
- [Feature Request] In form dialog - when a password field is added, can we set the placeholder to be in regular text instead of password (hidden) text?
- [Feature Request] iOS Calendar Module (similar to reminders module)
-
Will 1.6 include functional Xcode export? The current 1.5 template-based approach is broken with the latest Xcode.
Thanks.