当前位置: 首页>>代码示例>>Python>>正文


Python FileUtilities.uris_to_paths方法代码示例

本文整理汇总了Python中bleachbit.FileUtilities.uris_to_paths方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtilities.uris_to_paths方法的具体用法?Python FileUtilities.uris_to_paths怎么用?Python FileUtilities.uris_to_paths使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在bleachbit.FileUtilities的用法示例。


在下文中一共展示了FileUtilities.uris_to_paths方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: cb_clipboard_uri_received

# 需要导入模块: from bleachbit import FileUtilities [as 别名]
# 或者: from bleachbit.FileUtilities import uris_to_paths [as 别名]
 def cb_clipboard_uri_received(self, clipboard, targets, data):
     """Callback for when URIs are received from clipboard"""
     shred_paths = None
     if 'text/uri-list' in targets:
         # Linux
         shred_uris = clipboard.wait_for_contents(
             'text/uri-list').get_uris()
         shred_paths = FileUtilities.uris_to_paths(shred_uris)
     elif 'FileNameW' in targets:
         # Windows
         # Use non-GTK+ functions because because GTK+ 2 does not work.
         shred_paths = Windows.get_clipboard_paths()
     if shred_paths:
         self.shred_paths(shred_paths)
     else:
         logger.warning(_('No paths found in clipboard.'))
开发者ID:tstenner,项目名称:bleachbit,代码行数:18,代码来源:GUI.py

示例2: cb_drag_data_received

# 需要导入模块: from bleachbit import FileUtilities [as 别名]
# 或者: from bleachbit.FileUtilities import uris_to_paths [as 别名]
 def cb_drag_data_received(self, widget, context, x, y, selection, target_type, time):
     if target_type == self.TARGET_TYPE_TEXT:
         file_uris = selection.get_uris()
         file_paths = FileUtilities.uris_to_paths(file_uris)
         self.shred_paths(file_paths)
开发者ID:tstenner,项目名称:bleachbit,代码行数:7,代码来源:GUI.py

示例3: cb_drag_data_received

# 需要导入模块: from bleachbit import FileUtilities [as 别名]
# 或者: from bleachbit.FileUtilities import uris_to_paths [as 别名]
 def cb_drag_data_received(widget, context, x, y, data, info, time):
     if info == 80:
         uris = data.get_uris()
         paths = FileUtilities.uris_to_paths(uris)
         self.shred_paths(paths)
开发者ID:az0,项目名称:bleachbit,代码行数:7,代码来源:GUI.py


注:本文中的bleachbit.FileUtilities.uris_to_paths方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。