omz:forum

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

    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

    Sean Wilkerson

    @AtomBombed

    Who killed the Slack?

    25
    Reputation
    1849
    Profile views
    149
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    AtomBombed Unfollow Follow

    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

    Latest posts made by AtomBombed

    • RE: NES Emulator?

      Theoretically, you could write an interpreter for the ROM that then takes the data and displays it via the screen module. I know that's very vague, but if you had individually-addressed pixels that are handled and displayed through the screen module, you could then process and display all the data to those simulated "pixels" manually.

      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: tkinter on pythonista

      Yeah, Tkinter is not Pythonista-compatible. I'm pretty sure this has something to do with it not being entirely Python. It's an interface to the Tk framework that lower-level languages like C++ use. It's a machine code library, and thus couldn't run in Pythonista due to the extent that Apple goes to prevent apps from running executables.

      But let's say you could get Tkinter to run on Pythonista. It wouldn't work because Pythonista doesn't have anything that handles the rendering of the windows and widgets that Tkinter produces.

      Of course, you could write something to work around this. Maybe you could embark on a project to make a Flask application that presents your Tkinter GUI as a webpage that Flask serves locally. Then you could have it open that local page with webbrowser.open("http://localhost:8080") or something similar.

      Or you could write something to display Tkinter applications as native Pythonista UIs.

      This may be out of your scope (I know I would have trouble with this). I'm not sure if anyone else has attempted this before. Sorry!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Dear StaSh Users: I need your input

      P.S: I'm only collected emails for the survey in case some of you give answers I need more detail on.

      posted in Pythonista
      AtomBombed
      AtomBombed
    • Dear StaSh Users: I need your input

      So, a few of you already know that I've been working on a package manager utility for StaSh (if you didn't, now you do). The code is hosted at https://github.com/Seanld/Latte, if you want to check it out.

      I created a survey I need you to fill out with various questions that will help me make it the way everyone wants it to be made. However, I'm gonna stop production of it if enough of you say you don't think it's necessary (there's an option for that in the survey, so don't comment it here).

      Anyways, the survey is right here. Please take it and answer all the available questions based on how you answered the first question.

      Thanks a lot!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • RE: Buzz Video Format

      (Obviously it's not released yet, but once I get the first usable version of the format ready to go, I'll create a new GitHub repository for it.)

      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: Latte v1.2, now with colors!

      It's also worth noting that if Latte has an issue when running, please restart Pythonista, and then reinstall Latte. It seems that either the requests module or Pythonista may be storing caches of sites that content has already been fetched from. Sorry!

      posted in Pythonista
      AtomBombed
      AtomBombed
    • Latte v1.2, now with colors!

      Latte, a package manager for StaSh commands!

      Alright, so my last post was about v1.0. I thought it was completely ready for release, but it turns out there was some issues with the path system when installing and removing packages. That's completely fixed now. All the commands work, and there's even a brand new feature: it has colors now!

      In What Scenario Would I Use This?

      Okay, so say you've just made a really useful StaSh command that allows you to run a Ruby interpreter (bear with me), and you have no way to share it, or get it installed on other people's StaSh shell. The only feasible method is making a self-extracting Python script to install it (if you don't know what that is, it's the single-line Python code you used to install StaSh, if you have it) and nobody wants to do that over and over again to install small simple commands individually. Well, Latte is a utility to fix this issue. You can host repositories easily, create and share packages, and install them with one command.

      So, as you can see, it's a fairly useful tool, and I'm hoping it's equally as useful for all the StaSh users out there. You could argue that, "There's no point to this! I could just make a pull request to the StaSh repository with my new command..." Which is very true. But good luck doing that for every new command, and every new update to those commands. With Latte you just need to type a single line into the StaSh shell, and it's installed.

      The GitHub repo is here, and the main documentation is located here!

      posted in Pythonista
      AtomBombed
      AtomBombed