• import sys,os print(os.path.abspath('.'))

    That's your current path. You can usually use relative paths to the main script that you ran -- e.g open('test.jpg') will open the file in the same folder as your script.

    In some cases, if you have a module in site-packages, a way to get back to the main script in pythonista is

    import sys,os print(os.path.abspath(sys.path[0]))

    due to the way that pythonista adds the script that you pressed the play button on to the top of the sys.path.

    If you run that little script from a script located in folder inside iCloud folder, it will print out the absolute path, and you can use that in your scripts to write to iCloud. Note, you usually cannot write directly to the iCloud folder itself, you need a subfolder.

  • Hey so I actually found a solution on the forum from ages ago. If anyone else is interested you basically have to copy list data source class into a separate module and add in a background colour attribute, works well

  • https://forum.omz-software.com/topic/6017/import-cairo
    You won't be able to use pycairo, though there are some ways to wrap cairo for use in pythonista.

    The bigger issue is going to be the lack of ffmpeg for creating the videos.

    In short, you will not be able to use manim. It might be possible to use some of the manim structures, and then create a pythonista scene that draws it. But that's going to be a lot of work.

  • @jackattack Save the graph as picture and then load it in widget.

  • @jackattack said:

    Also the only bit I didn’t really understand was when you set up the button class you used init, but then you did spritenode.init what is this for?

    when you subclass an object that has __init__ paramiters you must either call the Parent class __init__ as i did here or you can use super(). if you do not call the parent's __init__ then the new object will not inherit the dirived.

    @jackattack said:

    I’ve learnt so much reading your code, love the way you’ve done so many things, spent ages going through it all. Could you give me any insight into the order you went about writing it?

    I usually start with utility classes. in my Example game this would be stuff like Screen() and EventManager(), then visual testing. at this point i woud start my ButtonNode() and Animations().. now i create my Player(), GUI() and o on. the order on the script itself doesnt matter with Object Orientated Programing (OOP) just remember the Interpreter exec the scripts top down. so in order to Dirive from from Class A it must exist before Class B.

    @jackattack said:

    Wow this works perfectly thank you so much, I’m going to take some time to study it and try to learn how to recreate it with some other effects. Thanks for taking the time out 😌

    Not a problem at all! 🥂💯 i enjoy helping others if you have any equestions please dont hesitate!;

Internal error.

Oops! Looks like something went wrong!