-
zrzka
I'm alive, don't worry, but my focus shifted a bit and I no longer have time to actively develop/maintain Black Mamba/monitor forum. This is the reason why I asked if there's anyone who wants to maintain it two years ago.
But I still passively maintain it which means that if you provide a PR, I'll test it, merge it and will release new version.
If there's anyone who wants to take over, feel free to ping me. I'll happily add you to the project and even transfer ownership later.
-
-
zrzka
Locating Files Using Bookmarks - ObjC runtime & iOS developer guide are your friends to look for.
-
-
zrzka
Hi guys,
you probably did realize that I did nothing in the Black Mamba project for couple of months. Quite busy with other stuff. I'm still receiving Pythonista beta versions, will try to do my best to keep it up to date (read keep it working with latest Pythonista versions), but can't promise anything. If you'd like to help, maintain it or even take over, feel free to ping me and I can add you to the repository, read the docs, ... If it will work, I can even transfer repository ownership to you.
Zrzka
-
zrzka
@Matteo update to 3.2 & use 3.6 as default interpreter (the error is about f strings).
-
zrzka
Basically all modules listed here are not available outside of Pythonista. There's no repository, source code, package in PyPI, ... It has no sense, because they're Pythonista specific. If you'd like to run your script on Mac, you have to provide your own
sound
module with functions you do use in Pythonista.I was thinking about new project providing compatibility layer for Mac, because I was tired of patching, mocking, ... (Sphinx, Travis CI, ...) But then I realized that almost all build / CI / ... servers I do use are running GNU/Linux. One layer for Mac, another one for GNU/Linux, ... Decided not to do it, it's not worth it.
You should check PyObjC If you'd like to leverage existing macOS frameworks, which gives you bidirectional bridge between Python and ObjC world. If you'd like to just play sound, it can be as simple as calling
afplay /path/to/your/sound/file
from the Python. -
zrzka
Hi @ETPH. Couple of generic advices:
- Do not use magic constants in your code (like
position_options
) in multiple places, it's a nightmare when you want to change them. Move them outside ofcreate_tile
,touch_began
and reuse them there. LikeMARGIN_OF_ERROR
. - Keep your functions / methods short. It's good when they can fit one screen (well, depends how the screen is big :), but you know what I mean. Not a hard rule, but it's about readability and crunching all these bugs quickly. It's easier when it's short.
touch_moved
is very long and overly complicated. - You shouldn't hardcode positions based on your device in case you want to run it on iPhone SE for example.
- Split your task into several smaller ones. Replace one huge function with many small ones doing just one thing. Again, readability & easier way how to spot a bug.
I didn't dive into your
touch_moved
method, sorry. But I did quickly hack an example of generic board & moving tiles. You can find it here. - Do not use magic constants in your code (like
-
zrzka
@mikael check this https://gist.github.com/zrzka/b61c74975c777a77232035a3e171337d
- Follow instructions above line 21 to get an client ID
- This script can be run from the Pythonista or you can add it to share extensions and run it from Photos for example