• georg.viehoever

    Maybe try skyfield, which is pure Python https://github.com/skyfielders/python-skyfield .

    posted in Pythonista read more
  • georg.viehoever

    Six active widgets...
    Now that the Pythonista widget has worked once, it seems to work fine every time. Strange.
    Georg

    posted in Pythonista read more
  • georg.viehoever

    After the .10 update this evening, it stopped working again. The widget was at the lower end of my displayed widgets, and did not show the run-triangle nor the script result. It started working after moving the widget to the top of the list.
    I wonder if the widget position contributes to the problem, or if the python interpreter running the widget just needs a lot of time for the first start up.
    Georg

    posted in Pythonista read more
  • georg.viehoever

    Seems to be working now. I did not see the run button during my previous attempts. Maybe I was too impatient with my slow iPad 2...
    Resolved! Thanks,
    Georg

    posted in Pythonista read more
  • georg.viehoever

    I tried to create a simple today widget for the latest Pythonista Beta that just prints the time. The widget logo shows on the screen, but nothing else happens.

    '''testing today widget
    '''
    import datetime as dt
    print('Python time is %s'%dt.datetime.now())

    What's needed to get this working?
    Georg

    posted in Pythonista read more
  • georg.viehoever

    @ccc async, await, asyncio etc are not really about threading or multiprocessing. It is more like co-routines, running everything in a single thread and handing control to the next routine at defined scheduling points (the await statements).
    Georg

    posted in Pythonista read more
  • georg.viehoever

    @techteej I Did see no problems on my ipad2 ios9.1
    Georg

    posted in Pythonista read more
  • georg.viehoever

    @polymerchm said:

    ... OMZ is probably already skating close to Apple's comfort zone so why wave another red flag at the bull. There's always swift and objective-C.

    You are probably right ....

    posted in Pythonista read more
  • georg.viehoever

    That's really a pity. I had a look at the developer documentation and review guidelines for healthkit: Apple appears to have very high requirements for applications that use healthkit. Amongst these: The app needs to be dedicated to health, you need to have a compliant privacy policy, you must not export health data, etc. . On the one hand, I like this (since my data deserves privacy), on the other hand those limitations can sometimes be annoying...

    Having said that: Applications such as Workflow allow to read and write healthkit data, there are even workflows that allow to export heath data, Workflow is not health specific, and there is nothing regarding health data in Workflow's privacy policy. Actually, I think that's quite OK since those workflows don't run automatically, and since the app needs to ask for permissions beforing reading or writing to HealthKit. But how is this different from what you can do in Pythonista? I wonder why Apple might see Workflow different from Pythonista.

    As a consequence, to record some health data, I now have a Workflow workflow with a few dozen elements. The same could probably be done with 20 lines of Python in Pythonista, in a much more concise way.

    Just wondering,
    Georg

    posted in Pythonista read more
  • georg.viehoever

    What does it take to access Healtkit data from Pythonista? Is there some library available, or do I need to learn objc_util?
    Thanks,
    Georg

    posted in Pythonista read more
  • georg.viehoever

    It currently appears to be impossible to get the Python interpreter back into a defined state - short of killing and restarting Pythonista. There are many places where Python keeps state, and you cannot get rid of it by reloading modules.
    A "reset Python interpreter" functionality would help for most cases - only if a binary lib gets into an undefined state would still require the kill/restart procedure.
    Georg

    posted in Pythonista read more
  • georg.viehoever

    Yes, clicking top Right Works.

    posted in Pythonista read more
  • georg.viehoever

    I ran Clock.py within Safari using the Share sheet "Run Pythonista Script" entry. The Clock was Displayed correctly, but i Found no way of Stopping the Clock Short of killing Safari (the Usual X Button is Outside of the Display bounds).

    Maybe you add some mechanism to terminate Pythonista Skripts Running as extensions.

    Georg

    posted in Pythonista read more
  • georg.viehoever

    Now here is the weird thing: using the Workflow App, I can run a Pythonista script as part of a Workflow. A Workflow can be run from within the App, from a Share sheet, from the home Screen, from the today Widget. As a consequence, I can run Pythonista scripts in These Ways as well.

    If Apple Allows this between Apps, i Would think that they permitted it within a Single App as well. Of Course i cannot read Apple's mind...who can πŸ˜’?
    Georg

    posted in Pythonista read more
  • georg.viehoever

    I should have searched firstπŸ˜”
    Would it be possible to make this a Standard Pythonista Feature? It Appears that Other Apps such as Workflow https://workflow.is/ have it, and it Appears reasonably simple to implement...
    Georg

    posted in Pythonista read more
  • georg.viehoever

    In Safari, it is possible to add shortcuts to the iOS homescreen. These shortcuts Open a specific web Page. Is it possible to add a shortcut that opens a Pythonista Script?

    Georg

    posted in Pythonista read more
  • georg.viehoever

    @ccc I know! But a reset is even better... It helps with monkey-patched methods, misconfigured globals, and a lot more circumstances that can make a running Python interpreter behave weird.
    Georg

    posted in Pythonista read more
  • georg.viehoever

    I Would like to have a Button that Resets the Python Interpreter into the State that it has when the Application is launched . Use Case: when developing a Module, it is difficult to convince Python to reload changed module sources. Reset Would make this easy and Would also be a way to get Pythonista into a well defined State in Case of Other Problems. Currently, this requiries killing pythonista from iOS, which is a bit annoying.
    Georg

    posted in Pythonista read more
  • georg.viehoever

    Cool!
    As Ideas for the product:

    • make the Editor Action Part of the Standard Produkt. Maybe as an Action item on the Special Traceback view of the Editor.
    • make "run with pdb" an Option on the run (>) Button, Maybe when Held down for a longer Time

    Just Dreamlng πŸ˜€
    Georg

    posted in Pythonista read more
  • georg.viehoever

    Ipad2, iOS 8.4.1, Pythonista1.6 Beta:

    >>> import sysconfig
    >>> sysconfig.get_platform()
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/mobile/Containers/Bundle/Application/22209BDA-9306-47FF-9078-F00CD4EA7E10/Pythonista.app/pylib/sysconfig.py", line 603, in get_platform
        import _osx_support
    ImportError: No module named _osx_support
    >>> import platform
    >>> platform.platform()
    'Darwin-14.0.0-iPad2,1-32bit'
    

    @Olaf : Same code in 1.6 Beta

    posted in Pythonista read more
Internal error.

Oops! Looks like something went wrong!