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.
Black Mamba - releases
-
Black Mamba 0.0.16 released:
- Allow to start Black Mamba even in untested version of Pythonista, just warn the user
- Init messages are colored (orange=warn, red=error)
- All print messages replaced with
log.info
(.error
,.warn
) bm.log.level
allows to set logging level (defaultINFO
)- Do not bother user (mainly me) with alert about new version (just use console) in case the Black Mamba is not installed via installer (git for example)
- Tested with latest Pythonista beta (3.1.1 - 311008), everything works as expected
You can install / update it with with:
import requests as r; exec(r.get('http://bit.ly/get-blackmamba').text)
-
This post is deleted! -
@Phuket2 depends ... The only mandatory thing is to place GitHub's
blackmamba
folder intosite-packages-3
. That's it. The difference between git & installer is ...git
master
branch is not stable, it can brake things- can be workarounded by checkout of specific tag (
v0.0.16
, etc.) - it doesn't tell you that there's new version available
installer
- stable releases
- it does inform you about new releases automatically (I do store installed version info in the
~/Documents/site-packages-3/blackmamba/.release.json
) and check for updates regularly (during Pythonista startup) - if there's a new version, you'll see iOS alert and then you can issue same command you did use for installation to update Black Mamba
You can look at updates.check for more details.
IMO installer is more friendly if you do not want to develop it, because I'm going to add updater as well.
I'll put PyPI back when it starts working, because this is the most preferred way of installation. Sadly it doesn't work.
Also, please, discuss in another topic, this is just for releases. See the first post. Thanks for understanding.
-
Black Mamba 0.0.18 released:
- Installation command is copied to the clipboard when the alert about
new version is shown. Just open console and paste it. system.Pythonista
andsystem.iOS
decorators to limit functions
execution under the specific Pythonista & iOS versions.- 0.0.17 skipped, because this version was used for testing & fixing pip
- Outline Quickly... (
Cmd Shift L
) introduced
Outline Quickly mimicks Pythonista outline (
Cmd L
), but allows node filtering. On the other side, it does not contain annotations (yet). - Installation command is copied to the clipboard when the alert about
-
Would it be possible to put this stuff into https://github.com/zrzka/blackmamba/releases ?
As someone who does not use an external keyboard with Pythonista, I find much of this discussion to be off topic. Is it just me or do others agree?
-
I do not use Xcode Template for example, I find much of it to be off topic for me. Others do use Xcode Template, they don't consider it off topic, they're reading it, participating, ... So, I simply don't read Xcode Template related threads.
I understand that this thread can be off topic for some people, but for some of them not. Just don't read it as I or others don't read Xcode Template topics.
P.S. I have nothing against Xcode Template, it's just an example :)
-
@ccc , i dont agree. I normally agree with you. Sorry, in this case I dont. @zrzka has put a lot of effort into this and it works great. For those who use ext keyboards, its a gift from god. There are many subjects in Pythonista i have no interest in, I just skip them. No disrespect to you, but i think this is a great project. It's easy to skip over if you are not into it.
-
Black Mamba 0.0.19 released:
- Fixed unused import in action picker
- Compatibility check with 3.1.1 (311009)
- Introduced
ide.scroll_to_line(line_number)
Ctrl L
Jump to line... addedCmd E
to show Drag Provider (iOS 11 & iPad only)
What's the Drag Provider all about? See this video. You must have latest Working Copy beta, iOS beta and iPad. Otherwise it will not work for you.
-
using pip install blackmamba
and then run:
#!python3 import blackmamba as bm bm.main()
Error:
ImportError: No module named 'httplib' -
@wolf71 unfortunately, there's no
pip3
in StaSh and Black Mamba is Python 3 only. As a workaround, you have to:pip remove blackmamba pip install blackmamba -d ~/Documents/site-packages-3
And ...
#!python3 import blackmamba as bm bm.main()
... must be placed in the
~/Documents/site-packages-3/pythonista_startup.py
file. Hope that helps. If not, please file an issue with more details (like how did you install it, which version was installed, pip installation console log, Pythonista version, default interpreter, ...). Thanks.And you have to use
dev
StaSh (selfupdate -f dev
).P.S. Note the
-3
suffix in installation path / python startup file path. Also I tried to reproduce your issue, but no luck (even if I change interpreter, omit-d
in thepip
command, ...). -
Black Mamba 0.0.21 released
- Code cleanup (circular deps, ...)
- Fixed analyzer where
ignore_code=None
means realNone
- Please, check sample pythonista_startup.py, breaking changes, sry
- Config option to disable keyboard shortcuts registration
It's basically clean up release, because it was quickly written, there were lot of circular deps, ... Also configuration of Black Mamba is done via dict, not via modifying module variables. And option to disable keyboard shortcuts was introduced, because I'm planning to add stuff which is useful even without external keyboard.
How to update
Pythonista console
import requests as r; exec(r.get('http://bit.ly/get-blackmamba').text)`
pip
StaSh dev (
selfupdate -f dev
).pip remove blackmamba pip install blackmamba -d ~/Documents/site-packages-3
pip update
doesn't honor-d
from previouspip install
command. Will file an issue and fix this. -
BlackMamba 0.0.22 released:
- Toggle comments improved
- Honors both tabs and spaces
- Indented
#
if line is indented - Shortest indent is used for all lines
#
if commenting multiple of them - Empty lines are ignored
- Fixed
ide.run_action
when script_name starts with/
- Toggle comments improved
-
BlackMamba 0.0.23 released:
- Jump to definition (
Cmd Shift D
)
- Jump to definition (
-
Black Mamba 0.0.24 released:
blackmamba.keyboard
module added- Pickers (open, script, ... quickly)
- Do not focus search field if HW keyboard is not connected
- Show title bar instead of custom title to allow users to close dialogs with X button
ide.scroll_to_line
optimized- Toggle comments various fixes
- Line is properly commented when there's inline comment
- Uncommented line -> whitespaces only -> 'n'
- More test coverage to avoid future bugs
-
@zrzka Thanks,it's work.
can add cmd+up cmd+down to page up and page down?
-
-
Black Mamba 0.0.25 released:
blackmamba.script
introduced and it does contain following scriptsaction_quickly.py
,analyze.py
,clear_annotations.py
,close_all_tabs_except_current_one.py
,
drag_provider.py
,jump_to_definition.py
,jump_to_line.py
,new_file.py
,new_tab.py
,
open_quickly.py
,outline_quickly.py
,run_quickly.py
,run_unit_tests.py
,search_dash.py
,
toggle_comments.py
- These scripts can be used in the wrench icon (action)
- These scripts are binded to keyboard shortcuts, whenever you run it via wrench icon
or via keyboard shortcut, same script is executed - It's still required to call
blackmamba.main
from within
~/Documents/site-packages-3/pythonista_startup.py
file to properly configure it
(even without external keyboard)
- Drag Provider uses Pythonista title bar instead of custom title to allow users to close the
the dialog without external keyboard - Unit tests (
tester.py
) moved fromblackmamba.experimental
toblackmamba
ide.run_script
andide.run_action
has new args nameddelay
, which defaults toNone
- Run Quickly & Action Quickly runs scripts with 1.0s delay and that's because
both these actions are binded to scripts in the new script folder and if there's no
delay, nothing happens if these scripts are Python 3 (basically it runs script from script,
which doesn't ended yet) - Fixed #20 (Pythonista appex error)
- Allow to run
main
- Do not check compatibility, updates
- Do not register keyboard shortcuts
- Allow to run
blackmamba.system.Pythonista
decorator has new argappex
- Defaults to
None
appex=True
- run decorated function if it's running as application extensionappex=False
- run decorated function if it's not running as application extensionappex=None
- run in both case, just don't check
- Defaults to
blackmamba.key_command.register_key_command
is decorated withPythonista(appex=False)
to avoid shortcut registration if it's running as application extension- Page Up (
Ctrl Up
) and Page Down (Ctrl Down
)
-
BTW if you've got beta version of Working Copy (build 3.0.9.16), you can use drag provider script to drag file or the folder to the Working Copy. Works flawlessly now and this version was already submitted to the app store. Will be available along with iOS 11 release. This is the only way how I commit & push now. See demonstration video.
-
Black Mamba 0.0.26 released:
- Jump to definition fixes
- Jedi - ignore definitions if there's no path & line number
blackmamba.project
trashed (replaced with Jedi, thanks to @JonB)- Jump to definition shortcut synced with Xcode (
Control Command J
) - Find usages added (
script/find_usages.py
&Control Command U
) - Show documentation (
script/show_documentation.py
&Control Command ?
)- Displayed as
success
annotation on the current line - You can clear annotation with
Cmd Shift K
(already there)
- Displayed as
- All these three featues does
jedi
now. Jedi is not thread safe and
because I had not lot of time to investigate how and when is the Jedi
used by Pythonista, I decided to disable these three features by
default. To enable them, just setgeneral.jedi
toTrue
when
passing configuration to themain
.
BTW this
.
notation is a shortcut for documentation and you have to pass
it as dictionary:config = { 'general': { 'jedi': True } } blackmamba.main(config)
-
Black Mamba 0.0.27 released:
- Drag provider trashed (
Cmd E
) - Drag & Drop introduced (
Cmd E
)- Allows bidirectional drag & drop of files & folders & repos
- List of ignored folders is configurable via
drag_and_drop.ignored_folders
, check config.py for default values - Can be used as wrench menu icon (
script/drag_and_drop.py
)
There's one limitation (will be fixed). Whenever you drop folder from Working Copy, UI isn't updated and you have to close Drag & Drop window and open it again to see this folder.
Here's demonstration video of Drag & Drop.
P.S. I did test this with latest Working Copy. You can drag file & folder from Pythoista, you can drag file & folder & repo from Working Copy. No more missed files in my commits :)
- Drag provider trashed (