Created
August 22, 2013 16:54
-
-
Save robmccormack/6309878 to your computer and use it in GitHub Desktop.
tp_status_message.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime | |
import sublime_plugin | |
# did it work | |
# run this with at the Python console with: | |
# view.run_command("status_message") | |
# filename: tp_status_message.py | |
class StatusMessageCommand(sublime_plugin.TextCommand): | |
""" presents a dialog box, with only a OK button """ | |
def run(self, edit): | |
self.view.window().show_input_panel("Say something:", 'something', self.on_done, None, None) | |
def on_done(self, user_input): | |
# this is displayed in status bar at bottom | |
sublime.status_message("User said: " + user_input) | |
# this is a dialog box, with same message | |
# sublime.message_dialog("User said: " + user_input) | |
# full list of os. http://www.pythonforbeginners.com/systems-programming/python-system-administration/ | |
# The functions that the OS module provides allows you to interface with | |
# the underlying operating system that Python is running on be that | |
# Windows, Mac or Linux. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment