本文整理汇总了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)