• Thank you. It can be a great alternative to my problem, you have my thanks @mikael.

  • @ccc, would it not be awesome just to be able to update all the pure-Python stuff that you have installed with one command? I do not know what that command is.

  • @procryon, my example is same as @JonB , except I just split it up so you see the root dir for Pythonista etc. Functionally the same. Just more step by step

    import os _root_path = os.path.expanduser('~/Documents') _my_dir = 'Brain' _my_file_name = 'yourfile.txt' my_path = os.path.join(_root_path, _my_dir, _my_file_name) print(my_path) with open(my_path, "w") as f: f.writelines("Hello World")
  • TKInter is a desktop GUI module that accepts mouse input, while the iPhone is a touch based UI. This means there are some interactions and gestures that don't map across between them. For example the phone interface has no analogue of right-click or click-and-drag. Similarly the desktop interaction model has no analogue of a long-press or swipe.

    You can arbitrarily try and assign mappings between some of these, so you could say long press equals right-click, but that might work fine in one application but poorly in another in which long-click might need to be used for another gesture such as to select something for drag-and-drop. No one mapping will work for every application, but at the framework level to make something portable you'd need to have fixed mappings.

    Then you have the issue that the phone doesn't have a concept of floating windows, re-sizable windows, overlapping windows, floating dialogs and menus, scroll bars and many others. How do you do shift-click or control-click on a phone? Conversely on the phone you have conventions like swiping from the edge of the screen and multi-touch gestures. There are very good reasons why even Apple's own OSX GUI framework was not ported directly to iOS.

    It is possible to write UI toolkits from scratch that are designed to map across between touch and desktop paradigms. The way to do this is to identify a subset of gestures and interactions in both models and creating strict mappings between them at the toolkit level. This gives you the portability, but at a cost of sacrificing the ability to use interactions that can't be deterministic-ally mapped to the other platforms. Unfortunately TKInter wasn't designed in terms of sacrificing desktop GUI capabilities in order to make the subset portable to phones, so it has a lot of GUI paradigm interactions and display widgets included that don't port over.

  • For packages hosted on pypy, you can install stash, then use the pip command

    pip install pydicom

    for pure python packages (which do not have C dependencies), this works maybe 75% of the time. in some cases, you may need to use pip download, then manually un tar or unzip the file, and copy the main package folder into site-packages.

    For things on github, you can use git clone, from within stash. Or you can use wget with the github archive url, then un tar or unzip again with stash.

    For individual files, I recommend
    which you set as an application extension script, so you would navigate to the file in safari, then use the share menu to run the savefile script, which will place the file in your Documents folder.

  • Pythonista 1.6 is only supported on iOS 8 or later. Numpy was added with pythonista 1.5. Pythonista 1.5 is only available to devices running iOS 7 or later. If your device only supports iOS 6, you're out of luck. Check Settings>General>Software Update to see if your device can run iOS 7 or later.

Internal error.

Oops! Looks like something went wrong!