meld r1213 - trunk/vc
- From: vincele svn gnome org
- To: svn-commits-list gnome org
- Subject: meld r1213 - trunk/vc
- Date: Tue, 3 Mar 2009 00:30:15 +0000 (UTC)
Author: vincele
Date: Tue Mar 3 00:30:15 2009
New Revision: 1213
URL: http://svn.gnome.org/viewvc/meld?rev=1213&view=rev
Log:
Use os.path.{join,splitext,basename} methods for handling pathes
Modified:
trunk/vc/__init__.py
Modified: trunk/vc/__init__.py
==============================================================================
--- trunk/vc/__init__.py (original)
+++ trunk/vc/__init__.py Tue Mar 3 00:30:15 2009
@@ -28,8 +28,8 @@
def load_plugins():
_vcdir = os.path.dirname(os.path.abspath(__file__))
ret = []
- for plugin in glob.glob("%s/[a-z]*.py" % _vcdir):
- modname = "vc.%s" % os.path.basename(plugin)[:-3]
+ for plugin in glob.glob(os.path.join(_vcdir, "[a-z]*.py")):
+ modname = "vc.%s" % os.path.basename(os.path.splitext(plugin)[0])
ret.append( __import__(modname, globals(), locals(), "*") )
return ret
_plugins = load_plugins()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]