http://www.mediawiki.org/wiki/Special:Code/pywikipedia/11053
Revision: 11053 Author: xqt Date: 2013-02-08 14:30:09 +0000 (Fri, 08 Feb 2013) Log Message: ----------- revert changes of r11028: does not work with pwb.py caller script
Modified Paths: -------------- branches/rewrite/pywikibot/version.py
Modified: branches/rewrite/pywikibot/version.py =================================================================== --- branches/rewrite/pywikibot/version.py 2013-02-08 14:18:47 UTC (rev 11052) +++ branches/rewrite/pywikibot/version.py 2013-02-08 14:30:09 UTC (rev 11053) @@ -12,7 +12,6 @@ import os import time import urllib -import sys
cache = None
@@ -135,16 +134,3 @@ exec(line) break return __version__ - -## Get the tail path component and file name of the currently executing -# script. Returns a tuple. -# -def get_executing_script(): - """Get the last path component and filename of the currently - executing script.""" - try: - script = os.path.abspath(sys.modules['__main__'].__file__) - except (KeyError, AttributeError): - script = sys.executable - path, file = os.path.split(script) - return (os.path.basename(path), file)
pywikipedia-svn@lists.wikimedia.org