From 00d5b88b8d8faa5eec4ba163cce3d0e7dd61c9cb Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:10:34 -0400 Subject: [PATCH 1/7] Remove hardcoded app names. --- src/commandline.py | 11 ++++++----- src/extra/AudioUploader/dropbox_transfer.py | 5 +++-- src/extra/autocompletionUsers/wx_settings.py | 4 ++-- src/gtkUI/dialogs/configuration.py | 6 +++--- src/gtkUI/view.py | 4 ++-- src/issueReporter/issueReporter.py | 2 +- src/main.py | 2 +- src/sound.py | 4 ++-- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/commandline.py b/src/commandline.py index e11ace2c..e8fd9ad2 100644 --- a/src/commandline.py +++ b/src/commandline.py @@ -2,15 +2,16 @@ import argparse import paths import logging +import application log = logging.getLogger("commandlineLauncher") -parser = argparse.ArgumentParser(description="TW Blue command line launcher") +parser = argparse.ArgumentParser(description=application.name+" command line launcher") group = parser.add_mutually_exclusive_group() -group.add_argument("-p", "--portable", help="Use TW Blue as a portable application.", action="store_true", default=True) -group.add_argument("-i", "--installed", help="Use TW Blue as an installed application. Config files will be saved in the user data directory", action="store_true") -parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where TW Blue saves userdata.") +group.add_argument("-p", "--portable", help="Use " + application.name + " as a portable application.", action="store_true", default=True) +group.add_argument("-i", "--installed", help="Use " + application.name + " as an installed application. Config files will be saved in the user data directory", action="store_true") +parser.add_argument("-d", "--data-directory", action="store", dest="directory", help="Specifies the directory where " + application.name + " saves userdata.") args = parser.parse_args() -log.debug("Starting TWBlue with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory)) +log.debug("Starting " + application.name + " with the following arguments: installed = %s, portable = %s and directory = %s" % (args.installed, args.portable, args.directory)) if args.installed == True: paths.mode = "installed" elif args.portable == True: paths.mode = "portable" diff --git a/src/extra/AudioUploader/dropbox_transfer.py b/src/extra/AudioUploader/dropbox_transfer.py index cc278a09..035db350 100644 --- a/src/extra/AudioUploader/dropbox_transfer.py +++ b/src/extra/AudioUploader/dropbox_transfer.py @@ -5,6 +5,7 @@ import os import exceptions import dropbox import logging +import application from keys import keyring from utils import * from dropbox.rest import ErrorResponse @@ -51,7 +52,7 @@ class dropboxLogin(object): return self.flow.start() def authorise(self, code): - log.debug("Authorising TWBlue in Dropbox...") + log.debug("Authorising " + application.name + " to Dropbox...") access_token, user_id = self.flow.finish(code) log.debug("Saving tokens...") self.config["services"]["dropbox_token"] = access_token @@ -64,7 +65,7 @@ class dropboxUploader(object): self.client = dropbox.client.DropboxClient(config["services"]["dropbox_token"]) else: log.error("Dropbox is not authorised for this session.") - raise UnauthorisedError("You need authorise TWBlue") + raise UnauthorisedError("You need to authorise " + application.name) self.filename = filename self.short_url = short_url self.file = open(self.filename, "rb") diff --git a/src/extra/autocompletionUsers/wx_settings.py b/src/extra/autocompletionUsers/wx_settings.py index bc9bd53f..036cd0c1 100644 --- a/src/extra/autocompletionUsers/wx_settings.py +++ b/src/extra/autocompletionUsers/wx_settings.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import wx import widgetUtils - +import application class autocompletionSettingsDialog(widgetUtils.BaseDialog): def __init__(self): super(autocompletionSettingsDialog, self).__init__(parent=None, id=-1, title=_(u"Autocomplete users’ settings")) @@ -23,4 +23,4 @@ class autocompletionSettingsDialog(widgetUtils.BaseDialog): self.SetClientSize(sizer.CalcMin()) def show_success_dialog(): - wx.MessageDialog(None, _(u"TWBlue's database of users has been updated."), _(u"Done"), wx.OK).ShowModal() \ No newline at end of file + wx.MessageDialog(None, _(uapplication.name+"'s database of users has been updated."), _(u"Done"), wx.OK).ShowModal() \ No newline at end of file diff --git a/src/gtkUI/dialogs/configuration.py b/src/gtkUI/dialogs/configuration.py index 905b4f43..3e5367d9 100644 --- a/src/gtkUI/dialogs/configuration.py +++ b/src/gtkUI/dialogs/configuration.py @@ -14,13 +14,13 @@ class general(wx.Panel, baseDialog.BaseWXDialog): langBox.Add(language, 0, wx.ALL, 5) langBox.Add(self.language, 0, wx.ALL, 5) sizer.Add(langBox, 0, wx.ALL, 5) - self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting TwBlue?")) + self.ask_at_exit = wx.CheckBox(self, -1, _(U"ask before exiting " + application.name)) sizer.Add(self.ask_at_exit, 0, wx.ALL, 5) - self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shorcuts on the GUI")) + self.use_invisible_shorcuts = wx.CheckBox(self, -1, _(u"Use invisible interface's keyboard shortcuts while GUI is visible")) sizer.Add(self.use_invisible_shorcuts, 0, wx.ALL, 5) self.disable_sapi5 = wx.CheckBox(self, -1, _(u"Activate Sapi5 when any other screen reader is not being run")) sizer.Add(self.disable_sapi5, 0, wx.ALL, 5) - self.hide_gui = wx.CheckBox(self, -1, _(u"Activate the auto-start of the invisible interface")) + self.hide_gui = wx.CheckBox(self, -1, _(u"Hide GUI on launch")) sizer.Add(self.hide_gui, 0, wx.ALL, 5) self.SetSizer(sizer) diff --git a/src/gtkUI/view.py b/src/gtkUI/view.py index fd0c7e3a..98a05c1c 100644 --- a/src/gtkUI/view.py +++ b/src/gtkUI/view.py @@ -99,8 +99,8 @@ class mainFrame(Gtk.Window): self.changelog = Gtk.MenuItem(label="What's new in this version?") self.check_for_updates = Gtk.MenuItem(label="Check for updates") self.reportError = Gtk.MenuItem(label="Report an error") - self.visit_website = Gtk.MenuItem(label="TWBlue's website") - self.about = Gtk.MenuItem(label="ABout TWBlue") + self.visit_website = Gtk.MenuItem(label=application.name+"'s website") + self.about = Gtk.MenuItem(label="ABout "+application.name) self.append_to_menu(help, self.doc, self.sounds_tutorial, self.changelog, self.check_for_updates, self.reportError, self.visit_website, self.about) help_menu = Gtk.MenuItem(label="Help") help_menu.set_submenu(help) diff --git a/src/issueReporter/issueReporter.py b/src/issueReporter/issueReporter.py index 24c88d2e..10bfd25d 100644 --- a/src/issueReporter/issueReporter.py +++ b/src/issueReporter/issueReporter.py @@ -44,7 +44,7 @@ class reportBug(object): try: client = Client(application.report_bugs_url) issue = client.factory.create('IssueData') - issue.project.name = "TWBlue" + issue.project.name = application.name issue.project.id = 0 issue.summary = self.dialog.get("summary"), issue.description = "Reported by @%s\n\n" % (self.user_name) + self.dialog.get("description") diff --git a/src/main.py b/src/main.py index cdf9056e..5efbf7a9 100644 --- a/src/main.py +++ b/src/main.py @@ -49,7 +49,7 @@ if system == "Linux": log = logging.getLogger("main") def setup(): - log.debug("Starting TWBlue %s" % (application.version,)) + log.debug("Starting " + application.name + " %s" % (application.version,)) config.setup() log.debug("Using %s %s" % (platform.system(), platform.architecture()[0])) log.debug("Application path is %s" % (paths.app_path(),)) diff --git a/src/sound.py b/src/sound.py index 7709047d..1825dea5 100644 --- a/src/sound.py +++ b/src/sound.py @@ -12,7 +12,7 @@ import platform import output system = platform.system() from mysc.repeating_timer import RepeatingTimer - +import application URLPlayer = None def setup(): @@ -46,7 +46,7 @@ class soundSystem(object): self.path = paths.sound_path("default") self.soundpack_OK = True else: - log.error("Path for the current soundpack does not exist and the default soundpack is deleted, TWBlue will not play sounds.") + log.error("The current soundpack could not be found and the default soundpack has been deleted, " + application.name + " will not play sounds.") self.soundpack_OK = False def __init__(self, soundConfig): From ce0aa2d6a317c876e93ea34cf95c1b843066a336 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:11:23 -0400 Subject: [PATCH 2/7] String cleanup. --- src/keystrokeEditor/constants.py | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/keystrokeEditor/constants.py b/src/keystrokeEditor/constants.py index 7bb83851..c8e0bf04 100644 --- a/src/keystrokeEditor/constants.py +++ b/src/keystrokeEditor/constants.py @@ -1,20 +1,19 @@ # -*- coding: utf-8 -*- - actions = { -"up": _(u"Go up up on the current list"), -"down": _(u"Go down up on the current list"), -"left": _(u"Go to the previous tab"), -"right": _(u"Go to the next tab"), +"up": _(u"Go up in the current buffer"), +"down": _(u"Go down in the current buffer"), +"left": _(u"Go to the previous buffer"), +"right": _(u"Go to the next buffer"), "next_account": _(u"Change to the next account"), "previous_account": _(u"Change to the previous account"), -"show_hide": _(u"Show the graphical interface"), +"show_hide": _(u"Show or hide the GUI"), "post_tweet": _(u"New tweet"), -"post_reply": _(u"Reply to a tweet"), +"post_reply": _(u"Reply"), "post_retweet": _(u"Retweet"), "send_dm": _(u"Send direct message"), "add_to_favourites": _(u"Mark as favourite"), "remove_from_favourites": _(u"Remove from favourites"), -"follow": _(u"Open the actions dialogue"), +"follow": _(u"Open the user actions dialogue"), "user_details": _(u"See user details"), "view_item": _(u"Show tweet"), "exit": _(u"Quit"), @@ -30,20 +29,20 @@ actions = { "go_page_down": _(u"Move 20 elements down on the current list"), "update_profile": _(u"Edit profile"), "delete": _(u"Remove a tweet or direct message"), -"clear_buffer": _(u"Empty the buffer removing all the elements"), -"repeat_item": _(u"Listen to the current message"), +"clear_buffer": _(u"Empty the current buffer"), +"repeat_item": _(u"Repeat last item"), "copy_to_clipboard": _(u"Copy to clipboard"), "add_to_list": _(u"Add to list"), "remove_from_list": _(u"Remove from list"), "toggle_buffer_mute": _(u"Mute/unmute the active buffer"), -"toggle_session_mute": _(u"Globally mute/unmute the current account in TWBlue"), +"toggle_session_mute": _(u"Globally mute/unmute the current account"), "toggle_autoread": _(u"toggle the automatic reading of incoming tweets in the active buffer"), "search": _(u"Search on twitter"), "edit_keystrokes": _(u"Show the keystroke editor"), "view_user_lists": _(u"Show lists for a specified user"), "get_more_items": _(u"load previous items to any buffer"), -"reverse_geocode": _(u"Get location of any tweet"), -"view_reverse_geocode": _(u"Display the tweet's location in a dialog"), -"get_trending_topics": _(u"Create a buffer for displaying trends for a desired place"), -"open_conversation": _(u"Opens up a conversation buffer"), +"reverse_geocode": _(u"Get geolocation"), +"view_reverse_geocode": _(u"Display the tweet's geolocation in a dialog"), +"get_trending_topics": _(u"Create a trending topics buffer"), +"open_conversation": _(u"View conversation"), } \ No newline at end of file From 263ce33c41b5f2679da484a06dc662991bf07852 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:13:57 -0400 Subject: [PATCH 3/7] More string cleanup. --- src/update/wxUpdater.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/update/wxUpdater.py b/src/update/wxUpdater.py index f884e440..44d06b6f 100644 --- a/src/update/wxUpdater.py +++ b/src/update/wxUpdater.py @@ -27,4 +27,4 @@ def progress_callback(total_downloaded, total_size): progress_dialog.Update((total_downloaded*100)/total_size, _(u"Updating... %s of %s") % (str(utils.convert_bytes(total_downloaded)), str(utils.convert_bytes(total_size)))) def update_finished(): - ms = wx.MessageDialog(None, _(u"The new TWBlue version has been downloaded and installed. Press OK to start the application."), _(u"Done!")).ShowModal() \ No newline at end of file + ms = wx.MessageDialog(None, _(u"The update has been downloaded and installed successfully. Press OK to continue."), _(u"Done!")).ShowModal() \ No newline at end of file From 109635b8f4d468ea5a301de5967489ce12074647 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:23:31 -0400 Subject: [PATCH 4/7] More generalization. --- src/gtkUI/commonMessageDialogs.py | 6 +++--- src/gtkUI/view.py | 4 ++-- src/issueReporter/wx_ui.py | 2 +- src/sessionmanager/wxUI.py | 2 +- src/wxUI/commonMessageDialogs.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/gtkUI/commonMessageDialogs.py b/src/gtkUI/commonMessageDialogs.py index 00dbd446..4d095900 100644 --- a/src/gtkUI/commonMessageDialogs.py +++ b/src/gtkUI/commonMessageDialogs.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from gi.repository import Gtk - +import application def retweet_question(parent): dialog = Gtk.MessageDialog(None, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Retweet")) dialog.format_secondary_text(_(u"Would you like to add a comment to this tweet?")) @@ -17,13 +17,13 @@ def delete_tweet_dialog(parent): def exit_dialog(parent): dialog = Gtk.MessageDialog(parent, 0, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, _(u"Exit")) - dialog.format_secondary_text(_(u"Do you really want to close TW Blue?")) + dialog.format_secondary_text(_(u"Do you really want to close " + application.name + "?")) answer = dialog.run() dialog.destroy() return answer def needs_restart(): - wx.MessageDialog(None, _(u"The application requires to be restarted to save these changes. Press OK to do it now."), _("Restart TW Blue"), wx.OK).ShowModal() + wx.MessageDialog(None, _(unicode(application.name+" must be restarted to save these changes. Press OK to restart now.")), _("Restart " + application.name), wx.OK).ShowModal() def delete_user_from_db(): return wx.MessageDialog(None, _(u"Are you sure you want to delete this user from the database? This user will not appear on the autocomplete results anymore."), _(u"Confirm"), wx.YES_NO|wx.ICON_QUESTION).ShowModal() diff --git a/src/gtkUI/view.py b/src/gtkUI/view.py index 98a05c1c..4e53bc2a 100644 --- a/src/gtkUI/view.py +++ b/src/gtkUI/view.py @@ -110,7 +110,7 @@ class mainFrame(Gtk.Window): ### MAIN def __init__(self): """ Main function of this class.""" - super(mainFrame, self).__init__(title="TW Blue") + super(mainFrame, self).__init__(title=application.name) self.accel_group = Gtk.AccelGroup() self.add_accel_group(self.accel_group) self.box = Gtk.VBox() @@ -203,4 +203,4 @@ class mainFrame(Gtk.Window): getattr(self, menuitem).Check(check) def no_update_available(): - wx.MessageDialog(None, _(u"Your TW Blue version is up to date"), _(u"Update"), style=wx.OK).ShowModal() + wx.MessageDialog(None, _(u"Your " + application.name + " version is up to date"), _(u"Update"), style=wx.OK).ShowModal() diff --git a/src/issueReporter/wx_ui.py b/src/issueReporter/wx_ui.py index bc034ff9..551e643a 100644 --- a/src/issueReporter/wx_ui.py +++ b/src/issueReporter/wx_ui.py @@ -66,7 +66,7 @@ class reportBugDialog(widgetUtils.BaseDialog): severityB.Add(severityLabel, 0, wx.ALL, 5) severityB.Add(self.severity, 0, wx.ALL, 5) sizer.Add(severityB, 0, wx.ALL, 5) - self.agree = wx.CheckBox(panel, -1, _(u"I know that the TW Blue bug system will get my Twitter username to contact me and fix the bug quickly")) + self.agree = wx.CheckBox(panel, -1, _(u"I know that the " + application.name + " bug system will get my Twitter username to contact me and fix the bug quickly")) self.agree.SetValue(False) sizer.Add(self.agree, 0, wx.ALL, 5) self.ok = wx.Button(panel, wx.ID_OK, _(u"Send report")) diff --git a/src/sessionmanager/wxUI.py b/src/sessionmanager/wxUI.py index d6b6840a..7e8e54d5 100644 --- a/src/sessionmanager/wxUI.py +++ b/src/sessionmanager/wxUI.py @@ -7,7 +7,7 @@ class sessionManagerWindow(wx.Dialog): super(sessionManagerWindow, self).__init__(parent=None, title="Session manager", size=wx.DefaultSize) panel = wx.Panel(self) sizer = wx.BoxSizer(wx.VERTICAL) - label = wx.StaticText(panel, -1, u"Select a twitter account to start TW Blue", size=wx.DefaultSize) + label = wx.StaticText(panel, -1, u"Select a twitter account to start " + application.name, size=wx.DefaultSize) listSizer = wx.BoxSizer(wx.HORIZONTAL) self.list = widgets.list(panel, u"Account", style=wx.LC_SINGLE_SEL|wx.LC_REPORT) listSizer.Add(label, 0, wx.ALL, 5) diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index 5f93e949..81132ab2 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -8,7 +8,7 @@ def delete_tweet_dialog(parent): return wx.MessageDialog(parent, _(u"Do you really want to delete this message? It will be eliminated from Twitter as well."), _(u"Delete"), wx.ICON_QUESTION|wx.YES_NO).ShowModal() def exit_dialog(parent): - dlg = wx.MessageDialog(parent, _(u"Do you really want to close TW Blue?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION) + dlg = wx.MessageDialog(parent, _(u"Do you really want to close " + application.name + "?"), _(u"Exit"), wx.YES_NO|wx.ICON_QUESTION) return dlg.ShowModal() def needs_restart(): From ddf9d29b7d2eb88f1ee8c553ab9a58eced9fe27a Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:28:27 -0400 Subject: [PATCH 5/7] Fixed imports. --- src/gtkUI/dialogs/configuration.py | 2 +- src/issueReporter/wx_ui.py | 2 +- src/sessionmanager/wxUI.py | 2 +- src/wxUI/commonMessageDialogs.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gtkUI/dialogs/configuration.py b/src/gtkUI/dialogs/configuration.py index 3e5367d9..b9781d23 100644 --- a/src/gtkUI/dialogs/configuration.py +++ b/src/gtkUI/dialogs/configuration.py @@ -2,7 +2,7 @@ import baseDialog import wx import logging as original_logger - +import application class general(wx.Panel, baseDialog.BaseWXDialog): def __init__(self, parent, languages): super(general, self).__init__(parent) diff --git a/src/issueReporter/wx_ui.py b/src/issueReporter/wx_ui.py index 551e643a..279039fa 100644 --- a/src/issueReporter/wx_ui.py +++ b/src/issueReporter/wx_ui.py @@ -18,7 +18,7 @@ ############################################################ import wx import widgetUtils - +import application class reportBugDialog(widgetUtils.BaseDialog): def __init__(self, categories, reproducibilities, severities): super(reportBugDialog, self).__init__(parent=None, id=wx.NewId()) diff --git a/src/sessionmanager/wxUI.py b/src/sessionmanager/wxUI.py index 7e8e54d5..743ee358 100644 --- a/src/sessionmanager/wxUI.py +++ b/src/sessionmanager/wxUI.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import wx from multiplatform_widgets import widgets - +import application class sessionManagerWindow(wx.Dialog): def __init__(self): super(sessionManagerWindow, self).__init__(parent=None, title="Session manager", size=wx.DefaultSize) diff --git a/src/wxUI/commonMessageDialogs.py b/src/wxUI/commonMessageDialogs.py index 81132ab2..c74bf88e 100644 --- a/src/wxUI/commonMessageDialogs.py +++ b/src/wxUI/commonMessageDialogs.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- import wx - +import application def retweet_question(parent): return wx.MessageDialog(parent, _(u"Would you like to add a comment to this tweet?"), _("Retweet"), wx.YES_NO|wx.CANCEL|wx.ICON_QUESTION).ShowModal() From 7dd383b15e3a9ed26b459ac2fcc3da3b51c39430 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:33:22 -0400 Subject: [PATCH 6/7] more app name removal. --- src/application.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/application.py b/src/application.py index 5ccabef3..2884a86e 100644 --- a/src/application.py +++ b/src/application.py @@ -10,7 +10,7 @@ else: author = u"Manuel Cortéz" authorEmail = "manuel@manuelcortez.net" copyright = u"copyright (C) 2013-2015, Manuel cortéz" -description = u"TW Blue is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features." +description = unicode(name+" is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features.") translators = [u"Bryner Villalobos, Bill Dengler (English)", u"Mohammed Al Shara (Arabic)", u"Joan Rabat, Juan Carlos Rivilla (Catalan)", u"Manuel cortéz (Spanish)", u"Sukil Etxenike Arizaleta (Basque)", u"Jani Kinnunen (finnish)", u"Rémy Ruiz (French)", u"Alba Quinteiro (Galician)", u"Steffen Schultz (German)", u"Robert Osztolykan (Hungarian)", u"Paweł Masarczyk (Polish)", u"Odenilton Júnior Santos (Portuguese)", u"Alexander Jaszyn (Russian)", u"Burak (Turkish)"] url = u"http://twblue.es" report_bugs_url = "http://twblue.es/bugs/api/soap/mantisconnect.php?wsdl" From 3f02a0f4222b64b101d751caf09b8c9f832a5b48 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Sun, 19 Apr 2015 19:41:24 -0400 Subject: [PATCH 7/7] More generalization. --- src/twitter/authorisationHandler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/twitter/authorisationHandler.py b/src/twitter/authorisationHandler.py index 45f4fe4d..7981f872 100644 --- a/src/twitter/authorisationHandler.py +++ b/src/twitter/authorisationHandler.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- import BaseHTTPServer +import application from urlparse import urlparse, parse_qs logged = False @@ -16,5 +17,5 @@ class handler(BaseHTTPServer.BaseHTTPRequestHandler): params = parse_qs(urlparse(self.path).query) global verifier verifier = params.get('oauth_verifier', [None])[0] - self.wfile.write("You have successfully logged in to Twitter with TW Blue. " + self.wfile.write("You have successfully logged into Twitter with" + application.name + ". " "You can close this window now.") \ No newline at end of file