add a basic interface to the glob module for use by a javascript file picker widget

This commit is contained in:
Damien Churchill 2008-12-01 23:13:19 +00:00
parent 57d3517ef2
commit 443fef1d95

View File

@ -27,6 +27,7 @@ import gettext
import locale import locale
import pkg_resources import pkg_resources
import sys import sys
import glob
import shutil import shutil
import os import os
import os.path import os.path
@ -758,3 +759,9 @@ class Core(
self.signals.emit("torrent_queue_changed") self.signals.emit("torrent_queue_changed")
except KeyError: except KeyError:
log.warning("torrent_id: %s does not exist in the queue", torrent_id) log.warning("torrent_id: %s does not exist in the queue", torrent_id)
def export_glob(self, path):
return glob.glob(path)
def export_iglob(self, path):
return glob.iglob(path)