Index: /Users/matt/Library/Application Support/TextMate/Bundles/Support/lib/dialog.py
===================================================================
--- /Users/matt/Library/Application Support/TextMate/Bundles/Support/lib/dialog.py	(revision 10851)
+++ /Users/matt/Library/Application Support/TextMate/Bundles/Support/lib/dialog.py	(working copy)
@@ -10,6 +10,8 @@
 from tm_helpers import to_plist, from_plist
 
 dialog = os.environ["DIALOG"]
+nib_path = os.environ['TM_SUPPORT_PATH'] + '/nibs'
+
 try:
     all
 except:
@@ -58,4 +60,32 @@
     index = int(result['selectedIndex'])
     if hashed_options:
         return options[index][1]
-    return options[index]
\ No newline at end of file
+    return options[index]
+    
+def get_string(**options):
+    """Get a string using dialog
+    
+    Accepts `title` and `prompt` strings, and returns the string entered by
+    the user.
+    """
+    
+    # Set defaults and get options:
+    if not options.has_key('title'):
+        options['title']='Enter String'
+    if not options.has_key('prompt'):
+        options['prompt']='String:'
+    plist = to_plist(options)
+    
+    # Run dialog, piping our plist in, and reading the output:
+    nib = nib_path + '/RequestString'
+    proc = subprocess.Popen([dialog, '-cm', nib], 
+        stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+    proc.stdin.write(plist)
+    output, _ = proc.communicate()
+    
+    # Extract exit value:
+    result = from_plist(output)
+    if not 'result' in result:
+        return None
+    else:
+        return result['result'].get('returnArgument')
