omz:forum

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

    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 12
    • Posts 31
    • Best 4
    • Controversial 0
    • Groups 0

    lachlantula

    @lachlantula

    Re-learning Python after a short break.

    9
    Reputation
    1536
    Profile views
    31
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Website firres.site Location Sydney Age 20

    lachlantula Unfollow Follow

    Best posts made by lachlantula

    • Thank you Omz for the immense update!

      I just checked the app store updates today on my device and to my surprise there was a Pythonista update - featuring a huge list of great new features. Thank you very much for your hard work!

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: Latte v1.0 Released (package manger for StaSh)

      good work! I'll definitely check this out.

      posted in Pythonista
      lachlantula
      lachlantula
    • Atom One Dark-inspired theme for Pythonista

      I love to use Atom on my PC, but couldn't really find a similar theme for Pythonista. Cool Glow's background was a bit too harsh for my light-sensitive eyes, so I was using Gold, which had a decent compromise between the two. Today I learnt you can make your own themes, so I tried to make something somewhat similar. Let me know what you think!

      Theme.

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: Simple file download.

      @TutorialDoctor Hahaha, looks like you found my game I made as a joke between me and my friend:P

      posted in Pythonista
      lachlantula
      lachlantula

    Latest posts made by lachlantula

    • UI: text_color animation

      Hi all,
      I’m developing an application with the ui module, but have realised something that I’m not sure is either intentional or just overlooked; background_color can be animated, whilst text_color can’t.
      Here’s an example. You can see that the text colour-changing is out of sync with the smooth background. The text changes to contrast with the background at the time.

      Here is my code for the colour-changing functionality:

      while True:
          r = lambda: random.randint(0, 255)
          colour = '%02X%02X%02X' % (r(), r(), r())
          def determine_colour2(colour):
              (r, g, b) = (colour[:2], colour[2:4], colour[4:])
              # This next bit is pretty complicated, but its basically just an algorithm to find out what colour is needed for text
              if 1 - (int(r, 16) * 0.299 + int(g, 16) * 0.587 + int(b, 16) * 0.114) / 255 < 0.5:
                  return '333333'
              else:
                  return 'efefef'
          colour2 = determine_colour2(colour)  
          def animation():
              v.background_color = colour
              v['chrome']['logo'].text_color = colour2
          ui.animate(animation, duration = 3)
          time.sleep(3)
      

      If anyone can let me know if I’m doing something wrong or if this functionality isn’t implemented into Pythonista at all, it would be appreciated. Thanks!

      posted in Pythonista
      lachlantula
      lachlantula
    • Substituting PyCrypto for PyCryptodome

      Hi all,
      A while ago Pythonista got the pycrypto module added in, which has been very useful. Unfortunately, though, this module is dead and is starting to gain security holes. PyCryptodome is a drop-in replacement, and all code should be backwards compatible. It also adds extra features and is being regularly updated. Check it out. Would be great if we could see this in Pythonista!
      Thanks

      posted in Pythonista
      lachlantula
      lachlantula
    • iOS 11 Integration

      Hi everyone, do we know if there's any plans for Pythonista to add features that increase compatibility with iOS 11 (ie. drag-and-drop, support for the Files app, etc)? Thanks

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: Latte v1.0 Released (package manger for StaSh)

      good work! I'll definitely check this out.

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: Bluetooth keyboard input

      Did you ever figure anything out?

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: Python 3.6

      @omz will old packages still work if 3.6 is pushed to everyone? I need my pycrypto 🙂

      posted in Pythonista
      lachlantula
      lachlantula
    • "Import File" working inconsistently.

      It seems like the "import file" function now available inside the share sheet only works 1/3 of the time for me and my mate. Is there a trick I'm missing or something?

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: file downloader ?

      What @bennr01 said is probably the best choice, but if you ever want to download something else, use:

      import urllib.request
      urllib.request.urlretrieve("direct link to file", "filename.extension")
      
      posted in Pythonista
      lachlantula
      lachlantula
    • Thank you Omz for the immense update!

      I just checked the app store updates today on my device and to my surprise there was a Pythonista update - featuring a huge list of great new features. Thank you very much for your hard work!

      posted in Pythonista
      lachlantula
      lachlantula
    • RE: time.sleep() crashes Pythonista when used in scene, decorated by @ui.in_background.

      I'll give it a try, thanks.

      posted in Pythonista
      lachlantula
      lachlantula