Created
August 22, 2013 16:40
-
-
Save robmccormack/6309703 to your computer and use it in GitHub Desktop.
tp_message_dialog.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 | |
import os | |
# run this with at the Python console with: | |
# view.run_command("message_dialog") | |
class MessageDialogCommand(sublime_plugin.TextCommand): | |
print "User name: " + os.getlogin() | |
""" presents a dialog box, with only a OK button """ | |
def run(self, edit): | |
# get the user's name | |
n= os.getlogin() | |
sublime.message_dialog("User " + n + " says: Hello World!" ) | |
# posted to forums: sublime.question_box("hi") | |
# 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