omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. AtomBombed
    3. Best

    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 1
    • Followers 0
    • Topics 36
    • Posts 149
    • Best 22
    • Controversial 0
    • Groups 0

    Best posts made by AtomBombed

    • Latte v1.0 Released (package manger for StaSh)

      Some of you may know about my project called Latte. It's been somewhat difficult to make work up to this point, but I've finally added enough features and fixed most of the bugs. Now, I'm happy to say I'm releasing the first steady version of a package manager just for StaSh.

      If you want to check it out, head over to https://github.com/Seanld/Latte. There's also documentation located over at http://seanld.me/latte which provides much simpler and specific details about how to get started using it.

      Hopefully this is a useful tool for everyone! It took me a long time to develop.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • BioLib

      I made a little module that I have ended up using a lot. It can encode strings of text into RGB color values, store them as pixels on a .png image, and then save that image for consistent storage. Once you send the message to someone, they can use the decode function and it will iterate over the darkened pixels, and return the string of text that that image has stored in itself. Pretty cool?

      Here is the source...

      # coding: utf-8
      
      import Image
      
      def bencode(filename,plain_text): # returns true or false depending on if it successfully saves the photo.
      	try:
      		coded_image_width = len(plain_text)*5
      		bioMessage = Image.new("RGB",(coded_image_width,1),(255,0,0))
      		bioMessageLoaded = bioMessage.load()
      		newPixelPosition = [0,0]
      		for char in plain_text:
      			asciiEdition = ord(char)
      			bioMessageLoaded[newPixelPosition[0],0] = (asciiEdition,asciiEdition,asciiEdition)
      			
      			newPixelPosition[0] += 5
      		bioMessage.save(filename)
      		return True
      	except:
      		return False
      
      def bedecode(coded_image): # returns a string of the decoded message.
      	encodedPNG = Image.open(coded_image)
      	encodedPNGLoaded = encodedPNG
      	endtxt = ""
      	newGrabPosition = [0,0]
      	charsAmount = encodedPNG.size[0] / 5
      	for reading in range(charsAmount):
      		pixel = encodedPNG.getpixel((newGrabPosition[0],0))
      		endtxt += chr(pixel[0])
      		
      		newGrabPosition[0] += 5
      	return endtxt
      
      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: 2 (easy) Questions
      def button_tapped(sender):
          previousAmount = sender.title # sets previous button's title in a variable.
          sender.title = previousAmount + 2 # adds 2 to the title, and displays it.
      
      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Thoughts on Pythonista subreddit?

      @JonB it definitely takes some getting-used-to. But once you've gotten into it, it's actually really enjoyable to use.

      The upvote and downvote system is pretty handy, the comments are nested nicely, and the community isn't normally super toxic (depends on what subreddit you're in). I don't see ours being bad, though.

      I use the Boost app on Android, personally, and it works like a charm. It has the functionality you're looking for. Unfortunately with the fact that Pythonista is an iOS app, and you're still using this forum, you're probably still an iPhone user, so that might be out of the picture.

      I guess it depends on what client you use. I have always hated the Reddit website. It's disgusting. The remodel helped a bit, but I still prefer client apps.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Thoughts on Pythonista subreddit?

      Reddit is awesome, and it already hosts many forum-like subreddits that do very well themselves. I think it'd' be a great idea to migrate. Security in terms of our data is good, and the accessibility of Reddit is a plus as well.

      I wasn't really a huge fan of NodeBB from the start.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: StaSH - is it possible to get color output from a script to the StaSH console?

      Or you could just use base escape codes. That's what I use since they're cleaner and more dynamic:

      class stashansi:
          fore_red = "\x9b31m"
          fore_blue = "\x9b34m"
          fore_end = "\x9b39m"
          back_red = "\x9b41m"
          back_blue = "\x9b44m"
          back_end = "\x9b49m"
          bold = "\x9b1m"
          underline = "\x9b4m"
          all_end = "\9x0m"
      
      print(stashansi.back_blue + stashansi.fore_red + "Hello world" + back_end + "This is just red with no blue background" + fore_end + "Now it's all just normal text...")
      

      Be aware that whenever you print something with ANSI escape codes, you MUST use the ender escape codes to change the colors back to the original state, or else if your program ends, the colors will continue to be the same even outside of your program!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Paper for UIs

      I made a little UI application that takes advantage of this cool new drawing view. It currently only works successfully for iPad 4 as far as I know. There are some problems with the cross-device mathematics that resize everything to fit the user's screen, no matter the device. But obviously it doesn't quite work yet.

      You can go check it out here.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • Paper for UIs

      I was messing around on a drawing app that I have earlier today, and thought to myself, "I bet I could make my own view for simplistic drawing in Pythonista using the ui module." Okay, maybe not that precise, but I was sure I could make something that would make it easy for anyone making their own apps that require drawing capabilities.

      After hours of nonstop work, I have got the first edition of the product ready to go.

      Click here to see it.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: scene vs. ui

      With ui, you can create your own custom view by having a class that inherits the ui.View object's attributes.

      With your custom view class, you can then add a draw method which is like update from scene, but for that view specifically. The view could be the root view of your clock.

      Example:

      import ui
      
      class ClockView (ui.View):
          def __init__(self): # operates just like "setup" from the scene module. Feel free to add arguments.
              pass
      
          def touch_began(self, touch): # called when a touch on the view is recognized.
              pass
      
          def touch_moved(self, touch): # called every time the touch moves across your view.
              pass
      
          def touch_ended(self, touch): # called when the touch leaves the screen (ends).
              pass
      
          def draw(self): # operates just as "update" works in the scene module.
              pass
      

      Hopefully that helps.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Pythonista Slack or Mattermost

      @cook a bit more personalized. I enjoy chatting on it a bit more that on here. It's quicker, you get actual notifications, and like I said: personal. People are willing to chat with you, collaborate, discuss ideas, and ask questions.

      You should join it.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Python 3.x Progress Update

      @omz oh ok. I was just wondering if it was something new I should be excited about. Thanks!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: 2 (easy) Questions

      If you set your password alert in a variable, then you can use that variable for the TextField's text value. Example:

      import console
      
      myPassword = console.password_alert()
      
      print myPassword
      

      This would print out the password that the user inputted.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Rotating Sprites to Face Movement Direction in Scene

      @Webmaster4o alright thanks. Appreciated!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Rotating Sprites to Face Movement Direction in Scene

      @Webmaster4o I'm actually a 9th grader, too. You'd be surprised. I learn fast. Thanks for the post.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Python 3.x Progress Update

      @Webmaster4o about your wish list for apps...

      Yeah, I have had both of those apps that you want. Textastic is great, and Codea is AMAZING.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • UI Editor Quality

      I feel like the quality of the UI editor has really dropped since the last version of Pythonista. I can't enter specific color hex codes anymore (so my UI color scheme stays consistent), there is no aligning with other objects placed on the UI. It makes it had to center things. Also, I am having tons of errors that I have NEVER had before when doing the exact same thing. Plus the icon images don't even load for buttons when you select them in the editor.

      @omz you should really consider fixing these things. I loved the old editor a TON more. Though, everything else about the update was just about flawless.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Icons gone in ui editor for existing pyui files

      @omz can you fix this in the next update, please? It is a really annoying bug. I used button images a ton.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Icons gone in ui editor for existing pyui files

      Lol, I just wrote a post discussing the exact same problem... like 30 seconds ago.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Help with screen sizes

      @donnieh I am only guessing from what it sound like, but I would assume that if it is returning points, that it would return a tuple with four different (x,y) pixel coordinates of each of the four corners of the screen. Maybe I'm wrong, that's just my guess.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Scene Questions

      @JonB thanks for your willingness to help, but I just went about another way of doing it. Instead of having a sepereate table of each of the generated random positions for each asteroid and setting the asteroid sprite at those positions using a for loop, I just deleted that whole list worth the positions, and decided to use a list that already had the sprite objects in it making it way easier than my previous approach. I have no idea why I didn't try this first.

      Really appreciate it, though.

      posted in Pythonista
      AtomBombed
      AtomBombed