omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. Drizzel
    3. Topics

    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 29
    • Posts 135
    • Best 14
    • Controversial 0
    • Groups 0

    Topics created by Drizzel

    • Drizzel

      What’s an anonymous label?
      Pythonista • • Drizzel

      5
      0
      Votes
      5
      Posts
      2182
      Views

      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

    • Drizzel

      Access TableViewCells
      Pythonista • • Drizzel

      11
      0
      Votes
      11
      Posts
      3676
      Views

      Drizzel

      @stephen That’s how I understood him. And it worked out really well, after some minor adaptions

    • Drizzel

      haptic and vibration feedback
      Pythonista • • Drizzel

      6
      1
      Votes
      6
      Posts
      2187
      Views

      JonB

      @Drizzel @omz's code is identical, excep that he specifies the argtypes on the playaudiosystemsound, which you should also do, otherwise you risk crashing (say on a 32 bit vs 64 bit device).
      I think ctypes defaults to 32 bit argtypes even on 64 bit devices, so you are safe in this case.

    • Drizzel

      ui view anchor redefine constraints
      Pythonista • • Drizzel

      6
      0
      Votes
      6
      Posts
      2231
      Views

      stephen

      @Drizzel 10-4 rubber ducky 🧑🏻‍💻😉

    • Drizzel

      Can Pythonista run Java? -emulating a GameBoy Color
      Pythonista • • Drizzel

      2
      0
      Votes
      2
      Posts
      1225
      Views

      No one has replied

    • Drizzel

      Install SDL2 and PyBoy?
      Pythonista • • Drizzel

      3
      0
      Votes
      3
      Posts
      1989
      Views

      Drizzel

      @mikael All right, thank you

    • Drizzel

      Function at end of variable (Don't really know how to sum up this question)
      Pythonista • • Drizzel

      9
      0
      Votes
      9
      Posts
      4116
      Views

      Olaf

      @JITASIDA
      No, you can't
      That would require adding a method to a built-in type and that's not possible (without going to the C source for Python):

      >>> str.clean=lambda self:'clean'+self Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: can't set attributes of built-in/extension type 'str'
    • Drizzel

      Sqlite3 threadsafety
      Pythonista • • Drizzel

      5
      0
      Votes
      5
      Posts
      2059
      Views

      cvp

      @mikael I got a similar problem in a script where an ui.in_background def did a sql process and an in_main_thread def did another one...Threads were defined due to ui/modal problems

    • Drizzel

      Ui tableViewCell
      Pythonista • • Drizzel

      9
      0
      Votes
      9
      Posts
      3475
      Views

      cvp

      @Drizzel long piece of code but only small part added to the old one I wrote for your some time ago

      About my profile picture, I had modified it but I never seen it changed when I connect to the forum. That's why I didn't understand that you have seen it modified.

    • Drizzel

      SQL and Python?
      Pythonista • sql • • Drizzel

      5
      0
      Votes
      5
      Posts
      2555
      Views

      sam rod

      it works

    • Drizzel

      modify tableViewCell delete
      Pythonista • • Drizzel

      12
      0
      Votes
      12
      Posts
      4354
      Views

      cvp

      @Drizzel The script is from Shaun-h, not mine. I only added some lines for your alert in the delete case.
      And the code is not sufficient so, you still have to add some lines for the real delete, when confirmed. Good work and good luck

    • Drizzel

      More accurate gps data?
      Pythonista • • Drizzel

      5
      0
      Votes
      5
      Posts
      3183
      Views

      Drizzel

      @saraparker Yeah, I figured that out too. But if you check some other GPS-logging app like runtastic, they have the same issue

    • Drizzel

      File transfer with multipeer
      Pythonista • • Drizzel

      14
      0
      Votes
      14
      Posts
      5673
      Views

      Drizzel

      @mikael messages, as it doesn’t actually take too long and I don’t have to manage many small bits of data, making it easier for me (with limited python knowledge) to transfer multiple files.

    • Drizzel

      Errno 1 Operation not permitted
      Pythonista • • Drizzel

      2
      0
      Votes
      2
      Posts
      2660
      Views

      bennr01

      @Drizzel it seems like Document.generate_pdf() uses subprocess to spawn a seperate process for generating the PDF. This is not allowed by iOS, thus the error.

    • Drizzel

      Closing a scene properly
      Pythonista • • Drizzel

      3
      0
      Votes
      3
      Posts
      2007
      Views

      Drizzel

      Sorry for the late reply, your answer was exactly what I needed. I tried things like self.close() and self.hide(), but I just didn’t get to the self.view.close()

    • Drizzel

      Get webpage content
      Pythonista • • Drizzel

      4
      0
      Votes
      4
      Posts
      2478
      Views

      mikael

      @Drizzel, some sites are use so much JS that they are hard to scrape with just requests and bs4. If this is the case here, you can use WebView to act as a browser and run the JS. I have a small helper class for this, discussed here.

      In all cases, web scraping seems to be a lot of detective work, trial and error.

    • Drizzel

      Numpy issues
      Pythonista • • Drizzel

      6
      0
      Votes
      6
      Posts
      3502
      Views

      JonB

      One thing that can happen sometimes it's if you hit X right after running a script. Since numpy or matplotlib are very large, importing them takes some time. If you cancel before the import is complete, you get a partial import, which breaks later imports.

    • Drizzel

      simple AI
      Pythonista • scene • • Drizzel

      5
      0
      Votes
      5
      Posts
      3849
      Views

      Nitrous9123

      @JonB said:

      a=[1,2,3]
      b=a
      b.append(4)
      a
      [1, 2, 3, 4]

      I had a similar problem so I change the a to a tuple and the copied it to b. I needed to pop() from b but keep a unchanged so I can reset it to b at start over in my script

      a=(1,2,3)
      b=list(a)
      b.append(4)
      a
      [1, 2, 3]

    • Drizzel

      Youtube_dl extract mp3 file
      Pythonista • • Drizzel

      11
      0
      Votes
      11
      Posts
      7750
      Views

      Drizzel

      @donaldcassey yes it should work with soundcloud. I didn’t test it, but the module contains a file for extracting data from soundcloud. If you want to use this, just copy the code into a new directory and create a file called ‘songs.txt’ . Then paste every link into a new line in the text file. The code does not work if the file contains empty lines, but you can fix that with by replacing

      dl.download([song_url])

      with

      if not “\n” in song_url: dl.download([song_url])
    • Drizzel

      Accurate intersection detection for sprite nodes?
      Pythonista • help collision intersect scene • • Drizzel

      6
      0
      Votes
      6
      Posts
      5603
      Views

      mikael

      @Drizzel, I was thinking about getting 100% accurate detection by first doing the rectangle intersection, and if that indicates a possible hit, then placing shape 1 on a canvas in memory, then ”deleting” the non-transparent pixels of shape 2 (also properly placed). If the end result does not equal the original, you have a hit.