rumps
rumps copied to clipboard
Feature: Show Image As Function
This pull request will add a function that attempt to open a filepath and display the image using the default image editor, most likely Preview.
Traceback (most recent call last):
File "rumps/rumps.py", line 1050, in callback_
return _call_as_function_or_method(callback, self)
File "rumps/rumps.py", line 380, in _call_as_function_or_method
return method(event)
File "test.py", line 22, in show_image
rumps.show_image('test.png')
File "rumps/rumps.py", line 208, in show_image
return _nsimage_window_from_file(image)
File "rumps/rumps.py", line 273, in _nsimage_window_from_file
window = NSImageView.alloc().init(image)
TypeError: Need 0 arguments, got 1
Are you not getting that error?
I fixed it with,
window = NSImageView.alloc().init()
window.setImage_(image)
but nothing appears to happen.