• Drizzel

    @mikael awesome, thanks

    posted in Pythonista read more
  • Drizzel

    That is music to my ears! My iPad Mini 2 broke down quite a while ago, and I also need a new laptop. Might just as well beat two birds with one stone. Btw, I finished school and study Mechatronics now :D

    Any idea if ui applications work?

    posted in Pythonista read more
  • Drizzel

    @Bumbo-Cactoni I'm a bit late to the party, but you could always check out Cambidge IGCSE Computer Science past papers. Just search for them in your favourite search engine. They provide beginner level excercises and solutions, since the exams are aimed at students with 2 years of coding experience.
    Just be aware that for every year, there's one paper with a coding excercise (the one you want) and one paper with theory (boring).

    I had to pass this exam in 2018, just as an example
    There's more here.

    posted in Pythonista read more
  • Drizzel

    @mikael said:

    Could you try to strip down (a copy of) your code

    Of course, no problem. It might take me one or two days, because I have exams coming up

    posted in Pythonista read more
  • Drizzel

    Since I have absolutely no clue how I caused this error, the following will be rather unspecific, my apologies

    So I have a very modified table view. Sometimes, when I remove some cell with the delete_rows() function, and then scroll down to see cells that weren’t displayed when deleting, some of these newly presented cells are totally blank. They simply are a white, empty area. I can tap them normally, and the proper functions are called. When I long press them (thanks to @mikael and his gestures script) I get the following error:

    Traceback (most recent call last):
      File "/private/var/mobile/Containers/Shared/AppGroup/D1D9102B-9BBB-4003-A835-39FDFDA39AB1/Pythonista3/Documents/v9/play_view.py", line 50, in skip_action
        self.player.finished_handler()
      File "/private/var/mobile/Containers/Shared/AppGroup/D1D9102B-9BBB-4003-A835-39FDFDA39AB1/Pythonista3/Documents/v9/audio_manager.py", line 72, in finished_handler
        section = prev_cell.section
    AttributeError: '_anonymous_label' object has no attribute 'section'
    

    So what is an _anonymous_label, and how did I cause this?

    I’m really sorry that I’m so unspecific, I simply have no idea how my (pretty long) code got to this

    posted in Pythonista read more
  • Drizzel

    @Karina Yeah, we have a little “chicken house” and I wrote a script that opens and closes the door by turning on and off a motor. But that’s not the point :) I just needed an example to better illustrate the uses of threads

    posted in Pythonista read more
  • Drizzel

    @Karina Now yes, threads may not always speed up your program. But they can keep your program responsive even though there’s some time consuming task being done. I also sometimes use them to constantly check if a variable changed, and then trigger a function. (There’s better ways to do that. But hey, I’m learning too.)

    Even though this is in no way specific to Pythonista, let’s take a slight detour. Some time ago, I built a door manager for the chicken pen of my family (yeah, it’s a bit unusual). It opens and closes the door at given times, but also constantly checks a button and email for a manual overrides. Since the button needs to be checked every 0.1 seconds, but checking the email takes about 4 seconds (establishing a connection to the google servers takes some time), the button wouldn’t be checked while the code is trying to get the new email. This is solved with threads, so they get checked in parallel, not after each
    Therefore the button stays responsive, even though checking mails uses up a lot of time

    posted in Pythonista read more
  • Drizzel

    @Karina said:

    I began to read about threads and sometimes don't understand what about this all, but in general understand. And for what here to use them? It encreases the speed of smth?

    I certainly don’t know everything about threads either, but here’s my understanding of them.

    The basics:

    • I think of threads like... well threads, as in strings or a thin rope. And when you open a thread, the code in this thread is run separated to other threads.

    • Thus Threads allow for separate codes to run “at the same time” (this technically isn’t possible, and is done through some tricks so that it appears so. Thus the quotation mark. But I’m not here to confuse you, so let’s go on)

    • Therefore you can have one section of code that (for example) has a time.sleep(100000) in it, and a thread that prints stuff in an infinite loop. Since they run in different threads, your code will still print stuff, even though there’s a stupidly long sleep statement in it

    Edit If you want some coding examples, I can write you some with comments

    posted in Pythonista read more
  • Drizzel

    @stephen looking good! I always was a little too lazy to try them all out... and I’m not using scene much nowadays.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!