本文整理匯總了Python中libs.Tools.setStatus方法的典型用法代碼示例。如果您正苦於以下問題:Python Tools.setStatus方法的具體用法?Python Tools.setStatus怎麽用?Python Tools.setStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類libs.Tools
的用法示例。
在下文中一共展示了Tools.setStatus方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: on_activated
# 需要導入模塊: from libs import Tools [as 別名]
# 或者: from libs.Tools import setStatus [as 別名]
def on_activated(self, view):
"""
Set the current version of Deviot
Arguments: view {ST object} -- Sublime Text Object
"""
PlatformioCLI(view, command=False).checkInitFile()
Tools.setStatus(view)
Tools.userPreferencesStatus(view)
示例2: getAPIBoards
# 需要導入模塊: from libs import Tools [as 別名]
# 或者: from libs.Tools import setStatus [as 別名]
def getAPIBoards(self):
'''
Get the list of boards from platformIO API using CLI.
To know more info about platformIO visit: http://www.platformio.org/
Returns: {json object} -- list with all boards in a JSON format
'''
window = sublime.active_window()
view = window.active_view()
Tools.setStatus(view, _('updating_board_list'))
boards = []
Run = CommandsPy()
command = ['boards', '--json-output']
boards = Run.runCommand(command, setReturn=True)
Tools.setStatus(view, _('Done'), erase_time=4000)
return boards
示例3: saveAPIBoards
# 需要導入模塊: from libs import Tools [as 別名]
# 或者: from libs.Tools import setStatus [as 別名]
def saveAPIBoards(self, update_method=False, install=False):
'''
Save the JSON object in a specific JSON file
'''
try:
from .Menu import Menu
except:
from libs.Menu import Menu
window = sublime.active_window()
view = window.active_view()
Tools.setStatus(view, _('updating_board_list'))
# console
if (not install):
console_name = 'Deviot|GetBoards' + str(time.time())
console = Console(window, name=console_name)
new_console = True
# Queue for the user console
message_queue = MessageQueue(console)
message_queue.startPrint()
message_queue.put("[Deviot {0}]\n", version)
message_queue.put("download_board_list")
boards = self.getAPIBoards()
self.Menu.saveTemplateMenu(
data=boards, file_name='platformio_boards.json', user_path=True)
self.saveEnvironmentFile()
Menu().createMainMenu()
if(not install):
message_queue.put("list_updated")
示例4: run
# 需要導入模塊: from libs import Tools [as 別名]
# 或者: from libs.Tools import setStatus [as 別名]
def run(self, edit, text, erase_time):
Tools.setStatus(self.view, text, erase_time)