omz:forum

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

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

    C0deH4cker

    @C0deH4cker

    0
    Reputation
    1021
    Profile views
    38
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    C0deH4cker Unfollow Follow

    Latest posts made by C0deH4cker

    • 3D / Physics support?

      I'd like to start off by saying that I'm so glad that Pythonista now has a community forum. I've been using this app and Codea for a while now. My best language is Python, and I don't really know Lua, so I prefer this app. Until this 1.2 update though, Codea has had the distinct advantage of having a community forum. Now we get one too!

      Onto my real question now. This is more of a feature request actually.

      3D support: I would love to see support for 3D drawing with Pythonista. Codea has this feature, and it works well there with good frame-rate for moderate examples.

      A physics engine: One other major obstacle in the way of creating great games with Pythonista is the lack of a physics engine. A python wrapper around something like Box2D or similar would be great.

      Thank you so much for putting all of your time and effort into Pythonista. I look forward for what the future holds for this app.

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • Spritesheet Animations

      So this was a short project I did. It uses a PNG spritesheet downloaded from the internet to display an animation. Just a basic example of how to do this with Pythonista by using PIL.

      The interesting part is actually my motivation behind writing this. Someone in a chatroom asked if Python could be used to "explode a hamster." I couldn't resist :D

      Anyways, here's the Gist: https://gist.github.com/20403fcfab8cbb3bbf5a

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Is there a way to have NumPy in Pythonista on a jailbroken device?

      Not right now.

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • Missing Module

      It appears that the C-based module _elementtree is missing. I know there is a pure Python version of this module available, but I'd prefer to use the C module for speed purposes. Here's the attempted import and resulting error:

      <pre>

      from xml.etree.cElementTree import *
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/var/mobile/Applications/3B311422-DFF2-4138-9B78-0D0D33BFFF14/Pythonista.app/pylib/xml/etree/cElementTree.py", line 3, in <module>
      from _elementtree import *
      ImportError: No module named _elementtree
      </pre>

      Thank you!

      Edit:
      Looks like there's another module or two missing:

      <pre>
      from xml.parsers import expat #nope
      import pyexpat as expat #nope
      </pre>

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Spritesheet Animations

      Ill post my code for an AnimatedSprite class when I'm done with it. It will do all of the work for you. You just need to specify the filename and # of frames. Then, call the instance's draw method from your scene's draw function. There are also methods to control the animation like FPS, jump to frame, pause/play, etc

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Rectangle hitTest

      What if multiple sides are hit, like this?
      <pre>
      ########

      # #

      ######## #
      # #
      #########
      </pre>

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Feature Requests

      @omz Then add the ability for scripts to play music like that. Then, people could play silence and have it running forever lol.

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Feature Requests

      @omz: I know there is somehow a 10 minute limit in the os, and 10 minutes is fine, but some apps (ie pandora) can run presumably forever in the background. Do you know how it does that?

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: Feature Requests

      @tahoma
      I made this Macros.py script that I use for Pythonista. Maybe this will be helpful to you:
      https://gist.github.com/3ae7811f06caabba80c9

      I have a separate script for each that basically just does:
      <pre>
      from Macros import function

      function()
      </pre>

      Except one of them, Spaces To Tabs, is this:
      https://gist.github.com/60088a8513acaa99fd59

      So this might be what youre looking for. If not, I'm sure that this will be helpful to someone.

      posted in Pythonista
      C0deH4cker
      C0deH4cker
    • RE: URL Scheme and x-callback-url

      If the only issue now is that the script's state isnt kept, you could just pickle everything before you launch app A and then unpickle it for the callback.

      posted in Pythonista
      C0deH4cker
      C0deH4cker