本文整理汇总了Python中lutris.game.Game.get_browse_dir方法的典型用法代码示例。如果您正苦于以下问题:Python Game.get_browse_dir方法的具体用法?Python Game.get_browse_dir怎么用?Python Game.get_browse_dir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lutris.game.Game
的用法示例。
在下文中一共展示了Game.get_browse_dir方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: on_browse_files
# 需要导入模块: from lutris.game import Game [as 别名]
# 或者: from lutris.game.Game import get_browse_dir [as 别名]
def on_browse_files(self, widget):
game = Game(self.view.selected_game)
path = game.get_browse_dir()
if path and os.path.exists(path):
Gtk.show_uri(None, "file://" + path, Gdk.CURRENT_TIME)
else:
dialogs.NoticeDialog("Can't open %s \nThe folder doesn't exist." % path)
示例2: on_browse_files
# 需要导入模块: from lutris.game import Game [as 别名]
# 或者: from lutris.game.Game import get_browse_dir [as 别名]
def on_browse_files(self, widget):
game = Game(self.view.selected_game)
path = game.get_browse_dir()
if path and os.path.exists(path):
subprocess.Popen(['xdg-open', path])
else:
dialogs.NoticeDialog(
"Can't open %s \nThe folder doesn't exist." % path)
示例3: on_browse_files
# 需要导入模块: from lutris.game import Game [as 别名]
# 或者: from lutris.game.Game import get_browse_dir [as 别名]
def on_browse_files(self, widget):
game = Game(self.view.selected_game)
path = game.get_browse_dir()
if path and os.path.exists(path):
system.xdg_open(path)
else:
dialogs.NoticeDialog(
"Can't open %s \nThe folder doesn't exist." % path
)