• iAmMortos

    Marvelous suggestions. Thank you!

    I would love to know how they do this black magic tint_color buffoonery underneath. I'm always more and more impressed with what is possible within the bounds of this app. It's incredible.

    Thanks again.

    posted in Pythonista read more
  • iAmMortos

    I was in the process of making a custom button ui.View with event hooks for button press as well as button release. I wanted to make a button that would trigger repeated actions when held down. That's all well and good and the eventing works fine, but I also tried to emulate, to the best of my ability, all the features that ui.Button has, like allowing text and or an icon that makes use of tint_color etc. This required overriding the draw method and inserting the set_needs_display() calls in the appropriate places.

    Apparently, however, setting tint_color on a ui.View does not trigger the set_needs_display() to redraw the view. I assumed that tint_color was just a property on ui.View that, under the covers, did all the fancy things to make the view update itself by default, and that I would be able to override it in a reasonable manner to call super().tint_color.fset() or something like that followed by a set_needs_display() to redraw my view. After looking into it a little further, ui.View.tint_color is just a plain old attribute. So in order for me to properly handle the redrawing of the View I had to make new property getters and setters named tint that sets tint_color and calls set_needs_display().

    I really dislike this solution because now the API for my custom button is nonstandard and it makes me feel... dirty... lol

    Am I misunderstanding how tint_color works/should work?

    posted in Pythonista read more
  • iAmMortos

    Using tommasoturchi's mysqldb connector, I'm doing this:

    import mysqldb
    db = mysqldb.connect(host="my.host.com", user="user", passwd="pass", db="MyDBName", port=3306)
    cursor = db.cursor()
    

    and I'm getting an error: ord() expected string of length 1, but int found all the way down in the network.py file at self._packet_number = ord(packet[3])

    wassup with that?!

    Thanks

    posted in Pythonista read more
  • iAmMortos

    My scripts are organized into folders. The shortcut making page just asks for the script name, which I supplied, but it says it couldn't find that script. I tried the path from
    The root directory (like "Utils/myscript") but it said, "can't find script "Utils.py".
    How do you create an icon for scripts organized in folders?

    If I just type it into the web browser I can get it to work, though.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!