Skip to content

How to a load file in a new tab from the API #2066

Answered by psifertex
matteyeux asked this question in API
Discussion options

You must be logged in to vote

So first an answer to your specific question in the title, and then I'll follow up with a better solution for your actual problem (thanks for explaining both, gets you a two-for-one!).

To open a new file (if you're already running code from a UI Plugin you can short-circuit much of this if you have a UIContext already):

execute_on_main_thread_and_wait(lambda: UIContext.activeContext().openFilename('/tmp/test.bndb')

You could also do something terrible like:

from PySide2.QtGui import QDesktopServices
QDesktopServices.openUrl("binaryninja:///bin/ls")

However, for an even cleaner workflow, you can instead create your own view settings that let the user select possible views from within the s…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by psifertex
Comment options

You must be logged in to vote
1 reply
@psifertex
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants