• C0deH4cker

    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 read more
  • C0deH4cker

    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 read more
  • C0deH4cker

    Not right now.

    posted in Pythonista read more
  • C0deH4cker

    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 read more
  • C0deH4cker

    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 read more
  • C0deH4cker

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

    # #

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

    posted in Pythonista read more
  • C0deH4cker

    @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 read more
  • C0deH4cker

    @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 read more
  • C0deH4cker

    @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 read more
  • C0deH4cker

    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 read more

Internal error.

Oops! Looks like something went wrong!