• I have finally managed to install Synchronator on a pristine Pythonista install. Just for reference for other users, I show here the instructions:
    Set default interpreter to 2.7
    Install import requests as r; exec(r.get('http://bit.ly/get-stash').text)
    Launch stash
    (check latest versions with pip versions package)
    pip install urllib3==1.23
    pip install requests==2.19.1
    pip install dropbox==9.0.0
    move all folders from site-packages-2 to site_packages
    Set default interpreter to 3.6
    Get Synchronator from GitHub
    Install Synchronator
    Optionally change the horrible colors the scheme of Synchronator

  • Found the problem. The script assumes /home/user is the path.

  • >>> sys.path ['/private/var/mobile/Containers/Shared/AppGroup/C534C622-2FDA-41F7-AE91-E3AAFE5FFC6B/Pythonista3/Documents/site-packages-3', '/private/var/mobile/Containers/Shared/AppGroup/C534C622-2FDA-41F7-AE91-E3AAFE5FFC6B/Pythonista3/Documents/site-packages', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/PIL_compat', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/lib/python36.zip', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/lib/python3.6', '/var/containers/Bundle/Application/DBC1896E-6227-4695-9B4B-AC1340AD4945/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/lib/python3.6/lib-dynload']

    which shows that site-packages-3 takes precedence over site-packages which takes precdence over the build in modules. (in the 2.7 interpreter, it uses site-packages-2 and site-packages) That is nice because you can update certain things, though you must also be careful you don't make a module with the same name as a builtin.

    Some other info which might be useful, during startup, pythonista tries to import a module pythonista_startup which you could place in site-packages (applies to both interpreter) or site-packages-3. You could have your startup download weekly assignments or examples, print instructions, etc.

  • @cbanta, what is the exception? Install the fault handler to find out.

  • here are a few functions which allow you to get the top, root or entire view stack of a navigationview

    def get_top_view(navigation_view): '''returns the top (aka visible) view from a navigation view''' import ctypes return navigation_view.objc_instance.navigationController().topViewController().view().pyObject(restype=ctypes.py_object,argtypes=[]) def get_bottom_view(navigation_view): '''returns the top (aka root) view from a navigation view''' import ctypes return navigation_view.objc_instance.navigationController().bottomViewController().view().pyObject(restype=ctypes.py_object,argtypes=[]) def get_view_stack(navigation_view): import ctypes nc= navigation_view.objc_instance.navigationController() view_list=[] for vc in nc.viewControllers(): view_list.append(vc.view().pyObject(restype=ctypes.py_object,argtypes=[])) return view_list def pop_to_root(navigation_view,animated=True): '''pops all views to return to the original root view''' navigation_view.objc_instance.navigationController().popToRootViewControllerAnimated_(animated)
  • i think the number type is applicable to iPhone only, where it shows the number keyboard. on iPad, they keyboard type doesnt really do anything. it would be neat to combine cvp's custom keyboards with dialogs!

  • See this example at the end of the discussion. I hope that it is useful. (Note that the update function is now available on the latest version of pythonista.)


  • You could try installing the master version

    selfupdate -f master
  • @ihf You're right. I don't understand where this "action="is gone 😅
    Sorry for that and thanks for your help

    I don't think it would be possible to do an automatisation of the steps in Safari, but I'm not a big specialist of Objective-C

  • I tried, without any success, to convert this in Pythonista 😢

  • @dgelessus, on iPhone the undo is available by long-pressing the rightmost aux key, :.

    Not very convenient when you need to do it several times, but still better than shaking.

  • @jacobengland16, I use a simple script that uses SSH to send the whole working directory to Raspberry Pi. It then runs the code remotely on the Pi and displays the (textual) results.

    Very handy for when you develop on the iPhone, and want a very tight feedback loop for deployment and testing.

    Let me know if this is relevant and I will share the script.

  • Thanks ,I used Auto-Lock in settings to 30-Seconds and used


    Untill the timer runs out and changed the flag to False.

  • hey thanks @mikael. markdownview looks like it has the kind of functionality i'm looking for. i'll have to explore that. i'm coming over from editorial and haven't quite figured out yet what the best way is to download these scripts into pythonista on my iphone. once i do, i'll check this out. thx for the help

  • Have you tried this?

  • the other trick, if you plan in being able to run other scripts, is you need to bypass global clearing for your code.

    there are a few ways to do this. the best way is to have all of your code in a module that is in site-packages, import the module, then call some main() to show the ui. modules in site-packages don't get cleared when running other code. Other approaches are to ensure everything you need is in a single custom view class, with no use of globals (callbacks should use self, or sender). all methods should explictly import anything that is needed, since imports might dissappear from globals. when you present the custom view, the object won't be cleared until it is explictly closed.

  • @Olafski

    You are a champion! Saw the box in the upper left, entered “google” and there it was. Simple but not obvious to me. Thank you for the help.

  • i know editorial supports critical markup per this thread. however, i would like to change the normal == markers used for criticmarkup highlight to my own custom tags :: (double colons).

    is this possible if so how? also how can i change the default syntax colors used for text highlight on text surrounded with == markers

    if i can't edit the default rules supplied with editorial for == and i must use my custom snippet approach described above to wrap :: for highlight, then

    how / where do i add a syntax color highlight for text surrounded by double colons (::) in the editorial's normal edit view?

    finally, vim syntax configurations allow you to "conceal" the extra md characters that are used in wrap pairs like bold, italic, bold + italic (ie unless you are on the line being edited, you do NOT see the characters in the normal edit view.. which is great b/c it makes reading the md documents easer to read and work with after you've edited the document by placing the bold, italic, etc marks). editorial goes half way there, by "dimming" (reducing the transparency) of the special md markup characters but not entirely removing them from the display. it's good but if you have md wrap pairs that consist of multiple characters (like critical markup and bold+italic (three asterisks), they start cluttering up the text and make it hard to read.

    so is it possible to "conceal" md marker pairs in editorial like vim in normal mode and if so how /where?


Internal error.

Oops! Looks like something went wrong!