omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. oldCovfefe

    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.


    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 6
    • Best 1
    • Controversial 0
    • Groups 0

    oldCovfefe

    @oldCovfefe

    3
    Reputation
    540
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    oldCovfefe Unfollow Follow

    Best posts made by oldCovfefe

    • RE: Reverse Geolocation works on console but not in code

      I finally found the issue. The code works fine on the main level of the app, but has these issue when triggered from a event handler (a function call from an action attribute). The following directive solves the issue:

      import location
      
      @ui.in_background
      def button_tapped(sender):
         location.start_updates()
         loc_dic = location.get_location()
         addr_dic = location.reverse_geocode(loc_dic) 
         ...
      
      posted in Pythonista
      oldCovfefe
      oldCovfefe

    Latest posts made by oldCovfefe

    • Deploying pythonista scripts/bytecode to other users of pythonista

      Hello all,
      I am looking for a proven workflow to distribute a python script to others that run pythonista on IOS. Ideally I would like to only distribute .PYC compiled code without the underlying .PY source, if that is possible. I have successfully compiled my script using py_compile and it creates bytecode files in the cache. Now the question is how do you run it without the source?

      import myscript
      

      will run it, if the myscript.py is present, not so much if it's missing and only the PYC is present. I did try with both settings for "sys.dont_write_bytecode" just in case that would also affect the loading behavior. Do I need to move the PYC file from the cache to the main directory?

      Also, what's the best way to package it, so that other can unpackage it on their phones with copy/pasting source code etc.?

      Thanks much for any help you can provide.

      posted in Pythonista
      oldCovfefe
      oldCovfefe
    • RE: Reverse Geolocation works on console but not in code

      I finally found the issue. The code works fine on the main level of the app, but has these issue when triggered from a event handler (a function call from an action attribute). The following directive solves the issue:

      import location
      
      @ui.in_background
      def button_tapped(sender):
         location.start_updates()
         loc_dic = location.get_location()
         addr_dic = location.reverse_geocode(loc_dic) 
         ...
      
      posted in Pythonista
      oldCovfefe
      oldCovfefe
    • RE: Reverse Geolocation works on console but not in code

      tried that, but it only resulted in a hung loop ... there is something else funky going on, because from the console it works just fine.

      posted in Pythonista
      oldCovfefe
      oldCovfefe
    • Reverse Geolocation works on console but not in code

      Code snippet:

      import location
      
      location.start_updates()
      loc_dic = location.get_location()
      addr_dic = location.reverse_geocode(loc_dic)
      

      Get location works fine, converting it to a friendly street address does not. When I enter the same statement (the last line) in the console, it works just fine and creates a dictionary with all the interesting info. Any ideas what could be going on? Is it a timing issue, meaning I have to wait until it’s populated?

      Thanks

      posted in Pythonista
      oldCovfefe
      oldCovfefe
    • RE: Complete doc/refernce for ui.ImageView

      Thanks. I understand they are not the same image types, and the conversion is straight forward, but problem remains ui.ImageView as a class is not documented. I checked "?" in the console, and it's the same as online at the web site. There are only 3 items in the docs, the constructor, the image "attribute" (property) which is an ui.Image object type, and one method, i.e. load_from_url(url). There are however many other attributes, such as width, height, autosizing, alpha, background_color, etc. a lot might be inherited from iu.View() but there might be more.

      posted in Pythonista
      oldCovfefe
      oldCovfefe
    • Complete doc/refernce for ui.ImageView

      Hello all,
      new here. Really like Pythonista for prototyping and messing with REST Apis. Also love the idea of including iPhone/iPad specific capabilities. Working on images and photos from camera and camera roll. I see that ui.ImageView has many attributes and methods, but I cannot seem to find any doc for it. The online doc shows 2 or 3, and code complete teases me with whats available, but doesn't tell me the parameters and such. Any pointers where to get a complete reference? Thanks much.

      posted in Pythonista
      oldCovfefe
      oldCovfefe