Thread: [Pymoul-svn] SF.net SVN: pymoul: [86] pymoul/trunk (Page 2)
Status: Alpha
Brought to you by:
tiran
From: <ti...@us...> - 2007-01-26 18:46:01
|
Revision: 86 http://pymoul.svn.sourceforge.net/pymoul/?rev=86&view=rev Author: tiran Date: 2007-01-26 10:30:56 -0800 (Fri, 26 Jan 2007) Log Message: ----------- More cleanups: removed unused processinfo module Removed dependency on pywin32 again. Apparently windows locks the file Modified Paths: -------------- pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py Removed Paths: ------------- pymoul/trunk/src/moul/osdependent/processinfo.py Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-26 17:37:52 UTC (rev 85) +++ pymoul/trunk/setup_win32.py 2007-01-26 18:30:56 UTC (rev 86) @@ -71,9 +71,7 @@ pexe['includes'] = ['sip', 'PyQt4', 'encodings', 'encodings.*', 'moul.osdependent.win32', 'moul.osdependent.win32.*'] # SSL currently not in use but imported by socket - pexe['excludes'] = ['_ssl'] - # added by platform but not yet required - #pexe['excludes'].extend(('win32pipe', 'win32api', 'win32con', 'win32evtlog')) + pexe['excludes'] = ['_ssl', 'win32pipe', 'win32evtlog', 'win32file', 'win32api'] # added by logging.handlers.SMTPHandler but not yet required pexe['excludes'].append('smtplib') # UPX Deleted: pymoul/trunk/src/moul/osdependent/processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-26 17:37:52 UTC (rev 85) +++ pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-26 18:30:56 UTC (rev 86) @@ -1,219 +0,0 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- -"""Process info - -Based on http://gelb.bcom.at/trac/misc/browser/processinfo - -Modified and optimized by Christian Heimes -""" - -import sys -import os - -__all__ = ['PLATFORM', 'UnsupportedOsError', 'getCurrentPids', - 'getCurrentPidNames', 'getCurrentPidDetails'] - -class UnsupportedOsError(NotImplementedError): - pass - -PLATFORM = None - -_plat = sys.platform.startswith -if _plat('win'): - PLATFORM = 'win' - win32process = None - ctypes = None - import csv - try: - import win32process - except ImportError: - try: - import ctypes - except ImportError: - pass -elif _plat('linux2') or _plat('cygwin'): - PLATFORM = 'linux' # Linux or Cygwin -elif _plat('darwin'): - # XXX: unsupported - PLATFORM = 'mac' # Mac OS X -elif _plat('freebsd') or _plat('netbsd') or _plat('openbsd'): - # XXX: unsupported - PLATFORM = 'bsd' # *BSD -else: - PLATFORM = 'unknown' - raise UnsupportedOsError(sys.platform) - -# **************************************************************************** -# Linux / cygwin implementation - -def _getCurrentPids_linux(): - """ - Returns current process-id's. - - :return: list with process-id's. - """ - pids = [] - for fname in os.listdir("/proc"): - if os.path.isdir(os.path.join("/proc", fname)): - try: - pids.append(int(fname)) - except ValueError: - continue - return pids - -def _getCurrentPidDetails_linux(): - """Returns mapping pid -> detailed informations - """ - mapping = {} - for pid in getCurrentPids(): - try: - try: - # read entiry file to avoid race condition bugs - fd = open('/proc/%i/status' % pid, 'rb') - status = fd.read().split('\n') - finally: - if fd: - fd.close() - except IoError: - continue - details = {} - for line in status: - try: - key, value = line.split(':\t') - except ValueError: - continue - details[key.lower()] = value.strip() - mapping[pid] = details - - return mapping - -def _getCurrentPidNames_linux(): - """Returns mapping pid -> name - """ - mapping = {} - for pid, details in getCurrentPidDetails().items(): - mapping[pid] = details.get('name', None) - return mapping - - -# **************************************************************************** -# Windows / win32 implementaton - -def _getCurrentPids_win(): - """ - Returns current process-id's. - - :return: List with process-id's. - """ - if win32process is not None: - return list(win32process.EnumProcesses()) - elif ctypes is not None: - # ctypes is installed --> try psapi.dll - psapi = ct.windll.psapi - arr = ct.c_long * 1024 - process_ids = arr() - cb = ct.sizeof(process_ids) - bytes_returned = ct.c_ulong() - psapi.EnumProcesses(ct.byref(process_ids), cb, ct.byref(bytes_returned)) - return sorted(list(set(process_ids))) - else: - csvlines = [] - current_pids = [] - for line in os.popen("tasklist.exe /fo csv /nh"): - line = line.strip() - if line: - csvlines.append(line) - for line in csv.reader(csvlines): - current_pids.append(int(line[1])) - if not csvlines: - raise NotImplementedError("tasklist.exe not found (>WinXP)") - return current_pids - -def _getCurrentPidNames_win(): - """Returns mapping pid -> name - """ - mapping = {} - for pid, details in getCurrentPidDetails().items(): - mapping[pid] = details.get('name', None) - return mapping - -def _getCurrentPidDetails_win(): - """ - Returns processinfos. (pid, name and size_kb) - """ - result = {} - - # tasklist.exe runs on Windows XP and higher. (To parse the ouput of - # tasklist.exe is faster than WMI.) - csvlines = [] - for line in os.popen("tasklist.exe /fo csv /nh"): - line = line.strip() - if line: - csvlines.append(line) - for line in csv.reader(csvlines): - pid = int(line[1]) - details = { - "name": line[0].decode("cp850"), # to unicode - "pid": pid, - } - value = "".join( - char for char in line[4] - if char.isdigit() - ) - details["size_kb"] = int(value) - retdict[pid] = details - if not csvlines: - try: - from win32com.client import GetObject - # pywin32 is installed --> use WMI - wmi = GetObject('winmgmts:') - processes = wmi.InstancesOf('Win32_Process') - for process in processes: - pid = int(process.Properties_("ProcessId").value) - details = { - "name": process.Properties_("Name").value, - "pid": pid, - "size_kb": int(process.Properties_("WorkingSetSize").value) / 1000 - } - retdict[pid] = details - except ImportError: - raise NotImplementedError("No tasklist.exe and no WMI.") - return retdict - -# **************************************************************************** -# general - -def unsupported(): - """Platform not supported - """ - raise UnsupportedOsError(PLATFORM) -unsupported.__unsupported__ = True - -def _initialize(): - mod = sys.modules[__name__] - for name in ('getCurrentPids','getCurrentPidDetails', 'getCurrentPidNames'): - func = getattr(mod, "_%s_%s" % (name, PLATFORM), None) - if func is None: - func = unsupported - else: - func.__name__ = name - setattr(mod, name, func) -_initialize() - -def main(): - """Testing""" - - from pprint import pformat - # Current PIDs - current_pids = getCurrentPids() - print "Current PIDs: %s" % pformat(current_pids) - print - print "Current PID Count: %s" % len(current_pids) - print - - print "Current PIDs with names: %s" % pformat(getCurrentPidNames()) - print - -if __name__ == "__main__": - main() - Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-26 17:37:52 UTC (rev 85) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-26 18:30:56 UTC (rev 86) @@ -25,11 +25,12 @@ Boiler plate >>> import sys >>> from shutil import rmtree ->>> from subprocess import call +>>> from subprocess import Popen +>>> from StringIO import StringIO >>> tmpdir = tempfile.mkdtemp() >>> testfile = os.path.join(tmpdir, 'test.lck') >>> if os.name == 'nt': -... rm = "del" +... rm = "cmd /c del" ... else: ... rm = "rm" @@ -39,20 +40,29 @@ >>> fn1 = fd1.fileno() >>> lock(fd1, flags) >>> fd1.write('testdata') +>>> os.path.isfile(testfile) +True Try to delete the file from another process ->>> try: -... retcode = call("%s %s" % (rm, testfile)) -... except: -... typ, value, tb = sys.exc_info() -... del tb -... else: -... print "Should have raised an error!" +>>> stdout = tempfile.TemporaryFile(mode="w+") +>>> stderr = tempfile.TemporaryFile(mode="w+") +>>> popen = Popen("%s %s" % (rm, testfile), stdout=stdout, stderr=stderr) +>>> popen.wait() +0 -On Windows the error is WindowsError based on OSError ->>> issubclass(typ, OSError) or typ +>>> stdout.seek(0) +>>> out = stdout.read() +>>> if os.name == 'nt': +... out.endswith('test.lck\\n') or out True +>>> stderr.seek(0) +>>> stderr.read() != '' +True + +>>> os.path.isfile(testfile) +True + Clean up >>> unlock(fd1) >>> fd1.close() @@ -86,17 +96,19 @@ USER = getpass.getuser() PID = os.getpid() +# PYWIN32: Apparently windows locks a file automatically if os.name == 'nt': - import win32con - import win32file - import pywintypes - LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK - LOCK_SH = 0 # the default - LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY - lowbits, highbits = 0, -65536 +# import win32con +# import win32file +# import pywintypes +# LOCK_EX = win32con.LOCKFILE_EXCLUSIVE_LOCK +# LOCK_SH = 0 # the default +# LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY +# lowbits, highbits = 0, -65536 + LOCK_SH, LOCK_NB = 0, 1 elif os.name == 'posix': import fcntl - LOCK_EX = fcntl.LOCK_EX + #LOCK_EX = fcntl.LOCK_EX LOCK_SH = fcntl.LOCK_SH LOCK_NB = fcntl.LOCK_NB else: @@ -104,11 +116,13 @@ if os.name == 'nt': def lock(file, flags): - hfile = win32file._get_osfhandle(file.fileno()) - return win32file.LockFileEx(hfile, flags, lowbits, highbits, pywintypes.OVERLAPPED()) + #hfile = win32file._get_osfhandle(file.fileno()) + #return win32file.LockFileEx(hfile, flags, lowbits, highbits, pywintypes.OVERLAPPED()) + pass def unlock(file): - hfile = win32file._get_osfhandle(file.fileno()) - return win32file.UnlockFileEx(hfile, lowbits, highbits, pywintypes.OVERLAPPED()) + #hfile = win32file._get_osfhandle(file.fileno()) + #return win32file.UnlockFileEx(hfile, lowbits, highbits, pywintypes.OVERLAPPED()) + pass elif os.name =='posix': def lock(file, flags): return fcntl.flock(file.fileno(), flags) @@ -141,6 +155,12 @@ May raise an OSError """ + if os.path.isfile(self.lckfile): + try: + os.unlink(self.lckfile) + except OSError, IOError: + self._fd = None + raise SingleAppError("Another instance is already running") try: self._fd = open(self.lckfile, 'w') self._fd.write(str(self.pid)) Modified: pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-01-26 17:37:52 UTC (rev 85) +++ pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-01-26 18:30:56 UTC (rev 86) @@ -27,7 +27,7 @@ from moul.osdependent.singleapp import SimpleSingleApp from moul.osdependent.singleapp import lock from moul.osdependent.singleapp import unlock -from moul.osdependent.singleapp import LOCK_EX, LOCK_SH, LOCK_NB +from moul.osdependent.singleapp import LOCK_SH, LOCK_NB def test_suite(): return unittest.TestSuite(( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-27 22:29:40
|
Revision: 89 http://pymoul.svn.sourceforge.net/pymoul/?rev=89&view=rev Author: tiran Date: 2007-01-27 14:29:40 -0800 (Sat, 27 Jan 2007) Log Message: ----------- Propset eol-style and keywords Renamed Makefile to Makefile.in Tests and better implementation for locking and singleapp Modified Paths: -------------- pymoul/trunk/compileui.py pymoul/trunk/setup.py pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/osdependent/__init__.py pymoul/trunk/src/moul/osdependent/darwin/__init__.py pymoul/trunk/src/moul/osdependent/linux/__init__.py pymoul/trunk/src/moul/osdependent/processinfo.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py pymoul/trunk/src/moul/osdependent/win32/__init__.py pymoul/trunk/src/moul/qt/moulqt.py Added Paths: ----------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py Removed Paths: ------------- pymoul/trunk/Makefile Property Changed: ---------------- pymoul/trunk/AUTHORS.txt pymoul/trunk/GPL.txt pymoul/trunk/INSTALL.txt pymoul/trunk/README.txt pymoul/trunk/compileui.py pymoul/trunk/distutils_upx.py pymoul/trunk/ez_setup.py pymoul/trunk/setup.py pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/config/tests/test_config.py pymoul/trunk/src/moul/file/tests/audio.txt pymoul/trunk/src/moul/file/tests/audiocaps.0.txt pymoul/trunk/src/moul/file/tests/graphics.txt pymoul/trunk/src/moul/file/tests/test_chatlog.py pymoul/trunk/src/moul/file/tests/test_kiimage.py pymoul/trunk/src/moul/file/tests/test_localization.py pymoul/trunk/src/moul/file/tests/test_plasmalog.py pymoul/trunk/src/moul/file/tests/test_wdysini.py pymoul/trunk/src/moul/osdependent/__init__.py pymoul/trunk/src/moul/osdependent/darwin/__init__.py pymoul/trunk/src/moul/osdependent/linux/__init__.py pymoul/trunk/src/moul/osdependent/processinfo.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/osdependent/tests/__init__.py pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py pymoul/trunk/src/moul/osdependent/win32/__init__.py pymoul/trunk/src/moul/osdependent/win32/registry.py pymoul/trunk/src/moul/osdependent/win32/winpath.py pymoul/trunk/src/moul/qt/localization.py pymoul/trunk/src/moul/qt/ui/README.txt pymoul/trunk/src/moul/server/__init__.py pymoul/trunk/src/moul/server/ping.py pymoul/trunk/src/moul/server/serverlist.py pymoul/trunk/src/moul/server/tests/__init__.py pymoul/trunk/src/moul/server/tests/test_ping.py pymoul/trunk/src/moul/server/tests/test_serverlist.py pymoul/trunk/src/moul/time/README.txt pymoul/trunk/src/moul/time/tests/test_dni.py pymoul/trunk/test.py pymoul/trunk/version.txt Property changes on: pymoul/trunk/AUTHORS.txt ___________________________________________________________________ Name: svn:keywords + Id Revisioni Property changes on: pymoul/trunk/GPL.txt ___________________________________________________________________ Name: svn:keywords + Id Revisioni Property changes on: pymoul/trunk/INSTALL.txt ___________________________________________________________________ Name: svn:keywords + Id Revisioni Deleted: pymoul/trunk/Makefile =================================================================== --- pymoul/trunk/Makefile 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/Makefile 2007-01-27 22:29:40 UTC (rev 89) @@ -1,61 +0,0 @@ -PYTHON?=python -EPYDOC=$(PYTHON) -c "import epydoc.cli; epydoc.cli.cli()" -TESTFLAGS=-v -TESTOPTS= -SETUPFLAGS= - -all: inplace - -# Build in-place -inplace: - PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i - -build: compileui - PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build - -py2exe: - PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) py2exe - -innosetup: - PYTHONPATH="src" INNOSETUP="yes" $(PYTHON) setup.py $(SETUPFLAGS) py2exe - -bdist_egg: - PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) bdist_egg - -run: compileui - PYTHONPATH="src" $(PYTHON) src/moul/qt/moulqt.py - -exerun: compileui py2exe - dist/moulqt.exe - -compileui: - $(PYTHON) compileui.py - -test_build: build compileui - PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) - -test_inplace: compileui - PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) - -doc_html: - PYTHONPATH="src" $(EPYDOC) -v --html --output="doc/html" moul - -# What should the default be? -test: test_inplace - -exe: py2exe - -installer: innosetup - -egg: bdist_egg - -doc: doc_html - -clean: - find . \( -name '*.o' -o -name '*.c' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \; - rm -rf build - -realclean: clean - rm -f TAGS - $(PYTHON) setup.py clean -a - Copied: pymoul/trunk/Makefile.in (from rev 88, pymoul/trunk/Makefile) =================================================================== --- pymoul/trunk/Makefile.in (rev 0) +++ pymoul/trunk/Makefile.in 2007-01-27 22:29:40 UTC (rev 89) @@ -0,0 +1,67 @@ +PYTHON?=python +EPYDOC=$(PYTHON) -c "import epydoc.cli; epydoc.cli.cli()" +TESTFLAGS=-v +TESTOPTS= +SETUPFLAGS= + +all: inplace + +# Build in-place +inplace: + PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i + +build: compileui + PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build + +py2exe: + PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) py2exe + +innosetup: + PYTHONPATH="src" INNOSETUP="yes" $(PYTHON) setup.py $(SETUPFLAGS) py2exe + +bdist_egg: + PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) bdist_egg + +run: compileui + PYTHONPATH="src" $(PYTHON) src/moul/qt/moulqt.py + +exerun: compileui py2exe + dist/moulqt.exe + +compileui: + $(PYTHON) compileui.py + +test_build: build compileui + PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) + +test_inplace: compileui + PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) + +doc_html: + PYTHONPATH="src" $(EPYDOC) -v --html --output="doc/html" moul + +# What should the default be? +test: test_inplace + +exe: py2exe + +installer: innosetup + +egg: bdist_egg + +doc: doc_html + +clean: + find . \( -name '*.o' -o -name '*.c' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \; + rm -rf build + +realclean: clean + rm -f TAGS + $(PYTHON) setup.py clean -a + +propset: + find src/moul \( -name '*.py' -o -name '*.txt' \) -a -not -wholename '*.svn*' | xargs svn propset svn:keywords "Id Revision" + find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' \) -a -not -wholename '*.svn*' | xargs svn propset svn:eol-style "native" + find . -maxdepth 1 \( -name '*.py' -o -name '*.txt' \) | xargs svn propset svn:keywords "Id Revisioni" + find . -maxdepth 1 \( -name '*.py' -o -name '*.txt' \) | xargs svn propset svn:eol-style "native" + Property changes on: pymoul/trunk/README.txt ___________________________________________________________________ Name: svn:keywords + Id Revisioni Modified: pymoul/trunk/compileui.py =================================================================== --- pymoul/trunk/compileui.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/compileui.py 2007-01-27 22:29:40 UTC (rev 89) @@ -3,7 +3,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision$" +__revision__ = "$Revision: 45 $" import os import re Property changes on: pymoul/trunk/compileui.py ___________________________________________________________________ Name: svn:keywords - Id Revision + Id Revisioni Property changes on: pymoul/trunk/distutils_upx.py ___________________________________________________________________ Name: svn:keywords + Id Revisioni Property changes on: pymoul/trunk/ez_setup.py ___________________________________________________________________ Name: svn:keywords - Id Revision + Id Revisioni Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/setup.py 2007-01-27 22:29:40 UTC (rev 89) @@ -5,7 +5,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision$" +__revision__ = "$Revision: 58 $" import sys import os Property changes on: pymoul/trunk/setup.py ___________________________________________________________________ Name: svn:keywords - Id Revision + Id Revisioni Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/setup_win32.py 2007-01-27 22:29:40 UTC (rev 89) @@ -2,7 +2,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision$" +__revision__ = "$Revision: 86 $" import os import sys Property changes on: pymoul/trunk/setup_win32.py ___________________________________________________________________ Name: svn:keywords - Id Revision + Id Revisioni Property changes on: pymoul/trunk/src/moul/config/tests/test_config.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/audio.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/audiocaps.0.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/graphics.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/test_chatlog.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/test_kiimage.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/test_localization.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/test_plasmalog.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/file/tests/test_wdysini.py ___________________________________________________________________ Name: svn:keywords + Id Revision Modified: pymoul/trunk/src/moul/osdependent/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/__init__.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/__init__.py 2007-01-27 22:29:40 UTC (rev 89) @@ -1,136 +1,136 @@ -# pyMoul - Python interface to Myst Online URU Live -# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> - -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., 59 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -"""OS dependent code for linux, mac and win32 - ->>> pids = getPids() ->>> len(pids) > 1 -True - ->>> pids = getPidNames() ->>> found = False ->>> for pid, name in pids.items(): -... if name.lower().startswith('python'): -... found = True ->>> found -True -""" -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - -import os -import sys -from moul.log import getLogger -from moul.osdependent.processinfo import getPids -from moul.osdependent.processinfo import getPidNames - -LOG = getLogger('moul.osdependent') - -# a program under py2exe is sys.frozen -__FROZEN__ = bool(getattr(sys, 'frozen', False)) -# OS stuff -_plat = sys.platform.startswith -__WIN32__ = _plat('win32') # win64, cygwin? -__CYGWIN__ = _plat('cygwin') -__LINUX__ = _plat('linux2') -__MACOSX__ = _plat('darwin') -__BSD__ = _plat('freebsd') or _plat('netbsd') or _plat('openbsd') -__POSIX__ = os.name.lower() == 'posix' -__NT__ = os.name.lower() == 'nt' -__INFO__ = (__WIN32__, __CYGWIN__, __LINUX__, __MACOSX__, __BSD__, - __POSIX__, __NT__) - -# names to import: from moul.osdependent.ID import NAME (as NAME) -NAMES = ('getMoulUserDataDir', - ('getPyMoulDataDir', '_getPyMoulDataDir'), # as - 'startMoul', 'isMoulRunning', - ) - -_marker = object() - -def _importHelper(modname, names=None, target=None): - """Import a list of variables from a module - - >>> mod = _importHelper('moul.osdependent') - >>> mod == _thismodule or mod - True - >>> vars = _importHelper('moul.osdependent', ('_marker', )) - >>> vars[0] is _marker - True - >>> class Target(object): - ... pass - >>> target = Target() - >>> vars = _importHelper('moul.osdependent', ('_marker', ), target=target) - >>> target._marker is _marker - True - >>> vars[0] is _marker - True - - >>> vars = _importHelper('moul.osdependent', (('_marker', 'another'), ), - ... target=target) - >>> target.another is _marker - True - >>> vars[0] is _marker - True - """ - mod = __import__(modname, globals(), locals(), ['']) - if names is None: - return mod - else: - vars = [] - for name in names: - if isinstance(name, (tuple, list)): - name, nameas = name - else: - nameas = name - var = getattr(mod, name) - vars.append(var) - if target is not None: - setattr(target, nameas, var) - return vars - -# XXX: what about cygwin, bsd and others? -_thismodule = sys.modules[__name__] -if __WIN32__: - _importHelper('moul.osdependent.win32', NAMES, target=_thismodule) -elif __LINUX__: - _importHelper('moul.osdependent.linux', NAMES, target=_thismodule) -elif __MACOSX__: - _importHelper('moul.osdependent.darwin', NAMES, target=_thismodule) -else: - raise RuntimeError('platform %s not supported' % sys.platform) - -def getPyMoulDataDir(check=False): - """Get pyMoul data directory - - The directory contains log files, ini files and other local stuff - """ - datadir = _getPyMoulDataDir() - if check: - if os.path.abspath(datadir) != datadir: - raise ValueError("Datadir is not absolute %s" % datadir) - if not os.path.isdir(datadir): - parent = os.path.abspath(os.path.join(datadir, os.pardir)) - if not os.path.isdir(parent): - raise ValueError("Datadir's parent dir does not exist: %s" - % par) - else: - LOG.debug("Creating pyMoul data dir %s" % datadir) - os.mkdir(datadir, 0750) - LOG.debug("Using pyMoul data dir %s" % datadir) - return datadir +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""OS dependent code for linux, mac and win32 + +>>> pids = getPids() +>>> len(pids) > 1 +True + +>>> pids = getPidNames() +>>> found = False +>>> for pid, name in pids.items(): +... if name.lower().startswith('python'): +... found = True +>>> found +True +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import os +import sys +from moul.log import getLogger +from moul.osdependent.processinfo import getPids +from moul.osdependent.processinfo import getPidNames + +LOG = getLogger('moul.osdependent') + +# a program under py2exe is sys.frozen +__FROZEN__ = bool(getattr(sys, 'frozen', False)) +# OS stuff +_plat = sys.platform.startswith +__WIN32__ = _plat('win32') # win64, cygwin? +__CYGWIN__ = _plat('cygwin') +__LINUX__ = _plat('linux2') +__MACOSX__ = _plat('darwin') +__BSD__ = _plat('freebsd') or _plat('netbsd') or _plat('openbsd') +__POSIX__ = os.name.lower() == 'posix' +__NT__ = os.name.lower() == 'nt' +__INFO__ = (__WIN32__, __CYGWIN__, __LINUX__, __MACOSX__, __BSD__, + __POSIX__, __NT__) + +# names to import: from moul.osdependent.ID import NAME (as NAME) +NAMES = ('getMoulUserDataDir', + ('getPyMoulDataDir', '_getPyMoulDataDir'), # as + 'startMoul', 'isMoulRunning', + ) + +_marker = object() + +def _importHelper(modname, names=None, target=None): + """Import a list of variables from a module + + >>> mod = _importHelper('moul.osdependent') + >>> mod == _thismodule or mod + True + >>> vars = _importHelper('moul.osdependent', ('_marker', )) + >>> vars[0] is _marker + True + >>> class Target(object): + ... pass + >>> target = Target() + >>> vars = _importHelper('moul.osdependent', ('_marker', ), target=target) + >>> target._marker is _marker + True + >>> vars[0] is _marker + True + + >>> vars = _importHelper('moul.osdependent', (('_marker', 'another'), ), + ... target=target) + >>> target.another is _marker + True + >>> vars[0] is _marker + True + """ + mod = __import__(modname, globals(), locals(), ['']) + if names is None: + return mod + else: + vars = [] + for name in names: + if isinstance(name, (tuple, list)): + name, nameas = name + else: + nameas = name + var = getattr(mod, name) + vars.append(var) + if target is not None: + setattr(target, nameas, var) + return vars + +# XXX: what about cygwin, bsd and others? +_thismodule = sys.modules[__name__] +if __WIN32__: + _importHelper('moul.osdependent.win32', NAMES, target=_thismodule) +elif __LINUX__: + _importHelper('moul.osdependent.linux', NAMES, target=_thismodule) +elif __MACOSX__: + _importHelper('moul.osdependent.darwin', NAMES, target=_thismodule) +else: + raise RuntimeError('platform %s not supported' % sys.platform) + +def getPyMoulDataDir(check=False): + """Get pyMoul data directory + + The directory contains log files, ini files and other local stuff + """ + datadir = _getPyMoulDataDir() + if check: + if os.path.abspath(datadir) != datadir: + raise ValueError("Datadir is not absolute %s" % datadir) + if not os.path.isdir(datadir): + parent = os.path.abspath(os.path.join(datadir, os.pardir)) + if not os.path.isdir(parent): + raise ValueError("Datadir's parent dir does not exist: %s" + % par) + else: + LOG.debug("Creating pyMoul data dir %s" % datadir) + os.mkdir(datadir, 0750) + LOG.debug("Using pyMoul data dir %s" % datadir) + return datadir Property changes on: pymoul/trunk/src/moul/osdependent/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Modified: pymoul/trunk/src/moul/osdependent/darwin/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/darwin/__init__.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/darwin/__init__.py 2007-01-27 22:29:40 UTC (rev 89) @@ -1,57 +1,57 @@ -# pyMoul - Python interface to Myst Online URU Live -# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> - -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., 59 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -"""moul.osdependent.darwin -""" -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - -import os -from subprocess import Popen -from moul.log import getLogger - -LOG = getLogger('moul.darwin') -LOG.critical('Darwin/Mac support is not tested') - -MOUL_DIR = "Uru Live" -EXEC_NAME = "UruLauncher" -HOME = os.environ['HOME'] - -def getMoulUserDataDir(): - """Get path of MOUL data directory - - The MOUL data directory contains log files, chatlogs, KI images and many - more things. - """ - moul_data = os.path.join(HOME, MOUL_DIR) - -def getPyMoulDataDir(): - """Get path to the pyMoul ini directory - """ - inidir= os.path.join(HOME, '.pymoul') - return inidir - -def startMoul(installdir, *args, **kwargs): - """Start MOUL - returns a Popen instance - - args are applied to the program while kwargs are applied to - subprocess.Popen() - """ - path = os.path.join(installdir, EXEC_NAME) - args = ' '.join(args) - return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""moul.osdependent.darwin +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import os +from subprocess import Popen +from moul.log import getLogger + +LOG = getLogger('moul.darwin') +LOG.critical('Darwin/Mac support is not tested') + +MOUL_DIR = "Uru Live" +EXEC_NAME = "UruLauncher" +HOME = os.environ['HOME'] + +def getMoulUserDataDir(): + """Get path of MOUL data directory + + The MOUL data directory contains log files, chatlogs, KI images and many + more things. + """ + moul_data = os.path.join(HOME, MOUL_DIR) + +def getPyMoulDataDir(): + """Get path to the pyMoul ini directory + """ + inidir= os.path.join(HOME, '.pymoul') + return inidir + +def startMoul(installdir, *args, **kwargs): + """Start MOUL - returns a Popen instance + + args are applied to the program while kwargs are applied to + subprocess.Popen() + """ + path = os.path.join(installdir, EXEC_NAME) + args = ' '.join(args) + return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) Property changes on: pymoul/trunk/src/moul/osdependent/darwin/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Modified: pymoul/trunk/src/moul/osdependent/linux/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-01-27 22:29:40 UTC (rev 89) @@ -1,115 +1,115 @@ -# pyMoul - Python interface to Myst Online URU Live -# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> - -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., 59 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -"""moul.osdependent.linux -""" -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - -import os -from subprocess import Popen -from moul.log import getLogger - -LOG = getLogger('moul.linux') -LOG.critical('Darwin/Mac support is not tested') - -MOUL_DIR = "Uru Live" -INI_FILE = ('pyMoul', 'pymoul.ini') -EXEC_NAME = "UruLauncher" -HOME = os.environ['HOME'] -PROCESSES = ('urulauncher', 'uruexplorer') - -def getMoulUserDataDir(): - """Get path of MOUL data directory - - The MOUL data directory contains log files, chatlogs, KI images and many - more things. - """ - return os.path.join(HOME, MOUL_DIR) - -def getPyMoulDataDir(): - """Get path to the pyMoul ini directory - """ - inidir= os.path.join(HOME, '.pymoul') - return inidir - -def startMoul(installdir, *args, **kwargs): - """Start MOUL - returns a Popen instance - - args are applied to the program while kwargs are applied to - subprocess.Popen() - """ - path = os.path.join(installdir, EXEC_NAME) - args = ' '.join(args) - return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) - -def isMoulRunning(): - """Test if MOUL or the launcher is running - """ - for pid, name in getCurrentPidNames().items(): - if name.lower() in PROCESSES: - return name.lower() - return False - -# process info -# based on http://gelb.bcom.at/trac/misc/browser/processinfo -def getCurrentPids(): - """Returns current process ids - """ - pids = [] - for fname in os.listdir("/proc"): - if os.path.isdir(os.path.join("/proc", fname)): - try: - pids.append(int(fname)) - except ValueError: - continue - return pids - -def getCurrentPidDetails(): - """Returns mapping pid -> detailed informations - """ - mapping = {} - for pid in getCurrentPids(): - try: - try: - # read entiry file to avoid race condition bugs - fd = open('/proc/%i/status' % pid, 'rb') - status = fd.read().split('\n') - finally: - if fd: - fd.close() - except IoError: - continue - details = {} - for line in status: - try: - key, value = line.split(':\t') - except ValueError: - continue - details[key.lower()] = value.strip() - mapping[pid] = details - - return mapping - -def getCurrentPidNames(): - """Returns mapping pid -> name - """ - mapping = {} - for pid, details in getCurrentPidDetails().items(): - mapping[pid] = details.get('name', None) - return mapping +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""moul.osdependent.linux +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import os +from subprocess import Popen +from moul.log import getLogger + +LOG = getLogger('moul.linux') +LOG.critical('Linux support is not tested') + +MOUL_DIR = "Uru Live" +INI_FILE = ('pyMoul', 'pymoul.ini') +EXEC_NAME = "UruLauncher" +HOME = os.environ['HOME'] +PROCESSES = ('urulauncher', 'uruexplorer') + +def getMoulUserDataDir(): + """Get path of MOUL data directory + + The MOUL data directory contains log files, chatlogs, KI images and many + more things. + """ + return os.path.join(HOME, MOUL_DIR) + +def getPyMoulDataDir(): + """Get path to the pyMoul ini directory + """ + inidir= os.path.join(HOME, '.pymoul') + return inidir + +def startMoul(installdir, *args, **kwargs): + """Start MOUL - returns a Popen instance + + args are applied to the program while kwargs are applied to + subprocess.Popen() + """ + path = os.path.join(installdir, EXEC_NAME) + args = ' '.join(args) + return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) + +def isMoulRunning(): + """Test if MOUL or the launcher is running + """ + for pid, name in getCurrentPidNames().items(): + if name.lower() in PROCESSES: + return name.lower() + return False + +# process info +# based on http://gelb.bcom.at/trac/misc/browser/processinfo +def getCurrentPids(): + """Returns current process ids + """ + pids = [] + for fname in os.listdir("/proc"): + if os.path.isdir(os.path.join("/proc", fname)): + try: + pids.append(int(fname)) + except ValueError: + continue + return pids + +def getCurrentPidDetails(): + """Returns mapping pid -> detailed informations + """ + mapping = {} + for pid in getCurrentPids(): + try: + try: + # read entiry file to avoid race condition bugs + fd = open('/proc/%i/status' % pid, 'rb') + status = fd.read().split('\n') + finally: + if fd: + fd.close() + except IoError: + continue + details = {} + for line in status: + try: + key, value = line.split(':\t') + except ValueError: + continue + details[key.lower()] = value.strip() + mapping[pid] = details + + return mapping + +def getCurrentPidNames(): + """Returns mapping pid -> name + """ + mapping = {} + for pid, details in getCurrentPidDetails().items(): + mapping[pid] = details.get('name', None) + return mapping Property changes on: pymoul/trunk/src/moul/osdependent/linux/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Modified: pymoul/trunk/src/moul/osdependent/processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-27 22:29:40 UTC (rev 89) @@ -29,13 +29,15 @@ >>> pids > 1 True >>> isinstance(pids[0], (int, long)) +True >>> cur in pids True >>> mapping = getPidNames() >>> cur in mapping ->>> mapping[cur].lower() in cur True +>>> mapping[cur].lower() in sys.executable +True >>> getPidDetails('self')['name'] == getPidDetails(cur)['name'] True Property changes on: pymoul/trunk/src/moul/osdependent/processinfo.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-27 22:29:40 UTC (rev 89) @@ -19,55 +19,11 @@ Includes portalocker code with minor tweaks for Python 2.4+ Author: Jonathan Feinberg <jd...@po...> - Version: $Id: portalocker.py,v 1.3 2001/05/29 18:47:55 Administrator Exp $ + Version: $Id$ http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 -Boiler plate ->>> import sys ->>> from shutil import rmtree ->>> from subprocess import Popen ->>> from StringIO import StringIO ->>> tmpdir = tempfile.mkdtemp() ->>> testfile = os.path.join(tmpdir, 'test.lck') ->>> if os.name == 'nt': -... rm = "cmd /c del" -... else: -... rm = "rm" +Unit tests for lock/unlock are in tests/test_singleapp -Create a file and lock it for this process ->>> flags = LOCK_SH | LOCK_NB ->>> fd1 = open(testfile, 'w') ->>> fn1 = fd1.fileno() ->>> lock(fd1, flags) ->>> fd1.write('testdata') ->>> os.path.isfile(testfile) -True - -Try to delete the file from another process ->>> stdout = tempfile.TemporaryFile(mode="w+") ->>> stderr = tempfile.TemporaryFile(mode="w+") ->>> popen = Popen("%s %s" % (rm, testfile), stdout=stdout, stderr=stderr) ->>> popen.wait() -0 - ->>> stdout.seek(0) ->>> out = stdout.read() ->>> if os.name == 'nt': -... out.endswith('test.lck\\n') or out -True - ->>> stderr.seek(0) ->>> stderr.read() != '' -True - ->>> os.path.isfile(testfile) -True - -Clean up ->>> unlock(fd1) ->>> fd1.close() ->>> rmtree(tmpdir) - >>> singleapp = SimpleSingleApp('testapp') >>> lckfile = singleapp.lckfile >>> if os.path.isfile(lckfile): @@ -109,13 +65,15 @@ # LOCK_NB = win32con.LOCKFILE_FAIL_IMMEDIATELY # lowbits, highbits = 0, -65536 LOCK_SH, LOCK_NB = 0, 1 + LOCK = "dummy" elif os.name == 'posix': import fcntl - #LOCK_EX = fcntl.LOCK_EX + LOCK_EX = fcntl.LOCK_EX LOCK_SH = fcntl.LOCK_SH LOCK_NB = fcntl.LOCK_NB + LOCK = LOCK_EX | LOCK_NB else: - raise RuntimeError("PortaLocker only defined for nt and posix platforms") + raise OSError("PortaLocker only defined for nt and posix platforms") if os.name == 'nt': def lock(file, flags): @@ -128,9 +86,9 @@ pass elif os.name =='posix': def lock(file, flags): - return fcntl.flock(file.fileno(), flags) + return fcntl.lockf(file, flags) def unlock(file): - return fcntl.flock(file.fileno(), fcntl.LOCK_UN) + return fcntl.lockf(file, fcntl.LOCK_UN) class SingleAppError(OSError): pass @@ -138,7 +96,6 @@ class SimpleSingleApp(object): """A simple single instance application implemementation """ - flags = LOCK_SH | LOCK_NB def __init__(self, appname, path=TEMPDIR, user=USER, pid=PID, ext='.lck', *args): @@ -152,28 +109,24 @@ self.lckfile = self._genFilename() # register atexit function atexit.register(self.release) - + def acquire(self): """Acquire lock - + May raise an OSError """ - if os.path.isfile(self.lckfile): - try: - os.unlink(self.lckfile) - except OSError, IOError: - self._fd = None - raise SingleAppError("Another instance is already running") try: - self._fd = open(self.lckfile, 'w') - self._fd.write(str(self.pid)) - self._fd.flush() - lock(self._fd, self.flags) + self._fd = open(self.lckfile, 'w+') + lock(self._fd, LOCK) except (OSError, IOError): - self._fd.close() + LOG.exception("Failed to acquire lock") + if self._fd is not None: + self._fd.close() self._fd = None raise SingleAppError("Another instance is already running") else: + self._fd.write(str(self.pid)) + self._fd.flush() LOG.info("Create lock file %s for PID %i" % (self.lckfile, self.pid)) return self.lckfile, self.pid @@ -181,11 +134,12 @@ """Release lock """ try: - unlock(self._fd) + if self._fd is not None: + unlock(self._fd) except (SystemError, SyntaxError): raise except: - pass + LOG.exception("Error while releasin the lock") if self._fd: self._fd.close() if os.path.isfile(self.lckfile): Property changes on: pymoul/trunk/src/moul/osdependent/singleapp.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/osdependent/tests/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py ___________________________________________________________________ Name: svn:keywords + Id Revision Added: pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py (rev 0) +++ pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py 2007-01-27 22:29:40 UTC (rev 89) @@ -0,0 +1,36 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""moul.osdependent.processinfo +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import unittest +from doctest import DocTestSuite + +import moul.osdependent.processinfo + +def test_suite(): + return unittest.TestSuite(( + DocTestSuite('moul.osdependent.processinfo'), + )) + +if __name__ == '__main__': + unittest.main(defaultTest="test_suite") + Property changes on: pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Modified: pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-01-27 22:29:40 UTC (rev 89) @@ -29,11 +29,83 @@ from moul.osdependent.singleapp import unlock from moul.osdependent.singleapp import LOCK_SH, LOCK_NB +import sys +import os +import tempfile +from shutil import rmtree +from subprocess import Popen +from StringIO import StringIO +tmpdir = tempfile.mkdtemp() +testfile = os.path.join(tmpdir, 'test.lck') + +if os.name == 'nt': + rmcmd = "cmd /c del %(testfile)s" +else: + rmcmd = ("LC_ALL=C %(exe)s -c 'from fcntl import *; " + "fd = open(%(testfile)s, %(mode)s); " + "lockf(fd, LOCK_EX | LOCK_NB)'" % {'exe' : sys.executable, + 'mode' : '"a+"', 'testfile' : '"%(testfile)s"'}) + + + #singleapp = SimpleSingleApp('testapp') + #lckfile = singleapp.lckfile + #if os.path.isfile(lckfile): +#... os.unlink(fpath) + #path, pid = singleapp.acquire() + #path == lckfile +#True + #os.path.isfile(lckfile) +#True + #singleapp.checkLocked() is None +#True + #singleapp.release() + #os.path.isfile(lckfile) +#False + +class SingleAppTest(unittest.TestCase): + + def test_locking(self): + FLAGS = LOCK_SH | LOCK_NB + fd = open(testfile, 'w+') + fd.write('testdata') + fd.flush() + self.failUnless(os.path.isfile(testfile)) + lock(fd, FLAGS) + # Try to delete the file from another process + stdout = tempfile.TemporaryFile(mode="w+") + stderr = tempfile.TemporaryFile(mode="w+") + popen = Popen(rmcmd % {'testfile' : testfile}, stdout=stdout, + stderr=stderr, shell=True) + + popen.wait() + stdout.seek(0) + out = stdout.read() + if os.name == 'nt': + self.failUnlessEqual(out, '') + elif os.name =='posix': + self.failUnlessEqual(out, '') + else: + raise OSError("unsupported os") + + stderr.seek(0) + err = stderr.read() + if os.name == 'nt': + self.failUnless('IOError: [Errno 11] Resource temporarily unavailable' in err) + elif os.name =='posix': + self.failUnless('IOError: [Errno 11] Resource temporarily unavailable' in err) + else: + raise OSError("unsupported os") + + self.failUnless(os.path.isfile(testfile)) + unlock(fd) + fd.close() + rmtree(tmpdir) + def test_suite(): return unittest.TestSuite(( + unittest.makeSuite(SingleAppTest), DocTestSuite('moul.osdependent.singleapp'), )) if __name__ == '__main__': unittest.main(defaultTest="test_suite") - Property changes on: pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py ___________________________________________________________________ Name: svn:keywords + Id Revision Modified: pymoul/trunk/src/moul/osdependent/win32/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/win32/__init__.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/osdependent/win32/__init__.py 2007-01-27 22:29:40 UTC (rev 89) @@ -1,74 +1,74 @@ -# pyMoul - Python interface to Myst Online URU Live -# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> - -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# This program is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., 59 -# Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -"""moul.osdependent.win32 -""" -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - -import os -from subprocess import Popen - -from moul.osdependent.win32.winpath import get_homedir as getMyDocuments -from moul.osdependent.win32.winpath import get_appdata as getAppdata -from moul.log import getLogger -from moul.osdependent.processinfo import getPidNames - -LOG = getLogger('moul.win') - -MOUL_DIR = "Uru Live" -EXEC_NAME = "UruLauncher.exe" -# lower case -PROCESSES = ("urulauncher.exe", "uruexplorer.exe") - -MYDOCS = getMyDocuments() -MYAPPDATA = getAppdata() - -def getMoulUserDataDir(): - """Get path of MOUL data directory - - The MOUL data directory contains log files, chatlogs, KI images and many - more things. - """ - moul_data = os.path.join(MYDOCS, MOUL_DIR) - return moul_data - -def getPyMoulDataDir(): - """Get path to the pyMoul ini file - """ - inidir = os.path.join(MYAPPDATA , 'pyMoul') - return inidir - -def startMoul(installdir, *args, **kwargs): - """Start MOUL - returns a Popen instance - - args are applied to the program while kwargs are applied to - subprocess.Popen() - """ - path = os.path.join(installdir, EXEC_NAME) - args = ' '.join(args) - return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) - -def isMoulRunning(): - """Test if MOUL or the launcher is running - """ - for pid, name in getPidNames().items(): - if name.lower() in PROCESSES: - return pid, name.lower() - return False - +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""moul.osdependent.win32 +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import os +from subprocess import Popen + +from moul.osdependent.win32.winpath import get_homedir as getMyDocuments +from moul.osdependent.win32.winpath import get_appdata as getAppdata +from moul.log import getLogger +from moul.osdependent.processinfo import getPidNames + +LOG = getLogger('moul.win') + +MOUL_DIR = "Uru Live" +EXEC_NAME = "UruLauncher.exe" +# lower case +PROCESSES = ("urulauncher.exe", "uruexplorer.exe") + +MYDOCS = getMyDocuments() +MYAPPDATA = getAppdata() + +def getMoulUserDataDir(): + """Get path of MOUL data directory + + The MOUL data directory contains log files, chatlogs, KI images and many + more things. + """ + moul_data = os.path.join(MYDOCS, MOUL_DIR) + return moul_data + +def getPyMoulDataDir(): + """Get path to the pyMoul ini file + """ + inidir = os.path.join(MYAPPDATA , 'pyMoul') + return inidir + +def startMoul(installdir, *args, **kwargs): + """Start MOUL - returns a Popen instance + + args are applied to the program while kwargs are applied to + subprocess.Popen() + """ + path = os.path.join(installdir, EXEC_NAME) + args = ' '.join(args) + return Popen("%s %s" % (path, args), cwd=installdir, **kwargs) + +def isMoulRunning(): + """Test if MOUL or the launcher is running + """ + for pid, name in getPidNames().items(): + if name.lower() in PROCESSES: + return pid, name.lower() + return False + Property changes on: pymoul/trunk/src/moul/osdependent/win32/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Property changes on: pymoul/trunk/src/moul/osdependent/win32/registry.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/osdependent/win32/winpath.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/qt/localization.py ___________________________________________________________________ Name: svn:keywords + Id Revision Modified: pymoul/trunk/src/moul/qt/moulqt.py =================================================================== --- pymoul/trunk/src/moul/qt/moulqt.py 2007-01-27 21:30:28 UTC (rev 88) +++ pymoul/trunk/src/moul/qt/moulqt.py 2007-01-27 22:29:40 UTC (rev 89) @@ -50,7 +50,7 @@ """ LOG.info("Starting PyMoul QT UI with argv %s" % repr(args)) app = QtGui.QApplication(*args) - singleapp = SimpleSingleApp('pymoulqt', path=getPyMoulDataDir()) + singleapp = SimpleSingleApp('pymoulqt', path=getPyMoulDataDir(check=True)) try: singleapp.acquire() except OSError: Property changes on: pymoul/trunk/src/moul/qt/ui/README.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/ping.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/serverlist.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/tests/__init__.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/tests/test_ping.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/server/tests/test_serverlist.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/src/moul/time/README.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Name: svn:eol-style + native Property changes on: pymoul/trunk/src/moul/time/tests/test_dni.py ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/test.py ___________________________________________________________________ Name: svn:keywords - Id Revision + Id Revisioni Property changes on: pymoul/trunk/version.txt ___________________________________________________________________ Name: svn:keywords + Id Revisioni This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-28 15:23:45
|
Revision: 90 http://pymoul.svn.sourceforge.net/pymoul/?rev=90&view=rev Author: tiran Date: 2007-01-28 07:23:44 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Changed import behavior and fixed smaller issues in singleapp Modified Paths: -------------- pymoul/trunk/INSTALL.txt pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/osdependent/__init__.py pymoul/trunk/src/moul/osdependent/linux/__init__.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/qt/__init__.py pymoul/trunk/src/moul/qt/ui/mainwindow.py Added Paths: ----------- pymoul/trunk/src/moul/qt/i18n/ Property Changed: ---------------- pymoul/trunk/ Property changes on: pymoul/trunk ___________________________________________________________________ Name: svn:ignore - build dist *.e4? + build dist *.e4? Makefile Modified: pymoul/trunk/INSTALL.txt =================================================================== --- pymoul/trunk/INSTALL.txt 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/INSTALL.txt 2007-01-28 15:23:44 UTC (rev 90) @@ -5,7 +5,7 @@ * Python 2.5.x http://www.python.org/ * easy_install http://peak.telecommunity.com/DevCenter/EasyInstall * setuptools (via easy install) - * PyTz (via $ easy_install pytz) + * PyTz (via $ easy_install-2.5 pytz) * Qt4 GPL 4.2+ http://www.trolltech.com/developer/downloads/qt/ * PyQt4 4.1.1+ http://www.riverbankcomputing.co.uk/pyqt/ @@ -13,7 +13,7 @@ ------- * pywin32 http://sourceforge.net/projects/pywin32/ - * py2exe http://www.py2exe.org/ + * py2exe http://www.py2exe.org/ (via $ easy_install-2.5 py2exe) * MinGW32 compiler (bundled with Qt4) Tools @@ -21,6 +21,7 @@ * UPX http://upx.sourceforge.net/#download * InnoSetup http://www.jrsoftware.org/ + * epydoc 3.0+ (via $ easy_install-2.5 epydoc) ==================== Windows Installation Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/setup_win32.py 2007-01-28 15:23:44 UTC (rev 90) @@ -68,8 +68,7 @@ pexe = kw['options'].setdefault('py2exe', {}) pexe['compressed'] = 100 # compress zip file pexe['optimize'] = 0 # 0,1,2 - pexe['includes'] = ['sip', 'PyQt4', 'encodings', 'encodings.*', - 'moul.osdependent.win32', 'moul.osdependent.win32.*'] + pexe['includes'] = ['sip', 'PyQt4', 'encodings', 'encodings.*'] # SSL currently not in use but imported by socket pexe['excludes'] = ['_ssl', 'win32pipe', 'win32evtlog', 'win32file', 'win32api'] # added by logging.handlers.SMTPHandler but not yet required Modified: pymoul/trunk/src/moul/osdependent/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/__init__.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/src/moul/osdependent/__init__.py 2007-01-28 15:23:44 UTC (rev 90) @@ -35,6 +35,8 @@ import os import sys +from types import ModuleType + from moul.log import getLogger from moul.osdependent.processinfo import getPids from moul.osdependent.processinfo import getPidNames @@ -65,7 +67,10 @@ def _importHelper(modname, names=None, target=None): """Import a list of variables from a module - + + >>> mod = _importHelper(sys) + >>> mod is sys or mod + True >>> mod = _importHelper('moul.osdependent') >>> mod == _thismodule or mod True @@ -88,7 +93,11 @@ >>> vars[0] is _marker True """ - mod = __import__(modname, globals(), locals(), ['']) + if not isinstance(modname, ModuleType): + mod = __import__(modname, globals(), locals(), ['']) + else: + mod = modname + if names is None: return mod else: @@ -107,11 +116,14 @@ # XXX: what about cygwin, bsd and others? _thismodule = sys.modules[__name__] if __WIN32__: - _importHelper('moul.osdependent.win32', NAMES, target=_thismodule) + from moul.osdependent import win32 as osdep_win32 + _importHelper(osdep_win32, NAMES, target=_thismodule) elif __LINUX__: - _importHelper('moul.osdependent.linux', NAMES, target=_thismodule) + from moul.osdependent import linux as osdep_linux + _importHelper(osdep_linux, NAMES, target=_thismodule) elif __MACOSX__: - _importHelper('moul.osdependent.darwin', NAMES, target=_thismodule) + from moul.osdependent import darwin as osdep_darwin + _importHelper(osdep_darwin, NAMES, target=_thismodule) else: raise RuntimeError('platform %s not supported' % sys.platform) Modified: pymoul/trunk/src/moul/osdependent/linux/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-01-28 15:23:44 UTC (rev 90) @@ -28,7 +28,7 @@ LOG = getLogger('moul.linux') LOG.critical('Linux support is not tested') -MOUL_DIR = "Uru Live" +MOUL_DIR = ".urulive" INI_FILE = ('pyMoul', 'pymoul.ini') EXEC_NAME = "UruLauncher" HOME = os.environ['HOME'] Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-28 15:23:44 UTC (rev 90) @@ -106,6 +106,7 @@ self.pid = pid self.ext = ext self._fd = None + self._locked = False self.lckfile = self._genFilename() # register atexit function atexit.register(self.release) @@ -123,10 +124,12 @@ if self._fd is not None: self._fd.close() self._fd = None + self._locked = False raise SingleAppError("Another instance is already running") else: self._fd.write(str(self.pid)) self._fd.flush() + self._locked = True LOG.info("Create lock file %s for PID %i" % (self.lckfile, self.pid)) return self.lckfile, self.pid @@ -145,18 +148,18 @@ if os.path.isfile(self.lckfile): LOG.info("Remove lock file %s" % self.lckfile) os.unlink(self.lckfile) - + self._locked = False + def checkLocked(self): """Check if another process has a lock """ + if self._locked: + return True try: - fd = open(self.lckfile, 'a+') - fd.close() - except OSError: + lock(self._fd, LOCK) + except (IOError, OSError): return True else: - if self._fd: - return None return False def _genFilename(self): Modified: pymoul/trunk/src/moul/qt/__init__.py =================================================================== --- pymoul/trunk/src/moul/qt/__init__.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/src/moul/qt/__init__.py 2007-01-28 15:23:44 UTC (rev 90) @@ -15,8 +15,11 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place, Suite 330, Boston, MA 02111-1307 USA # + """ +moul.qt package with Qt4 UI """ + __author__ = "Christian Heimes" __version__ = "$Id$" __revision__ = "$Revision$" Modified: pymoul/trunk/src/moul/qt/ui/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-01-27 22:29:40 UTC (rev 89) +++ pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-01-28 15:23:44 UTC (rev 90) @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'src\moul\qt\ui\mainwindow.ui' +# Form implementation generated from reading ui file 'src/moul/qt/ui/mainwindow.ui' # -# Created: Fri Jan 26 19:48:46 2007 +# Created: Sun Jan 28 15:25:00 2007 # by: PyQt4 UI code generator 4.1.1 # # WARNING! All changes made in this file will be lost! This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-28 16:43:17
|
Revision: 92 http://pymoul.svn.sourceforge.net/pymoul/?rev=92&view=rev Author: tiran Date: 2007-01-28 08:43:16 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Added translation files Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts Added Paths: ----------- pymoul/trunk/src/moul/qt/i18n/pymoul_de.qm pymoul/trunk/src/moul/qt/i18n/pymoul_es.qm pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts pymoul/trunk/src/moul/qt/i18n/pymoul_fr.qm pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts pymoul/trunk/src/moul/qt/i18n/pymoul_it.qm pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts Property Changed: ---------------- pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-28 15:49:22 UTC (rev 91) +++ pymoul/trunk/Makefile.in 2007-01-28 16:43:16 UTC (rev 92) @@ -1,5 +1,11 @@ PYTHON?=python EPYDOC=$(PYTHON) -c "import epydoc.cli; epydoc.cli.cli()" +NOTSVN=-a -not -wholename '*.svn*' +FINDPYTXT=find src/moul \( -name '*.py' -o -name '*.txt' \) $(NOTSVN) +FINDPY=find src/moul -name '*.py' $(NOTSVN) +FINDQT=find src/moul/qt \( -name '*.py' -o -name '*.ui' \) $(NOTSVN) +FINDTEXT=find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' -o -name '*.ts' \) $(NOTSVN) +LANGS=de fr it es TESTFLAGS=-v TESTOPTS= SETUPFLAGS= @@ -60,8 +66,15 @@ $(PYTHON) setup.py clean -a propset: - find src/moul \( -name '*.py' -o -name '*.txt' \) -a -not -wholename '*.svn*' | xargs svn propset svn:keywords "Id Revision" - find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' \) -a -not -wholename '*.svn*' | xargs svn propset svn:eol-style "native" - find . -maxdepth 1 \( -name '*.py' -o -name '*.txt' \) | xargs svn propset svn:keywords "Id Revisioni" - find . -maxdepth 1 \( -name '*.py' -o -name '*.txt' \) | xargs svn propset svn:eol-style "native" + $(FINDPYTXT) | xargs svn propset svn:keywords "Id Revision" + $(FINDTEXT) | xargs svn propset svn:eol-style "native" +fixlineendings: + $(FINDPY) | xargs recode -f ibmpc..latin1 + +updatelangs: + for L in $(LANGS); do \ + pylupdate4 `$(FINDQT)` -ts src/moul/qt/i18n/pymoul_$${L}.ts;\ + lrelease src/moul/qt/i18n/pymoul_$${L}.ts; \ + done + Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-28 15:49:22 UTC (rev 91) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-28 16:43:16 UTC (rev 92) @@ -33,8 +33,8 @@ True >>> os.path.isfile(lckfile) True ->>> singleapp.checkLocked() is None -True +>>> singleapp.checkLocked() +2 >>> singleapp.release() >>> os.path.isfile(lckfile) False @@ -151,10 +151,10 @@ self._locked = False def checkLocked(self): - """Check if another process has a lock + """Check a process has a lock """ if self._locked: - return True + return 2 try: lock(self._fd, LOCK) except (IOError, OSError): Added: pymoul/trunk/src/moul/qt/i18n/pymoul_de.qm =================================================================== (Binary files differ) Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_de.qm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-01-28 15:49:22 UTC (rev 91) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-01-28 16:43:16 UTC (rev 92) @@ -2,34 +2,6 @@ <context> <name>MainWindow</name> <message> - <source>MOUL is running</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>MOUL</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>MOUL is not running</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Not Implemented</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Sorry, this feature is not implemented yet!</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Error opening graphics.ini</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Error opening audio.ini</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Tool for Myst Online</source> <translation type="unfinished"></translation> </message> @@ -244,5 +216,33 @@ <source>About</source> <translation type="unfinished"></translation> </message> + <message> + <source>MOUL is running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is not running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Not Implemented</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sorry, this feature is not implemented yet!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening graphics.ini</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening audio.ini</source> + <translation type="unfinished"></translation> + </message> </context> </TS> Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts ___________________________________________________________________ Name: svn:eol-style + native Added: pymoul/trunk/src/moul/qt/i18n/pymoul_es.qm =================================================================== (Binary files differ) Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_es.qm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts 2007-01-28 16:43:16 UTC (rev 92) @@ -0,0 +1,248 @@ +<!DOCTYPE TS><TS> +<context> + <name>MainWindow</name> + <message> + <source>Tool for Myst Online</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Configure</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Windowed</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Vertical Sync</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Display Shadows</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Screen Resolution</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>800x600 (4:3)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Texture Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Low</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>High</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anti-Aliasing</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Med.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ultra</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Shadow Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anisotropic-Filtering</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>NPC Voices</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound FX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ambience Sound</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Music</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Mute all</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Hardware</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound Priority</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio Modes</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Generic Software</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable EAX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Voice chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Microphon Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable Voice Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time zones</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cavern time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cyan time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>UTC -0</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Mountain Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Pacific Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>D'ni time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Browse in game documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Age</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Element</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Language</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Set</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>pyMoul tools</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>About</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is not running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Not Implemented</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sorry, this feature is not implemented yet!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening graphics.ini</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening audio.ini</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts ___________________________________________________________________ Name: svn:eol-style + native Added: pymoul/trunk/src/moul/qt/i18n/pymoul_fr.qm =================================================================== (Binary files differ) Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_fr.qm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts 2007-01-28 16:43:16 UTC (rev 92) @@ -0,0 +1,248 @@ +<!DOCTYPE TS><TS> +<context> + <name>MainWindow</name> + <message> + <source>Tool for Myst Online</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Configure</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Windowed</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Vertical Sync</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Display Shadows</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Screen Resolution</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>800x600 (4:3)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Texture Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Low</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>High</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anti-Aliasing</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Med.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ultra</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Shadow Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anisotropic-Filtering</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>NPC Voices</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound FX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ambience Sound</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Music</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Mute all</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Hardware</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound Priority</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio Modes</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Generic Software</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable EAX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Voice chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Microphon Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable Voice Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time zones</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cavern time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cyan time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>UTC -0</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Mountain Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Pacific Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>D'ni time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Browse in game documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Age</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Element</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Language</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Set</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>pyMoul tools</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>About</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is not running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Not Implemented</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sorry, this feature is not implemented yet!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening graphics.ini</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening audio.ini</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts ___________________________________________________________________ Name: svn:eol-style + native Added: pymoul/trunk/src/moul/qt/i18n/pymoul_it.qm =================================================================== (Binary files differ) Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_it.qm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts 2007-01-28 16:43:16 UTC (rev 92) @@ -0,0 +1,248 @@ +<!DOCTYPE TS><TS> +<context> + <name>MainWindow</name> + <message> + <source>Tool for Myst Online</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Configure</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Windowed</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Vertical Sync</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Display Shadows</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Screen Resolution</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>800x600 (4:3)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Texture Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Low</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>High</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anti-Aliasing</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Med.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ultra</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Shadow Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anisotropic-Filtering</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>NPC Voices</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound FX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ambience Sound</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Music</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Mute all</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Hardware</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound Priority</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio Modes</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Generic Software</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable EAX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Voice chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Microphon Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable Voice Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time zones</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cavern time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cyan time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>UTC -0</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Mountain Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Pacific Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>D'ni time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Browse in game documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Age</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Element</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Language</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Set</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>pyMoul tools</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>About</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is not running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Not Implemented</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sorry, this feature is not implemented yet!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening graphics.ini</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening audio.ini</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-28 21:14:22
|
Revision: 94 http://pymoul.svn.sourceforge.net/pymoul/?rev=94&view=rev Author: tiran Date: 2007-01-28 13:14:23 -0800 (Sun, 28 Jan 2007) Log Message: ----------- include more files in dist Added hash stuff Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/compileui.py pymoul/trunk/setup.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-28 17:15:47 UTC (rev 93) +++ pymoul/trunk/Makefile.in 2007-01-28 21:14:23 UTC (rev 94) @@ -4,7 +4,8 @@ FINDPYTXT=find src/moul \( -name '*.py' -o -name '*.txt' \) $(NOTSVN) FINDPY=find src/moul -name '*.py' $(NOTSVN) FINDQT=find src/moul/qt \( -name '*.py' -o -name '*.ui' \) $(NOTSVN) -FINDTEXT=find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' -o -name '*.ts' \) $(NOTSVN) +FINDTEXT=find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' -o -name '*.ts' \) $(NOTSVN) +FINDHASH= find . -not \( -name '*.txt' -o -name '*.asc' \) -a -not -type d LANGS=de fr it es TESTFLAGS=-v TESTOPTS= @@ -78,3 +79,9 @@ lrelease src/moul/qt/i18n/pymoul_$${L}.ts; \ done +hash: + cd dist && $(FINDHASH) | xargs md5sum >md5.txt + cd dist && $(FINDHASH) | xargs sha1sum >sha1.txt + cd dist && $(FINDHASH) | xargs gpg --detach-sign -a + + Modified: pymoul/trunk/compileui.py =================================================================== --- pymoul/trunk/compileui.py 2007-01-28 17:15:47 UTC (rev 93) +++ pymoul/trunk/compileui.py 2007-01-28 21:14:23 UTC (rev 94) @@ -11,7 +11,7 @@ from PyQt4 import uic -RE_RC_TEXT = "^import\ (?P<module>[a-zA-Z]\w*_rc)\s$" +RE_RC_TEXT = "^import[ \.\\/]*(?P<module>[a-zA-Z]\w*_rc)\s$" RE_RC = re.compile(RE_RC_TEXT) UI_EXT = '.ui' @@ -19,7 +19,7 @@ QRC_EXT = '.qrc' PY_QRC_EXT = '_rc.py' QRC_COMPILER = "pyrcc4 -o %(py)s %(qrc)s" -UI_MODULE = "moul.qt.ui" +QRC_PACKAGE = "moul.qt.ui" def _newer(orig, py): try: @@ -81,7 +81,7 @@ # faster than re match = RE_RC.match(line) if match: - line = match.expand("from %s import \g<module>" % UI_MODULE) + line = match.expand("from %s import \g<module>" % QRC_PACKAGE) lines.append(line) fin.close() fout = open(fname, 'w') Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-01-28 17:15:47 UTC (rev 93) +++ pymoul/trunk/setup.py 2007-01-28 21:14:23 UTC (rev 94) @@ -58,7 +58,10 @@ setup_options = dict( setup_requires = ["setuptools>="+SETUPTOOLS_VERSION,], install_requires = [], - data_files = list(glob('*.txt')), + data_files = [ + ('docs', list(glob('*.txt'))), + ('i18', list(glob('src/moul/qt/i18n/pymoul_*.*'))), + ], package_dir = {'' : 'src'}, packages = find_packages('src', exclude="moul.qt"), include_package_data = True, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-28 23:51:55
|
Revision: 95 http://pymoul.svn.sourceforge.net/pymoul/?rev=95&view=rev Author: tiran Date: 2007-01-28 15:51:53 -0800 (Sun, 28 Jan 2007) Log Message: ----------- Enhanced supported for IS script Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/distutils_upx.py Added Paths: ----------- pymoul/trunk/src/moul/qt/i18n/pymoul_nl.qm pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-28 21:14:23 UTC (rev 94) +++ pymoul/trunk/Makefile.in 2007-01-28 23:51:53 UTC (rev 95) @@ -6,7 +6,7 @@ FINDQT=find src/moul/qt \( -name '*.py' -o -name '*.ui' \) $(NOTSVN) FINDTEXT=find src/moul \( -name '*.py' -o -name '*.txt' -o -name '*.qrc' -o -name '*.ui' -o -name '*.ts' \) $(NOTSVN) FINDHASH= find . -not \( -name '*.txt' -o -name '*.asc' \) -a -not -type d -LANGS=de fr it es +LANGS=de es fr it nl TESTFLAGS=-v TESTOPTS= SETUPFLAGS= Modified: pymoul/trunk/distutils_upx.py =================================================================== --- pymoul/trunk/distutils_upx.py 2007-01-28 21:14:23 UTC (rev 94) +++ pymoul/trunk/distutils_upx.py 2007-01-28 23:51:53 UTC (rev 95) @@ -12,6 +12,7 @@ from distutils import log from stat import ST_SIZE from fnmatch import fnmatch +from ConfigParser import RawConfigParser class UpxCommand: """Upx packer mixin class for distutils @@ -184,38 +185,59 @@ self.dist_dir = dist_dir # TODO: better name mangling self.pathname = os.path.join(dist_dir, name.replace(' ', '_')+'.iss') + self.cfg = ISSConfigParser() if not self.dist_dir[-1] in "\\/": self.dist_dir += "\\" self.name = name self.version = version self.windows_exe_files = [self.chop(p) for p in windows_exe_files] self.lib_files = [self.chop(p) for p in lib_files] + self.setup_kwargs = { + } + self.languages = ["dutch", "french", "german", "italian", "spanish"] def chop(self, pathname): assert pathname.startswith(self.dist_dir) return pathname[len(self.dist_dir):] def create(self): - ofi = self.file = open(self.pathname, "w") - print >> ofi, "; WARNING: This script has been created by py2exe. Changes to this script" - print >> ofi, "; will be overwritten the next time py2exe is run!" - print >> ofi, r"[Setup]" - print >> ofi, r"AppName=%s" % self.name - print >> ofi, r"AppVerName=%s %s" % (self.name, self.version) - print >> ofi, r"DefaultDirName={pf}\%s" % self.name - print >> ofi, r"DefaultGroupName=%s" % self.name - print >> ofi - - print >> ofi, r"[Files]" + fd = self.file = open(self.pathname, "w") + cfg = self.cfg + cfg.add_header("; WARNING: This script has been created by py2exe. Changes to this script") + cfg.add_header("; will be overwritten the next time py2exe is run!\n") + cfg.add_section('Setup') + cfg.add_section('Files') + cfg.add_section('Icons') + cfg.add_section('Languages') + cfg.add_section('Tasks') + cfg.add_section('Run') + + # Setup + cfg.set("Setup", "AppName", self.name) + cfg.set("Setup", "AppVerName", "%s %s" % (self.name, self.version)) + cfg.set("Setup", "DefaultDirName", "{pf}\%s" % self.name) + cfg.set("Setup", "DefaultGroupName", self.name) + for key, value in self.setup_kwargs.items(): + cfg.set("Setup", key, value) + # Languages + cfg.set_raw('Languages', + 'Name: "english"; MessagesFile: "compiler:Default.isl"') + for lang in self.languages: + cfg.set_raw("Languages", + 'Name: "%s"; MessagesFile: "compiler:Languages/%s.isl"' + % (lang, lang.capitalize())) + for path in self.windows_exe_files + self.lib_files: - print >> ofi, r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' % (path, os.path.dirname(path)) - print >> ofi - - print >> ofi, r"[Icons]" + cfg.set_raw("Files", + r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' + % (path, os.path.dirname(path)) + ) for path in self.windows_exe_files: - print >> ofi, r'Name: "{group}\%s"; Filename: "{app}\%s"' % \ - (self.name, path) - print >> ofi, 'Name: "{group}\Uninstall %s"; Filename: "{uninstallexe}"' % self.name + cfg.set_raw("Icons", + 'Name: "{group}\%s"; Filename: "{app}\%s"' % + (self.name, path) + ) + cfg.set_raw("Icons", 'Name: "{group}\Uninstall %s"; Filename: "{uninstallexe}"' % self.name) def compile(self): try: @@ -243,7 +265,68 @@ if res < 32: raise RuntimeError("ShellExecute failed, error %d" % res) +class ISSConfigParser(RawConfigParser): + """Config parser for InnoSetupScripts + Supports *only* writing and no parsing! + """ + def __init__(self, defaults=None): + RawConfigParser__init__(self, defaults) + self._raw = {} + self._header = [] + + def add_header(self, value): + """Add a header comment + """ + self._header.append(value) + + def add_section(self, section): + """Create a new section in the configuration. + """ + RawConfigParser.add_section(self, section) + self._raw[section]= [] + + def set_raw(self, section, raw): + """Add a raw string to a section + + TODO: use NoSectionError + """ + self._raw[section] = raw + + def _read(self, fp, fpname): + """Read and parse a filename or a list of filenames. + """ + raise NotImplementedError + + def optionxform(self, optionstr): + return optionstr + + def write(self, fp): + """Write an .ini-format representation of the configuration state.""" + for header in self._headers: + fp.write("; %s\n" % header.replace('\n', '; \n')) + if self._defaults: + fp.write("[%s]\n" % DEFAULTSECT) + for (key, value) in self._defaults.items(): + fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) + fp.write("\n") + for section in self._sections: + fp.write("[%s]\n" % section) + for (key, value) in self._sections[section].items(): + if key != "__name__": + fp.write("%s = %s\n" % + (key, str(value).replace('\n', '\n\t'))) + for raw in self._raw['section']: + fp.write(str(raw).replace('\n', '\n\t') +'\n') + fp.write("\n") + + def remove_section(self, section): + """Remove a file section.""" + existed = RawConfigParser.remove_section(self, section) + if existed: + del self._raw[section] + return existed + try: from py2exe.build_exe import py2exe except ImportError: Added: pymoul/trunk/src/moul/qt/i18n/pymoul_nl.qm =================================================================== (Binary files differ) Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_nl.qm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts 2007-01-28 23:51:53 UTC (rev 95) @@ -0,0 +1,248 @@ +<!DOCTYPE TS><TS> +<context> + <name>MainWindow</name> + <message> + <source>Tool for Myst Online</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Configure</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Windowed</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Vertical Sync</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Display Shadows</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Screen Resolution</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>800x600 (4:3)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Texture Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Low</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>High</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anti-Aliasing</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Med.</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ultra</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Shadow Quality</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Anisotropic-Filtering</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Graphics</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>NPC Voices</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound FX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ambience Sound</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Music</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Mute all</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Hardware</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sound Priority</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio Modes</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Generic Software</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable EAX</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Voice chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Microphon Level</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Enable Voice Chat</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Audio</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time zones</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cavern time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Cyan time:</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>UTC -0</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Mountain Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>(Pacific Standard Time)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>D'ni time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Time</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Ping</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Servers</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Browse in game documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Age</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Element</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Language</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Set</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Documents</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>pyMoul tools</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>About</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>MOUL is not running</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Not Implemented</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Sorry, this feature is not implemented yet!</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening graphics.ini</source> + <translation type="unfinished"></translation> + </message> + <message> + <source>Error opening audio.ini</source> + <translation type="unfinished"></translation> + </message> +</context> +</TS> Property changes on: pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-29 12:59:57
|
Revision: 96 http://pymoul.svn.sourceforge.net/pymoul/?rev=96&view=rev Author: tiran Date: 2007-01-29 04:59:51 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Better InnoScript integration Modified Paths: -------------- pymoul/trunk/distutils_upx.py Added Paths: ----------- pymoul/trunk/distutils_iss.py Copied: pymoul/trunk/distutils_iss.py (from rev 95, pymoul/trunk/distutils_upx.py) =================================================================== --- pymoul/trunk/distutils_iss.py (rev 0) +++ pymoul/trunk/distutils_iss.py 2007-01-29 12:59:51 UTC (rev 96) @@ -0,0 +1,510 @@ +"""Distutils helper for creating and running InnoSetup Script files +""" +__author__ = "Christian Heimes" +__version__ = "$Id" +__revision__ = "$Revision$" + +import os +import sys +import re +from distutils import log +from fnmatch import fnmatch +from subprocess import call as subcall +from ConfigParser import SafeConfigParser +from ConfigParser import NoSectionError +from ConfigParser import DEFAULTSECT + +class ISSConfigParser(SafeConfigParser): + """Config parser with some extensions for ISS + + new methods: + add_header(string) - Adds comments to the header + set_raw(section, string) - Adds a raw entry to a section + add_sectionif(section) + setif(section, option, value) + + changed behavior: + doesn't write [default] section to file + interpolates "%(...)s" when writing to file + doesn't parse key: value + parses "Key: "value"; ..." to raw + writes sections in the order they are created + + >>> from StringIO import StringIO + >>> defaults = {'appname' : 'Test App'} + >>> cfg = ISSConfigParser(defaults) + >>> cfg.add_header("header") + + >>> cfg.add_section("testsection") + >>> cfg.set("testsection", "key", "value %(appname)s") + >>> cfg.set_raw("testsection", 'Rawline: "%(appname)s";') + + >>> out = StringIO() + >>> cfg.write(out) + >>> out.seek(0) + >>> data = out.read() + >>> print data + ; header + [testsection] + key = value Test App + Rawline: "Test App"; + <BLANKLINE> + + >>> template = StringIO(data) + >>> del cfg, out, data + >>> cfg = ISSConfigParser(defaults) + >>> cfg.readfp(template) + >>> cfg._sections + {'testsection': {'__name__': 'testsection', 'key': 'value Test App'}} + >>> cfg._raw + {'testsection': ['Rawline: "Test App";']} + + >>> out = StringIO() + >>> cfg.write(out) + >>> out.seek(0) + >>> data = out.read() + >>> print data + [testsection] + key = value Test App + Rawline: "Test App"; + <BLANKLINE> + + >>> + """ + def __init__(self, defaults=None): + SafeConfigParser.__init__(self, defaults) + self._raw = {} + self._header = [] + self._order = [] + + def add_header(self, value): + """Add a header comment + """ + self._header.append(value) + + def add_section(self, section): + """Create a new section in the configuration. + """ + SafeConfigParser.add_section(self, section) + self._raw[section]= [] + self._order.append(section) + + def add_sectionif(self, section): + """Create a new section in the configuration if section doesn't exist. + """ + if not self.has_section(section): + self.add_section(section) + return True + + def setif(self, section, option, value): + """Set section-option to value if option is not yet set + """ + if not self.has_option(section, option): + self.set(section, option, value) + return True + + def set_raw(self, section, raw): + """Add a raw string to a section + """ + try: + sec = self._raw[section] + except KeyError: + raise NoSectionError(section) + if isinstance(raw, (tuple, list)): + for r in raw: + sec.append(r) + else: + sec.append(raw) + + def get_raw(self, section, raw=False, vars=None): + """Get all raw lines as string for a given section. + + Interpolates %(var)s vars + """ + d = self._defaults.copy() + try: + d.update(self._sections[section]) + except KeyError: + if section != DEFAULTSECT: + raise NoSectionError(section) + # Update with the entry specific variables + if vars: + for key, value in vars.items(): + d[self.optionxform(key)] = value + try: + rawdata = "\n".join(self._raw[section]) + except KeyError: + return None + + if raw: + return rawdata + else: + return self._interpolate(section, "RAWDATA", rawdata, d) + + def optionxform(self, optionstr): + return optionstr + + def write(self, fp): + """Write an .ini-format representation of the configuration state.""" + for header in self._header: + fp.write("; %s\n" % header.replace('\n', '; \n')) + #if self._defaults: + # fp.write("[%s]\n" % DEFAULTSECT) + # for (key, value) in self._defaults.items(): + # fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) + # fp.write("\n") + for section in self._order: + fp.write("[%s]\n" % section) + for key in self._sections[section]: + if key == "__name__": + continue + value = self.get(section, key, raw=False) + fp.write("%s = %s\n" % + (key, str(value).replace('\n', '\n\t'))) + rawdata = self.get_raw(section, raw=False) + if rawdata: + fp.write(rawdata) + fp.write("\n") + + def remove_section(self, section): + """Remove a file section.""" + existed = RawConfigParser.remove_section(self, section) + if existed: + del self._raw[section] + return existed + + OPTCRE = re.compile( + r'(?P<option>[^=\s][^=]*)' # very permissive! + r'\s*(?P<vi>[=])\s*' # any number of space/tab, + # followed by separator + # (either : or =), followed + # by any # space/tab + r'(?P<value>.*)$' # everything up to eol + ) + + RAWRE = re.compile( + r'^[A-Z][A-Za-z]*:\s?' # 'Name: ' + r'".*";' # '"value ...";' and + ) + + def _read(self, fp, fpname): + """Parse a sectioned setup file. + + From ConfigParser.RawConfigParser + """ + cursect = None # None, or a dictionary + curraw = None + optname = None + lineno = 0 + e = None # None, or an exception + while True: + line = fp.readline() + if not line: + break + lineno = lineno + 1 + # comment or blank line? + if line.strip() == '' or line[0] in '#;': + continue + if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR": + # no leading whitespace + continue + # continuation line? + if line[0].isspace() and cursect is not None and optname: + value = line.strip() + if value: + cursect[optname] = "%s\n%s" % (cursect[optname], value) + # a section header or option header? + else: + # is it a section header? + mo = self.SECTCRE.match(line) + if mo: + sectname = mo.group('header') + if sectname in self._sections: + cursect = self._sections[sectname] + curraw = self._raw[sectname] + elif sectname == DEFAULTSECT: + cursect = self._defaults + else: + cursect = {'__name__': sectname} + curraw = [] # new + self._order.append(sectname) # new + self._sections[sectname] = cursect + self._raw[sectname] = curraw # new + # So sections can't start with a continuation line + optname = None + # no section header in the file? + elif cursect is None: + raise MissingSectionHeaderError(fpname, lineno, line) + # an option line? + else: + mo = self.OPTCRE.match(line) + if mo: + optname, vi, optval = mo.group('option', 'vi', 'value') + if vi in ('=', ':') and ';' in optval: + # ';' is a comment delimiter only if it follows + # a spacing character + pos = optval.find(';') + if pos != -1 and optval[pos-1].isspace(): + optval = optval[:pos] + optval = optval.strip() + # allow empty values + if optval == '""': + optval = '' + optname = self.optionxform(optname.rstrip()) + cursect[optname] = optval + else: + mo = self.RAWRE.match(line) # new + if mo: + # found a InnoSetup raw line + curraw.append(line.strip()) + else: + # a non-fatal parsing error occurred. set up the + # exception but keep going. the exception will be + # raised at the end of the file and will contain a + # list of all bogus lines + if not e: + e = ParsingError(fpname) + e.append(lineno, repr(line)) + # if any parsing errors occurred, raise an exception + if e: + raise e + + +class InnoSetupCommandMixin: + """Mixin class class for a distutils command + + You have call initialize_options() and run() from your class! + + >>> from tempfile import mkstemp + >>> tmphdlr, tmpfile = mkstemp() + + >>> test = InnoSetupCommandMixin() + >>> test.initialize_options() + >>> test.app_name = "Test App" + >>> test.innosetup = True + >>> test.inno_script = tmpfile + >>> test.lib_dir = 'li', + >>> test.dist_dir = 'dist' + >>> test.windows_exe_files = [r'dist\\test.exe'] + >>> test.lib_files = [r'dist\\lib1', r'dist\\lib2'] + + >>> try: + ... test.run() + ... finally: + ... data = open(tmpfile).read() + ... os.unlink(tmpfile) + + #>>> print data + """ + def initialize_options(self): + self.app_name = '' + self.innosetup = False + self.inno_script = None + self.inno_version = "1.0" + self.inno_templates = None + self.inno_interpolation = {} + self.inno_sections = {} + self.inno_languages = [('nl', 'Dutch'), ('de', 'German'), + ('fr', 'French'), ('it', 'Italian'), + ('es', 'Spanish') + ] + + def run(self): + self._createInnoSetup() + + def _createInnoSetup(self): + if not self.innosetup: + return + + self._inno_script = InnoScript( + self.app_name, + self.lib_dir, + self.dist_dir, + self.windows_exe_files, + self.lib_files, + inno_script = self.inno_script, + templates = self.inno_templates, + interpolation = self.inno_interpolation, + sections = self.inno_sections, + languages = self.inno_languages) + + print "*** creating the inno setup script***" + self._inno_script.create() + print "*** compiling the inno setup script***" + try: + self._inno_script.compile() + except RuntimeError, msg: + print "Failed to create installer:\n%s" % msg + # Note: By default the final setup.exe will be in an Output subdirectory. + +class InnoScript: + """Based on py2exe/samples/extending/setup.py + + Requires http://www.jrsoftware.org + + appname - name of the app + lib_dir - internal + dist_dir - internal + windows_exe_files - internal + lib_files - internal + isscript=None - path to IS script output file + templates = None - list of template file names or single file + version = "1.0" - version string + interpolation - dict with additional %()s interpolation items + sections - dict with additional section informations + languages - list with languages tuples e.g. [('de', 'German')] + + sections = {'sectioname' : + {'key' : 'value', + 'RAW' : 'string or list with raw items' + } + } + + """ + def __init__(self, + appname, + lib_dir, + dist_dir, + windows_exe_files, + lib_files, + inno_script=None, + templates = None, + version = "1.0", + interpolation = {}, + sections = {}, + languages = [] + ): + self.lib_dir = lib_dir + self.dist_dir = dist_dir + if not self.dist_dir[-1] in "\\/": + self.dist_dir += "\\" + self.windows_exe_files = [self.chop(p) for p in windows_exe_files] + self.lib_files = [self.chop(p) for p in lib_files] + if inno_script is None: + self.inno_script = os.path.join(dist_dir, appname.replace(' ', '_')+'.iss') + else: + self.inno_script = inno_script + self.fd = open(self.inno_script, "w") + + ip = interpolation.copy() + ip['appname'] = appname + ip['version'] = version + self.interpolation = ip + + self.cfg = ISSConfigParser(ip) + if templates: + read = self.cfg.read(templates) + self.sections = sections + self.languages = languages + + def chop(self, pathname): + assert pathname.startswith(self.dist_dir) + return pathname[len(self.dist_dir):] + + def create(self): + """create Inno Script + """ + self.createInnoScript() + self.modifyInnoScript() + self.writeInnoScript() + + def createInnoScript(self): + """Create Inno Script cfg + """ + cfg = self.cfg + cfg.add_header("WARNING: This script has been created by py2exe. Changes to this script") + cfg.add_header("will be overwritten the next time py2exe is run!\n") + + cfg.add_sectionif("Setup") + # Setup + cfg.setif("Setup", "AppName", "%(appname)s") + cfg.setif("Setup", "AppVerName", "%(appname)s %(version)s") + cfg.setif("Setup", "DefaultDirName", "{pf}\%(appname)s") + cfg.setif("Setup", "DefaultGroupName", "%(appname)s") + + self._writeLanguagesSect() + self._writeWindowsExeFiles() + self._writeLibFiles() + self._writeIcons() + self._writeSections() + + def _writeLanguagesSect(self): + cfg = self.cfg + if not self.languages: + return + cfg.add_sectionif('Languages') + for key, lang in self.languages: + cfg.set_raw("Languages", + 'Name: "%s"; MessagesFile: "compiler:Languages\%s.isl"' % + (key, lang)) + + def _writeWindowsExeFiles(self): + cfg = self.cfg + cfg.add_sectionif("Files") + for path in self.windows_exe_files: + cfg.set_raw("Files", + r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' + % (path, os.path.dirname(path)) ) + + def _writeLibFiles(self): + cfg = self.cfg + cfg.add_sectionif("Files") + for path in self.lib_files: + cfg.set_raw("Files", + r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' + % (path, os.path.dirname(path)) ) + + def _writeIcons(self): + cfg = self.cfg + cfg.add_sectionif("Icons") + for path in self.windows_exe_files: + cfg.set_raw("Icons", + 'Name: "{group}\\%(appname)s"; Filename: "{app}\\' + path + '"') + cfg.set_raw("Icons", r'Name: "{group}\Uninstall %(appname)s"; Filename: "{uninstallexe}"') + + def _writeSections(self): + cfg = self.cfg + # Additional things in self.sections + for section in self.sections: + cfg.add_sectionif(section) + for key, value in self.sections[section].items(): + if key == "RAW": + cfg.set_raw(section, value) + else: + cfg.set(section, key, value) + + def modifyInnoScript(self): + """Hook + """ + pass + + def writeInnoScript(self): + """Write script to disk + """ + self.cfg.write(self.fd) + self.fd.close() + + def compile(self): + import ctypes + res = ctypes.windll.shell32.ShellExecuteA(0, "compile", + self.isscript, + None, + None, + 0) + if res < 32: + raise RuntimeError("ShellExecute failed, error %d" % res) + + def __call__(self): + self.create() + self.compile() + +def test_suite(): + import unittest + from doctest import DocTestSuite + return unittest.TestSuite(( + DocTestSuite(__name__), + )) + +if __name__ == '__main__': + import unittest + unittest.main(defaultTest="test_suite") Modified: pymoul/trunk/distutils_upx.py =================================================================== --- pymoul/trunk/distutils_upx.py 2007-01-28 23:51:53 UTC (rev 95) +++ pymoul/trunk/distutils_upx.py 2007-01-29 12:59:51 UTC (rev 96) @@ -12,9 +12,9 @@ from distutils import log from stat import ST_SIZE from fnmatch import fnmatch -from ConfigParser import RawConfigParser +from distutils_iss import InnoSetupCommandMixin -class UpxCommand: +class UpxCommand(InnoSetupCommandMixin): """Upx packer mixin class for distutils Usage: @@ -36,6 +36,7 @@ def initialize_options(self): result = self._otherclass().initialize_options(self) + InnoSetupCommandMixin.initialize_options(self) self.upx = True self.upx_args = '--no-color' self.upx_path = 'upx' @@ -45,10 +46,6 @@ 'dylib', # Mac OS X ] self.upx_ignore = [] - - self.app_name = '' - self.innosetup = False - return result def finalize_options(self): @@ -65,7 +62,7 @@ def run(self, *args, **kwargs): result = self._otherclass().run(self, *args, **kwargs) self._upxPack() - self._createInnoSetup() + InnoSetupCommandMixin.run(self) return result def _upxPack(self): @@ -94,13 +91,13 @@ matches = [pat for pat in self.upx_ignore if fnmatch(basename, pat)] if matches: continue - + origsize = os.stat(fname)[ST_SIZE] self._upxPackFile(os.path.normpath(fname)) newsize = os.stat(fname)[ST_SIZE] ratio = newsize*100 / origsize packed.append((basename, origsize, newsize, ratio)) - + print "\n*** UPX result ***" for basename, origsize, newsize, ratio in packed: print " %s packed to %i%%" % (basename, ratio) @@ -147,186 +144,10 @@ Find next class in MRO that is not based on UpxCommand class """ for c in getmro(cls): - if not issubclass(c, UpxCommand): + if not issubclass(c, (UpxCommand, InnoSetupCommandMixin)): return c raise ValueError(cls) - def _createInnoSetup(self): - if not self.innosetup: - return - - script = InnoScript(self.app_name, - self.lib_dir, - self.dist_dir, - self.windows_exe_files, - self.lib_files) - print "*** creating the inno setup script***" - script.create() - print "*** compiling the inno setup script***" - try: - script.compile() - except RuntimeError, msg: - print "Failed to create installer:\n%s" % msg - # Note: By default the final setup.exe will be in an Output subdirectory. - -class InnoScript: - """Based on py2exe/samples/extending/setup.py - - Requires http://www.jrsoftware.org - """ - def __init__(self, - name, - lib_dir, - dist_dir, - windows_exe_files = [], - lib_files = [], - version = "1.0"): - self.lib_dir = lib_dir - self.dist_dir = dist_dir - # TODO: better name mangling - self.pathname = os.path.join(dist_dir, name.replace(' ', '_')+'.iss') - self.cfg = ISSConfigParser() - if not self.dist_dir[-1] in "\\/": - self.dist_dir += "\\" - self.name = name - self.version = version - self.windows_exe_files = [self.chop(p) for p in windows_exe_files] - self.lib_files = [self.chop(p) for p in lib_files] - self.setup_kwargs = { - } - self.languages = ["dutch", "french", "german", "italian", "spanish"] - - def chop(self, pathname): - assert pathname.startswith(self.dist_dir) - return pathname[len(self.dist_dir):] - - def create(self): - fd = self.file = open(self.pathname, "w") - cfg = self.cfg - cfg.add_header("; WARNING: This script has been created by py2exe. Changes to this script") - cfg.add_header("; will be overwritten the next time py2exe is run!\n") - cfg.add_section('Setup') - cfg.add_section('Files') - cfg.add_section('Icons') - cfg.add_section('Languages') - cfg.add_section('Tasks') - cfg.add_section('Run') - - # Setup - cfg.set("Setup", "AppName", self.name) - cfg.set("Setup", "AppVerName", "%s %s" % (self.name, self.version)) - cfg.set("Setup", "DefaultDirName", "{pf}\%s" % self.name) - cfg.set("Setup", "DefaultGroupName", self.name) - for key, value in self.setup_kwargs.items(): - cfg.set("Setup", key, value) - # Languages - cfg.set_raw('Languages', - 'Name: "english"; MessagesFile: "compiler:Default.isl"') - for lang in self.languages: - cfg.set_raw("Languages", - 'Name: "%s"; MessagesFile: "compiler:Languages/%s.isl"' - % (lang, lang.capitalize())) - - for path in self.windows_exe_files + self.lib_files: - cfg.set_raw("Files", - r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' - % (path, os.path.dirname(path)) - ) - for path in self.windows_exe_files: - cfg.set_raw("Icons", - 'Name: "{group}\%s"; Filename: "{app}\%s"' % - (self.name, path) - ) - cfg.set_raw("Icons", 'Name: "{group}\Uninstall %s"; Filename: "{uninstallexe}"' % self.name) - - def compile(self): - try: - import ctypes - except ImportError: - try: - import win32api - except ImportError: - import os - os.startfile(self.pathname) - else: - #print "Ok, using win32api." - win32api.ShellExecute(0, "compile", - self.pathname, - None, - None, - 0) - else: - #print "Cool, you have ctypes installed." - res = ctypes.windll.shell32.ShellExecuteA(0, "compile", - self.pathname, - None, - None, - 0) - if res < 32: - raise RuntimeError("ShellExecute failed, error %d" % res) - -class ISSConfigParser(RawConfigParser): - """Config parser for InnoSetupScripts - - Supports *only* writing and no parsing! - """ - def __init__(self, defaults=None): - RawConfigParser__init__(self, defaults) - self._raw = {} - self._header = [] - - def add_header(self, value): - """Add a header comment - """ - self._header.append(value) - - def add_section(self, section): - """Create a new section in the configuration. - """ - RawConfigParser.add_section(self, section) - self._raw[section]= [] - - def set_raw(self, section, raw): - """Add a raw string to a section - - TODO: use NoSectionError - """ - self._raw[section] = raw - - def _read(self, fp, fpname): - """Read and parse a filename or a list of filenames. - """ - raise NotImplementedError - - def optionxform(self, optionstr): - return optionstr - - def write(self, fp): - """Write an .ini-format representation of the configuration state.""" - for header in self._headers: - fp.write("; %s\n" % header.replace('\n', '; \n')) - if self._defaults: - fp.write("[%s]\n" % DEFAULTSECT) - for (key, value) in self._defaults.items(): - fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) - fp.write("\n") - for section in self._sections: - fp.write("[%s]\n" % section) - for (key, value) in self._sections[section].items(): - if key != "__name__": - fp.write("%s = %s\n" % - (key, str(value).replace('\n', '\n\t'))) - for raw in self._raw['section']: - fp.write(str(raw).replace('\n', '\n\t') +'\n') - fp.write("\n") - - def remove_section(self, section): - """Remove a file section.""" - existed = RawConfigParser.remove_section(self, section) - if existed: - del self._raw[section] - return existed - try: from py2exe.build_exe import py2exe except ImportError: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-29 13:16:05
|
Revision: 97 http://pymoul.svn.sourceforge.net/pymoul/?rev=97&view=rev Author: tiran Date: 2007-01-29 05:15:59 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Added iss template Modified Paths: -------------- pymoul/trunk/distutils_iss.py Added Paths: ----------- pymoul/trunk/template.iss Modified: pymoul/trunk/distutils_iss.py =================================================================== --- pymoul/trunk/distutils_iss.py 2007-01-29 12:59:51 UTC (rev 96) +++ pymoul/trunk/distutils_iss.py 2007-01-29 13:15:59 UTC (rev 97) @@ -13,6 +13,7 @@ from ConfigParser import SafeConfigParser from ConfigParser import NoSectionError from ConfigParser import DEFAULTSECT +from string import ascii_letters class ISSConfigParser(SafeConfigParser): """Config parser with some extensions for ISS @@ -389,6 +390,9 @@ ip = interpolation.copy() ip['appname'] = appname ip['version'] = version + ip['appnamestripped'] = "".join([c for c in appname + if c in ascii_letters]) + ip['appexe'] = self.windows_exe_files[0] self.interpolation = ip self.cfg = ISSConfigParser(ip) @@ -425,7 +429,7 @@ self._writeLanguagesSect() self._writeWindowsExeFiles() self._writeLibFiles() - self._writeIcons() + #self._writeIcons() self._writeSections() def _writeLanguagesSect(self): Added: pymoul/trunk/template.iss =================================================================== --- pymoul/trunk/template.iss (rev 0) +++ pymoul/trunk/template.iss 2007-01-29 13:15:59 UTC (rev 97) @@ -0,0 +1,40 @@ +; Script generated by the Inno Setup Script Wizard. +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! + +[Setup] +AppName=%(appname)s +AppVerName=%(appname)s %(version)s +AppPublisher=Christian Heimes +AppPublisherURL=http://www.cheimes.de/ +AppSupportURL=http://pymoul.sourceforge.net/ +AppUpdatesURL=http://sourceforge.net/projects/pymoul/ +DefaultDirName={pf}\%(appname)s +DefaultGroupName=%(appname)s +LicenseFile=GPL.txt +InfoBeforeFile=README.txt +;InfoAfterFile=c:\Programme\Inno Setup 5\license.txt +OutputDir=dist\ +OutputBaseFilename=setup_%(appnamestripped)s_%(version)s +Compression=lzma +SolidCompression=yes + +[Languages] +Name: "english"; MessagesFile: "compiler:Default.isl" +Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" +Name: "french"; MessagesFile: "compiler:Languages\French.isl" +Name: "german"; MessagesFile: "compiler:Languages\German.isl" +Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" +Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked +Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Icons] +Name: "{group}\%(appname)s"; Filename: "{app}\%(appexe)s" +Name: "{group}\{cm:ProgramOnTheWeb,%(appname)s}"; Filename: "http://pymoul.sourceforge.net/" +Name: "{group}\{cm:UninstallProgram,%(appname)s}"; Filename: "{uninstallexe}" +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\%(appname)s"; Filename: "{app}\%(appexe)"; Tasks: quicklaunchicon + +[Run] +Filename: "{app}%(appexe)s"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent Property changes on: pymoul/trunk/template.iss ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-29 18:46:36
|
Revision: 98 http://pymoul.svn.sourceforge.net/pymoul/?rev=98&view=rev Author: tiran Date: 2007-01-29 10:46:30 -0800 (Mon, 29 Jan 2007) Log Message: ----------- Some work on chatlogs and plasma logs Modified Paths: -------------- pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/file/chatlog.py pymoul/trunk/src/moul/file/plasmalog.py Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-29 13:15:59 UTC (rev 97) +++ pymoul/trunk/setup_win32.py 2007-01-29 18:46:30 UTC (rev 98) @@ -78,8 +78,8 @@ pexe['upx_args'] = '--mono --best' # InnoSetup pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: + pexe['inno_templates'] = "template.iss" pexe['app_name'] = 'pyMoul' - # not required at the moment pexe['includes'].extend(findPyTz()) kw['zipfile'] = 'library.zip' Modified: pymoul/trunk/src/moul/file/chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/chatlog.py 2007-01-29 13:15:59 UTC (rev 97) +++ pymoul/trunk/src/moul/file/chatlog.py 2007-01-29 18:46:30 UTC (rev 98) @@ -16,6 +16,17 @@ # Temple Place, Suite 330, Boston, MA 02111-1307 USA # """Chat log parser + +Chatlog format +============== + +(MM/DD hh:mm:ss) Chat.log started... +(MM/DD hh:mm:ss) ...Chat.log stopped. +(MM/DD hh:mm:ss) From USER in LOCATION: msg +(MM/DD hh:mm:ss) Error: ERRORMSG +(MM/DD hh:mm:ss) USER: TEXT (note the two spaces!) +(MM/DD hh:mm:ss) To USER: TEXT +(MM/DD hh:mm:ss) USER action """ __author__ = "Christian Heimes" __version__ = "$Id$" @@ -23,22 +34,127 @@ import os import re -from glob import glob +from fnmatch import fnmatch +from stat import ST_MTIME +from shutil import move +from time import localtime -CHAT_RE_TXT = r"^\((?P<M>\d{1,2})/(?P<D>\d{1,2})\ " \ - r"(?P<h>\d{1,2}):(?P<m>\d\d{1,2}):(?P<s>\d{1,2})\)" \ - r"(?P<space>\ {1,2})(?P<text>.*)$" -CHAT_RE = re.compile(CHAT_RE_TXT) +from moul.log import getLogger +CHAT_RE = re.compile( + r"^\((?P<M>\d{1,2})/(?P<D>\d{1,2})\ " # MM/DD + r"(?P<h>\d{1,2}):(?P<m>\d\d{1,2}):(?P<s>\d{1,2})\)" # hh:mm:ss + r"(?P<space>\ {1,2})(?P<msg>.*)$") # text +CHAT_STARTED = "Chat.log started..." +CHAT_STOPPED = "...Chat.log stopped." +TEXT_MSGFROM = re.compile( + r"From (?P<user>.*) in (?P<location>.*): (?P<msg>.*)" + # From USER in LOCATION: msg + ) +TEXT_MSGTO = re.compile( + r"To (?P<user>.*): (?P<msg>.*)" + # From USER in LOCATION: msg + ) +TEXT_ERROR = re.compile( + r"Error: (?P<msg>.*)" + # Error: message + ) +TEXT = re.compile( + r"(?P<user>.*): (?P<msg>.*)" + # User: message + ) + + +LOG = getLogger('moul.chat') + +def modtime(pathname): + """Modification time + """ + return os.stat(pathname)[ST_MTIME] + class ChatlogMover(object): """ """ + _pat = "chat*.log" + _filename = "chatlog_%(sY)i%(sM)i%(sD)i_%(ch)i%(cm)i_%(sh)i%(sm)i.txt" - def __init__(self, path, dest): - self._path = path - self._dest = dest + def __init__(self, srcdir, destdir): + self._path = srcdir + self._dest = destdir self._logs = [] + if not os.path.isdir(srcdir): + LOG.critical("%s is not a directory" % srcdir) + if not os.path.isdir(destdir): + LOG.info("Creating chatlog directory %s" % destdir) + os.mkdir(dest) def findLogs(self): - self._logs.append(os.path.join(self._path, 'chat*.log')) + """Find log files in self._path + Also calls and stores _findCreated(), modtime() and _makeFile() + for the file. + """ + for file in os.listdir(self._path): + if not fnmatch(file, self._pat): + continue + + fpath = os.path.join(self._path, file) + if not os.path.isfile(fpath): + continue + LOG.debug("Found chatlog %s" % fpath) + fd = open(fpath, 'r') + created = self._findCreated(fd) + if not created: + LOG.warning("Failed to parse chatlog %s" % fpath) + modtime = localtime(modtime(fpath)) + newname = self._makeFilename(created, modtime) + + details = { + 'fpath' : fpath, + 'filename' : file, + 'modtime' : localtime(modtime(fpath)), + 'created' : created, + 'newname' : newname, + 'newpath' : os.path.join(self._dest, newname), + } + + self._logs.append(details) + + def _findCreated(self, fd): + """Parse chatlog to find "started" date + """ + created = None + while True: + line = fd.readline() + if not line: + break + mo = CHAT_RE.match(line) + if mo: + data = mo.groupdict() + if data['msg'].startswith(CHATLOG_STARTED): + created = (None, mo['M'], mo['D'], mo['h'], mo['m'], + mo['s'], None, None, None) + return created + + def _makeFilename(self, created, stopped): + """Build a filename from created and stopped information + """ + c, s = created, stopped + mapping = { + 'sY' : s['Y'], 'sM' : s['YM'], 'sD' : s['D'], + 'sh' : s['h'], 'sm' : s['m'], 'ss' : s['s'], + 'cM' : c['YM'], 'cD' : c['D'], + 'ch' : c['h'], 'cm' : c['m'], 'cs' : c['s'], + } + return self._filename % mapping + + def moveChatlogs(self): + """Move chatlogs from old to new location and name + """ + for details in self._logs: + old = details['fpath'] + new = details['newpath'] + if os.path.isfile(new): + LOG.warning("%s exists - overwriting" % new) + LOG.info("Move chatlog %s to %s" % (old, new)) + move(old, new) Modified: pymoul/trunk/src/moul/file/plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/plasmalog.py 2007-01-29 13:15:59 UTC (rev 97) +++ pymoul/trunk/src/moul/file/plasmalog.py 2007-01-29 18:46:30 UTC (rev 98) @@ -25,76 +25,82 @@ from stat import ST_MTIME import time import zipfile -import re +from fnmatch import fnmatch from moul.crypt.elf import decryptElf PLASMA_LOG = "plasmalog.txt" _marker = object() -RE_SAFEEXT_TEXT = "\.(elf|txt|log|zip|jpg|jpeg)$" -RE_SAFEXT = re.compile(RE_SAFEEXT_TEXT, re.IGNORECASE) -def getTimeStamp(path): - """Get time stamp yyyymmdd_hhmm based in the modification time +class PlasmalogZipper(object): + """Zip plasma logs """ - sec = os.stat(path)[ST_MTIME] - return time.strftime("%Y%m%d_%H%M", time.gmtime(sec)) + _save_patterns = ['*.elf', '*.txt', '*.log', '*.zip', '*.jpg'] + + def __init__(self, srcdir, destdir): + self._srcdir = srcdir + self._destdir = destdir -def isLogDir(path): - """Check if a path is a valid plasma log directory - - Just checks for the plasmalog.txt file - - Returns either False or a time stamp - """ - pl = os.path.join(path, PLASMA_LOG) - if not os.path.isfile(pl): - return False - return getTimeStamp(pl) - -def zipLogDir(logdir, destdir, remove): - """Zip all log files - - This function also zips subdirectories. - """ - stored_dirs = [] - - for root, dirs, files in os.walk(logdir): - stamp = isLogDir(root) - if not stamp: - continue - name = os.path.basename(root) - zipname = "%s_%s.zip" % (name, stamp) - zipfd = zipfile.ZipFile(os.path.join(destdir, zipname), - 'w', zipfile.ZIP_DEFLATED) - for file in files: - if file.lower().startswith('chat.'): - # omit chatlogs from the logs + def getTimeStamp(self, path): + """Get time stamp yyyymmdd_hhmm based in the modification time + """ + sec = os.stat(path)[ST_MTIME] + return time.strftime("%Y%m%d_%H%M", time.localtime(sec)) + + def isLogDir(self, path): + """Check if a path is a valid plasma log directory + + Just checks for the plasmalog.txt file + + Returns either False or a time stamp + """ + pl = os.path.join(path, PLASMA_LOG) + if not os.path.isfile(pl): + return False + return getTimeStamp(pl) + + def zipLogDir(self): + """Zip all log files + + This function also zips subdirectories. + """ + stored_dirs = [] + + for root, dirs, files in os.walk(self._srcdir): + stamp = isLogDir(root) + if not stamp: continue - fname = os.path.join(root, file) - arcname = os.path.join(name, file) - zipfd.write(fname, arcname) - #zipfd.printdir() - zipfd.close() - stored_dirs.append((root, zipname)) + name = os.path.basename(root) + zipname = "%s_%s.zip" % (name, stamp) + zipfd = zipfile.ZipFile(os.path.join(self._destdir, zipname), + 'w', zipfile.ZIP_DEFLATED) + for file in files: + if file.lower().startswith('chat.'): + # omit chatlogs from the logs + continue + fname = os.path.join(root, file) + arcname = os.path.join(name, file) + zipfd.write(fname, arcname) + #zipfd.printdir() + zipfd.close() + stored_dirs.append((root, zipname)) - if remove: - removeLogs(logdir) + return stored_dirs - return stored_dirs + def removeLogs(self, logdir): + """Removes log directories + + The removeLogs function removes only files considered as safe + """ + for root, dirs, files in os.walk(logdir, topdown=False): + for name in files: + matches = [pat for pat in self._save_patterns + if fnmatch(basename, pat)] + if match: + os.remove(os.path.join(root, name)) + else: + LOG.warning("Won't remove %s from %s" % (name, root)) + for name in dirs: + os.rmdir(os.path.join(root, name)) -def removeLogs(logdir): - """Removes log directories - - The removeLogs function removes only files considered as safe - """ - for root, dirs, files in os.walk(logdir, topdown=False): - for name in files: - if RE_SAFEXT.search(name): - os.remove(os.path.join(root, name)) - else: - print name # XXX - for name in dirs: - os.rmdir(os.path.join(root, name)) - - os.rmdir(logdir) + os.rmdir(logdir) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-29 22:07:45
|
Revision: 99 http://pymoul.svn.sourceforge.net/pymoul/?rev=99&view=rev Author: tiran Date: 2007-01-29 14:07:42 -0800 (Mon, 29 Jan 2007) Log Message: ----------- First working implementation of log zipper and chatlog mover with unit tests Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/file/chatlog.py pymoul/trunk/src/moul/file/plasmalog.py pymoul/trunk/src/moul/file/tests/test_plasmalog.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-29 18:46:30 UTC (rev 98) +++ pymoul/trunk/Makefile.in 2007-01-29 22:07:42 UTC (rev 99) @@ -59,11 +59,12 @@ doc: doc_html clean: - find . \( -name '*.o' -o -name '*.c' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \; + find . \( -name '*.o' -o -name '*~' -o -name '*.so' -o -name '*.py[cod]' -o -name '*.dll' \) -exec rm -f {} \; rm -rf build realclean: clean rm -f TAGS + rm -rf dist $(PYTHON) setup.py clean -a propset: Modified: pymoul/trunk/src/moul/file/chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/chatlog.py 2007-01-29 18:46:30 UTC (rev 98) +++ pymoul/trunk/src/moul/file/chatlog.py 2007-01-29 22:07:42 UTC (rev 99) @@ -45,8 +45,8 @@ r"^\((?P<M>\d{1,2})/(?P<D>\d{1,2})\ " # MM/DD r"(?P<h>\d{1,2}):(?P<m>\d\d{1,2}):(?P<s>\d{1,2})\)" # hh:mm:ss r"(?P<space>\ {1,2})(?P<msg>.*)$") # text -CHAT_STARTED = "Chat.log started..." -CHAT_STOPPED = "...Chat.log stopped." +CHATLOG_STARTED = "Chat.log started..." +CHATLOG_STOPPED = "...Chat.log stopped." TEXT_MSGFROM = re.compile( r"From (?P<user>.*) in (?P<location>.*): (?P<msg>.*)" # From USER in LOCATION: msg @@ -76,17 +76,17 @@ """ """ _pat = "chat*.log" - _filename = "chatlog_%(sY)i%(sM)i%(sD)i_%(ch)i%(cm)i_%(sh)i%(sm)i.txt" + _filename = "chatlog_%(sY)02i%(sM)02i%(sD)02i_%(ch)02i%(cm)02i_%(sh)02i%(sm)02i.txt" def __init__(self, srcdir, destdir): - self._path = srcdir - self._dest = destdir - self._logs = [] - if not os.path.isdir(srcdir): - LOG.critical("%s is not a directory" % srcdir) - if not os.path.isdir(destdir): - LOG.info("Creating chatlog directory %s" % destdir) - os.mkdir(dest) + self._path = srcdir + self._dest = destdir + self._logs = [] + if not os.path.isdir(srcdir): + LOG.critical("%s is not a directory" % srcdir) + if not os.path.isdir(destdir): + LOG.info("Creating chatlog directory %s" % destdir) + os.mkdir(destdir) def findLogs(self): """Find log files in self._path @@ -95,7 +95,7 @@ for the file. """ for file in os.listdir(self._path): - if not fnmatch(file, self._pat): + if not fnmatch(file.lower(), self._pat): continue fpath = os.path.join(self._path, file) @@ -106,13 +106,13 @@ created = self._findCreated(fd) if not created: LOG.warning("Failed to parse chatlog %s" % fpath) - modtime = localtime(modtime(fpath)) - newname = self._makeFilename(created, modtime) + mtime = localtime(modtime(fpath)) + newname = self._makeFilename(created, mtime) details = { 'fpath' : fpath, 'filename' : file, - 'modtime' : localtime(modtime(fpath)), + 'modtime' : mtime, 'created' : created, 'newname' : newname, 'newpath' : os.path.join(self._dest, newname), @@ -132,8 +132,9 @@ if mo: data = mo.groupdict() if data['msg'].startswith(CHATLOG_STARTED): - created = (None, mo['M'], mo['D'], mo['h'], mo['m'], - mo['s'], None, None, None) + d = mo.groupdict() + created = (None, int(d['M']), int(d['D']), int(d['h']), + int(d['m']), int(d['s']), None, None, None) return created def _makeFilename(self, created, stopped): @@ -141,10 +142,10 @@ """ c, s = created, stopped mapping = { - 'sY' : s['Y'], 'sM' : s['YM'], 'sD' : s['D'], - 'sh' : s['h'], 'sm' : s['m'], 'ss' : s['s'], - 'cM' : c['YM'], 'cD' : c['D'], - 'ch' : c['h'], 'cm' : c['m'], 'cs' : c['s'], + 'sY' : s[0], 'sM' : s[1], 'sD' : s[2], + 'sh' : s[3], 'sm' : s[4], 'ss' : s[5], + 'cM' : c[1], 'cD' : c[2], + 'ch' : c[3], 'cm' : c[4], 'cs' : c[5], } return self._filename % mapping @@ -158,3 +159,7 @@ LOG.warning("%s exists - overwriting" % new) LOG.info("Move chatlog %s to %s" % (old, new)) move(old, new) + + def __call__(self): + self.findLogs() + self.moveChatlogs() Modified: pymoul/trunk/src/moul/file/plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/plasmalog.py 2007-01-29 18:46:30 UTC (rev 98) +++ pymoul/trunk/src/moul/file/plasmalog.py 2007-01-29 22:07:42 UTC (rev 99) @@ -28,8 +28,11 @@ from fnmatch import fnmatch from moul.crypt.elf import decryptElf +from moul.log import getLogger PLASMA_LOG = "plasmalog.txt" + +LOG = getLogger('moul.plasma') _marker = object() class PlasmalogZipper(object): @@ -40,38 +43,52 @@ def __init__(self, srcdir, destdir): self._srcdir = srcdir self._destdir = destdir + self._zipped_dirs = {} # dirname -> zipfile + self._not_removed = [] # files with full path - def getTimeStamp(self, path): + if not os.path.isdir(srcdir): + LOG.critical("%s is not a directory" % srcdir) + if not self.isPlasmaLogDir(): + self._ispldir = False + LOG.critical("%s is not a plasma log directory" % srcdir) + else: + self._ispldir = True + if not os.path.isdir(destdir): + LOG.info("Creating chatlog directory %s" % destdir) + os.mkdir(destdir) + + @staticmethod + def getTimeStamp(path): """Get time stamp yyyymmdd_hhmm based in the modification time """ sec = os.stat(path)[ST_MTIME] return time.strftime("%Y%m%d_%H%M", time.localtime(sec)) - - def isLogDir(self, path): + + def isPlasmaLogDir(self, path=None): """Check if a path is a valid plasma log directory - + Just checks for the plasmalog.txt file - Returns either False or a time stamp """ + if path is None: + path = self._srcdir pl = os.path.join(path, PLASMA_LOG) if not os.path.isfile(pl): return False - return getTimeStamp(pl) + return self.getTimeStamp(pl) def zipLogDir(self): """Zip all log files This function also zips subdirectories. """ - stored_dirs = [] - for root, dirs, files in os.walk(self._srcdir): - stamp = isLogDir(root) + stamp = self.isPlasmaLogDir(root) if not stamp: continue name = os.path.basename(root) zipname = "%s_%s.zip" % (name, stamp) + self._zipped_dirs[name] = zipname zipfd = zipfile.ZipFile(os.path.join(self._destdir, zipname), 'w', zipfile.ZIP_DEFLATED) for file in files: @@ -83,24 +100,27 @@ zipfd.write(fname, arcname) #zipfd.printdir() zipfd.close() - stored_dirs.append((root, zipname)) - return stored_dirs + def removeLogs(self): + """Removes log directories - def removeLogs(self, logdir): - """Removes log directories - The removeLogs function removes only files considered as safe """ - for root, dirs, files in os.walk(logdir, topdown=False): + for root, dirs, files in os.walk(self._srcdir, topdown=False): for name in files: matches = [pat for pat in self._save_patterns - if fnmatch(basename, pat)] - if match: - os.remove(os.path.join(root, name)) + if fnmatch(name, pat)] + fpath = os.path.join(root, name) + if matches: + os.remove(fpath) else: + self._not_removed.append(fpath) LOG.warning("Won't remove %s from %s" % (name, root)) for name in dirs: os.rmdir(os.path.join(root, name)) - os.rmdir(logdir) + os.rmdir(self._srcdir) + + def __call__(self): + self.zipLogDir() + self.removeLogs() Modified: pymoul/trunk/src/moul/file/tests/test_plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_plasmalog.py 2007-01-29 18:46:30 UTC (rev 98) +++ pymoul/trunk/src/moul/file/tests/test_plasmalog.py 2007-01-29 22:07:42 UTC (rev 99) @@ -24,10 +24,102 @@ import unittest from doctest import DocTestSuite -import moul.file.plasmalog +import os +import shutil +from tempfile import mkdtemp +from moul.file.plasmalog import PlasmalogZipper +from moul.file.chatlog import ChatlogMover + +FILE_LIST = ['audio.0.elf', 'audiocaps.0.elf', 'audioTimes.0.elf', + 'Avatar.0.elf', 'impacts.0.elf', 'LocalizationDataMgr.0.elf', + 'Marker.0.elf', 'NetScreener.0.elf', 'patcher.0.elf', 'pipeline.0.elf', + 'plasmalog.txt', 'Python.0.elf', 'Simulation.0.elf', 'voice.0.elf', + 'Chat.0.log'] + +CHATLOG = """(01/02 03:04:05) Chat.log started... +(01/02 03:04:06) Testuser: foo +(01/02 03:04:07) ...Chat.log stopped. +""" + +base = os.path.dirname(__file__) + +def _fakeLogdir(path): + """Create a fake logdir + """ + if not os.path.isdir(path): + os.mkdir(path) + for fname in FILE_LIST: + fd = open(os.path.join(path, fname), 'w') + fd.write('dummy') + fd.close() + + fd = open(os.path.join(path, 'Chat.0.log'), 'w') + fd.write(CHATLOG) + fd.close() + fd = open(os.path.join(path, 'plasmalog.txt'), 'w') + fd.write('') + fd.close() + +def _fakeUruLiveDir(path): + """Create a fake Uru Live directory + """ + for dname in ('Avatars', 'init', 'KIimages'): + os.mkdir(os.path.join(path, dname)) + _fakeLogdir(os.path.join(path, 'Logs')) + _fakeLogdir(os.path.join(path, 'Logs', 'faketest')) + shutil.copyfile(os.path.join(base, 'avatar.jpg'), + os.path.join(path, 'Avatars', '001.jpg')) + shutil.copyfile(os.path.join(base, 'graphics.ini'), + os.path.join(path, 'init', 'graphics.ini')) + shutil.copyfile(os.path.join(base, 'audio.ini'), + os.path.join(path, 'init', 'audio.ini')) + +class PlasmaChatTest(unittest.TestCase): + def setUp(self): + self._tmpdir = mkdtemp() + self._chatdest = os.path.join(self._tmpdir, 'Chatlogs') + self._logdest = os.path.join(self._tmpdir, 'ZippedLogs') + self._logdir = os.path.join(self._tmpdir, 'Logs') + _fakeUruLiveDir(self._tmpdir) + self._clm = ChatlogMover(self._logdir, self._chatdest) + self._plz = PlasmalogZipper(self._logdir, self._logdest) + + def test_createDir(self): + self.failUnless(os.path.isdir(self._logdest), self._logdest) + self.failUnless(os.path.isdir(self._chatdest), self._chatdest) + + def test_plasmaLogZipper(self): + plz = self._plz + self.failUnless(plz.isPlasmaLogDir()) + plz.zipLogDir() + content = os.listdir(self._logdest) + content.sort() + self.failUnlessEqual(len(content), 2, content) + self.failUnless(content[0].startswith("Logs_"), content[0]) + self.failUnless(content[1].startswith("faketest_"), content[1]) + + plz.removeLogs() + self.failIf(os.path.isdir(self._logdir)) + + def test_chatLogMover(self): + clm = self._clm + clm.findLogs() + clm.moveChatlogs() + content = os.listdir(self._chatdest) + self.failUnlessEqual(len(content), 1, content) + length = len("chatlog_20070129_0304_2302.txt") + c = content[0] + self.failUnless(c.startswith("chatlog_")) + self.failUnless(c.endswith(".txt")) + self.failUnlessEqual(len(c), length, c) + + def tearDown(self): + shutil.rmtree(self._tmpdir) + def test_suite(): return unittest.TestSuite(( + unittest.makeSuite(PlasmaChatTest), DocTestSuite('moul.file.plasmalog') )) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-30 20:23:32
|
Revision: 103 http://pymoul.svn.sourceforge.net/pymoul/?rev=103&view=rev Author: tiran Date: 2007-01-30 12:23:14 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Added README and GPL.txt to metadata.py for Qt4 UI Added license tab to ui Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/setup.py pymoul/trunk/src/moul/metadata.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/ui/mainwindow.py pymoul/trunk/src/moul/qt/ui/mainwindow.ui Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-30 16:43:51 UTC (rev 102) +++ pymoul/trunk/Makefile.in 2007-01-30 20:23:14 UTC (rev 103) @@ -17,7 +17,7 @@ inplace: PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build_ext -i -build: compileui +build: ui PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) build py2exe: @@ -29,13 +29,13 @@ bdist_egg: PYTHONPATH="src" $(PYTHON) setup.py $(SETUPFLAGS) bdist_egg -run: compileui +run: ui PYTHONPATH="src" $(PYTHON) src/moul/qt/moulqt.py -exerun: compileui py2exe +exerun: ui py2exe dist/moulqt.exe -compileui: +ui: $(PYTHON) compileui.py test_build: build compileui @@ -74,7 +74,7 @@ fixlineendings: $(FINDPY) | xargs recode -f ibmpc..latin1 -updatelangs: +languages: for L in $(LANGS); do \ pylupdate4 `$(FINDQT)` -ts src/moul/qt/i18n/pymoul_$${L}.ts;\ lrelease src/moul/qt/i18n/pymoul_$${L}.ts; \ @@ -84,5 +84,4 @@ cd dist && $(FINDHASH) | xargs md5sum >md5.txt cd dist && $(FINDHASH) | xargs sha1sum >sha1.txt cd dist && $(FINDHASH) | xargs gpg --detach-sign -a - Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-01-30 16:43:51 UTC (rev 102) +++ pymoul/trunk/setup.py 2007-01-30 20:23:14 UTC (rev 103) @@ -82,6 +82,8 @@ if not isinstance(value, basestring): continue fd.write("%s = '''%s'''\n" % (name, value)) + fd.write("\nREADME = '''%s'''\n" % open('README.txt', 'r').read()) + fd.write("\nLICENSE = '''%s'''\n" % open('GPL.txt', 'r').read()) fd.close() ### Modified: pymoul/trunk/src/moul/metadata.py =================================================================== --- pymoul/trunk/src/moul/metadata.py 2007-01-30 16:43:51 UTC (rev 102) +++ pymoul/trunk/src/moul/metadata.py 2007-01-30 20:23:14 UTC (rev 103) @@ -14,3 +14,346 @@ TODO: Long description of pyMoul ''' name = '''pyMoul''' + +README = '''''' + +LICENSE = ''' GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc. + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. +''' Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-01-30 16:43:51 UTC (rev 102) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-01-30 20:23:14 UTC (rev 103) @@ -44,6 +44,7 @@ from moul.server.ping import ServerList from moul.server.ping import isSocketError from moul.time.cavern import CavernTime +from moul import metadata LOG = getLogger('moul.qt') @@ -81,8 +82,9 @@ self._audio_init() self._ping_init() self._systray_init() + self._about_init() + self._documents_init() self.tab_sub_journals.setEnabled(False) - self._documents_init() # run checker self._moulrunning = None @@ -168,7 +170,11 @@ # ************************************************************************ # graphics settings - + def _about_init(self): + self.te_license.setPlainText(metadata.LICENSE) + + # ************************************************************************ + # graphics settings def _graphics_init(self): """ init graphics tab Modified: pymoul/trunk/src/moul/qt/ui/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-01-30 16:43:51 UTC (rev 102) +++ pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-01-30 20:23:14 UTC (rev 103) @@ -2,7 +2,7 @@ # Form implementation generated from reading ui file 'src/moul/qt/ui/mainwindow.ui' # -# Created: Tue Jan 30 17:23:46 2007 +# Created: Tue Jan 30 21:05:11 2007 # by: PyQt4 UI code generator 4.1.1 # # WARNING! All changes made in this file will be lost! @@ -13,33 +13,151 @@ class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") - MainWindow.resize(QtCore.QSize(QtCore.QRect(0,0,492,595).size()).expandedTo(MainWindow.minimumSizeHint())) - MainWindow.setMinimumSize(QtCore.QSize(492,595)) - MainWindow.setMaximumSize(QtCore.QSize(492,595)) + MainWindow.setMinimumSize(QtCore.QSize(472,595)) + MainWindow.setMaximumSize(QtCore.QSize(472,595)) MainWindow.setWindowIcon(QtGui.QIcon(":/resources/uru_icon_32x32.png")) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") + self.horizontalLayout_3 = QtGui.QWidget(self.centralwidget) + self.horizontalLayout_3.setGeometry(QtCore.QRect(70,70,301,31)) + self.horizontalLayout_3.setObjectName("horizontalLayout_3") + + self.hboxlayout = QtGui.QHBoxLayout(self.horizontalLayout_3) + self.hboxlayout.setMargin(0) + self.hboxlayout.setSpacing(6) + self.hboxlayout.setObjectName("hboxlayout") + + self.comboBox = QtGui.QComboBox(self.horizontalLayout_3) + self.comboBox.setEnabled(False) + + font = QtGui.QFont(self.comboBox.font()) + font.setPointSize(6) + self.comboBox.setFont(font) + self.comboBox.setObjectName("comboBox") + self.hboxlayout.addWidget(self.comboBox) + + self.main_buttonbox = QtGui.QDialogButtonBox(self.centralwidget) + self.main_buttonbox.setGeometry(QtCore.QRect(10,540,451,32)) + self.main_buttonbox.setOrientation(QtCore.Qt.Horizontal) + self.main_buttonbox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.NoButton|QtGui.QDialogButtonBox.Reset|QtGui.QDialogButtonBox.Save) + self.main_buttonbox.setObjectName("main_buttonbox") + + self.horizontalLayout = QtGui.QWidget(self.centralwidget) + self.horizontalLayout.setGeometry(QtCore.QRect(0,2,471,71)) + self.horizontalLayout.setObjectName("horizontalLayout") + + self.hboxlayout1 = QtGui.QHBoxLayout(self.horizontalLayout) + self.hboxlayout1.setMargin(0) + self.hboxlayout1.setSpacing(6) + self.hboxlayout1.setObjectName("hboxlayout1") + + spacerItem = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) + self.hboxlayout1.addItem(spacerItem) + + self.lb_top_image = QtGui.QLabel(self.horizontalLayout) + self.lb_top_image.setMinimumSize(QtCore.QSize(434,61)) + self.lb_top_image.setMaximumSize(QtCore.QSize(434,61)) + self.lb_top_image.setFrameShape(QtGui.QFrame.StyledPanel) + self.lb_top_image.setFrameShadow(QtGui.QFrame.Sunken) + self.lb_top_image.setObjectName("lb_top_image") + self.hboxlayout1.addWidget(self.lb_top_image) + + spacerItem1 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) + self.hboxlayout1.addItem(spacerItem1) + self.tabwidget = QtGui.QTabWidget(self.centralwidget) - self.tabwidget.setGeometry(QtCore.QRect(0,100,491,434)) + self.tabwidget.setGeometry(QtCore.QRect(0,100,471,434)) self.tabwidget.setTabPosition(QtGui.QTabWidget.North) self.tabwidget.setObjectName("tabwidget") self.tab_tasks = QtGui.QWidget() self.tab_tasks.setObjectName("tab_tasks") - self.groupBox_3 = QtGui.QGroupBox(self.tab_tasks) - self.groupBox_3.setGeometry(QtCore.QRect(10,240,471,161)) - self.groupBox_3.setObjectName("groupBox_3") + self.groupBox = QtGui.QGroupBox(self.tab_tasks) + self.groupBox.setGeometry(QtCore.QRect(10,0,451,121)) + self.groupBox.setObjectName("groupBox") + self.buttonBox = QtGui.QDialogButtonBox(self.groupBox) + self.buttonBox.setGeometry(QtCore.QRect(160,30,110,28)) + self.buttonBox.setOrientation(QtCore.Qt.Horizontal) + self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.NoButton) + self.buttonBox.setObjectName("buttonBox") + + self.widget = QtGui.QWidget(self.groupBox) + self.widget.setGeometry(QtCore.QRect(11,21,431,86)) + self.widget.setObjectName("widget") + + self.gridlayout = QtGui.QGridLayout(self.widget) + self.gridlayout.setMargin(0) + self.gridlayout.setSpacing(6) + self.gridlayout.setObjectName("gridlayout") + + self.lb_log_archive = QtGui.QLabel(self.widget) + self.lb_log_archive.setTextFormat(QtCore.Qt.PlainText) + self.lb_log_archive.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) + self.lb_log_archive.setWordWrap(True) + self.lb_log_archive.setTextInteractionFlags(QtCore.Qt.NoTextInteraction) + self.lb_log_archive.setObjectName("lb_log_archive") + self.gridlayout.addWidget(self.lb_log_archive,0,1,1,1) + + self.lb_log_remove = QtGui.QLabel(self.widget) + self.lb_log_remove.setObjectName("lb_log_remove") + self.gridlayout.addWidget(self.lb_log_remove,1,1,1,1) + + self.pb_log_remove = QtGui.QPushButton(self.widget) + self.pb_log_remove.setMinimumSize(QtCore.QSize(60,0)) + self.pb_log_remove.setObjectName("pb_log_remove") + self.gridlayout.addWidget(self.pb_log_remove,1,0,1,1) + + self.pb_log_archive = QtGui.QPushButton(self.widget) + self.pb_log_archive.setMinimumSize(QtCore.QSize(60,0)) + self.pb_log_archive.setObjectName("pb_log_archive") + self.gridlayout.addWidget(self.pb_log_archive,0,0,1,1) + + spacerItem2 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) + self.gridlayout.addItem(spacerItem2,0,2,1,1) + + self.vboxlayout = QtGui.QVBoxLayout() + self.vboxlayout.setMargin(0) + self.vboxlayout.setSpacing(6) + self.vboxlayout.setObjectName("vboxlayout") + + self.radio_ziplogs = QtGui.QRadioButton(self.widget) + self.radio_ziplogs.setChecked(True) + self.radio_ziplogs.setObjectName("radio_ziplogs") + self.vboxlayout.addWidget(self.radio_ziplogs) + + self.radio_deletelogs = QtGui.QRadioButton(self.widget) + self.radio_deletelogs.setObjectName("radio_deletelogs") + self.vboxlayout.addWidget(self.radio_deletelogs) + self.gridlayout.addLayout(self.vboxlayout,0,3,1,1) + self.groupBox_2 = QtGui.QGroupBox(self.tab_tasks) - self.groupBox_2.setGeometry(QtCore.QRect(10,110,471,131)) + self.groupBox_2.setGeometry(QtCore.QRect(10,120,451,61)) self.groupBox_2.setObjectName("groupBox_2") - self.groupBox = QtGui.QGroupBox(self.tab_tasks) - self.groupBox.setGeometry(QtCore.QRect(10,0,471,111)) - self.groupBox.setObjectName("groupBox") + self.widget1 = QtGui.QWidget(self.groupBox_2) + self.widget1.setGeometry(QtCore.QRect(10,20,431,30)) + self.widget1.setObjectName("widget1") + + self.hboxlayout2 = QtGui.QHBoxLayout(self.widget1) + self.hboxlayout2.setMargin(0) + self.hboxlayout2.setSpacing(6) + self.hboxlayout2.setObjectName("hboxlayout2") + + self.pb_kiimage_repair = QtGui.QPushButton(self.widget1) + self.pb_kiimage_repair.setMinimumSize(QtCore.QSize(60,0)) + self.pb_kiimage_repair.setObjectName("pb_kiimage_repair") + self.hboxlayout2.addWidget(self.pb_kiimage_repair) + + self.pb_kiimage_repair1 = QtGui.QLabel(self.widget1) + self.pb_kiimage_repair1.setObjectName("pb_kiimage_repair1") + self.hboxlayout2.addWidget(self.pb_kiimage_repair1) + + spacerItem3 = QtGui.QSpacerItem(40,20,QtGui.QSizePolicy.Expanding,QtGui.QSizePolicy.Minimum) + self.hboxlayout2.addItem(spacerItem3) self.tabwidget.addTab(self.tab_tasks,"") self.tab_settings = QtGui.QWidget() @@ -53,13 +171,13 @@ self.tab_graphics.setObjectName("tab_graphics") self.horizontalLayout_4 = QtGui.QWidget(self.tab_graphics) - self.horizontalLayout_4.setGeometry(QtCore.QRect(10,10,471,81)) + self.horizontalLayout_4.setGeometry(QtCore.QRect(10,10,451,81)) self.horizontalLayout_4.setObjectName("horizontalLayout_4") - self.hboxlayout = QtGui.QHBoxLayout(self.horizontalLayout_4) - self.hboxlayout.setMargin(0) - self.hboxlayout.setSpacing(6) - self.hboxlayout.setObjectName("hboxlayout") + self.hboxlayout3 = QtGui.QHBoxLayout(self.horizontalLayout_4) + self.hboxlayout3.setMargin(0) + self.hboxlayout3.setSpacing(6) + self.hboxlayout3.setObjectName("hboxlayout3") self.groupBox_screenres = QtGui.QGroupBox(self.horizontalLayout_4) @@ -74,10 +192,10 @@ self.verticalLayout_46.setGeometry(QtCore.QRect(20,20,181,54)) self.verticalLayout_46.setObjectName("verticalLayout_46") - self.vboxlayout = QtGui.QVBoxLayout(self.verticalLayout_46) - self.vboxlayout.setMargin(0) - self.vboxlayout.setSpacing(6) - self.vboxlayout.setObjectName("vboxlayout") + self.vboxlayout1 = QtGui.QVBoxLayout(self.verticalLayout_46) + self.vboxlayout1.setMargin(0) + self.vboxlayout1.setSpacing(6) + self.vboxlayout1.setObjectName("vboxlayout1") self.sl_gra_screenres = QtGui.QSlider(self.verticalLayout_46) self.sl_gra_screenres.setMaximum(10) @@ -88,69 +206,69 @@ self.sl_gra_screenres.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_screenres.setTickInterval(1) self.sl_gra_screenres.setObjectName("sl_gra_screenres") - self.vboxlayout.addWidget(self.sl_gra_screenres) + self.vboxlayout1.addWidget(self.sl_gra_screenres) self.lb_screenres = QtGui.QLabel(self.verticalLayout_46) self.lb_screenres.setAlignment(QtCore.Qt.AlignCenter) self.lb_screenres.setObjectName("lb_screenres") - self.vboxlayout.addWidget(self.lb_screenres) - self.hboxlayout.addWidget(self.groupBox_screenres) + self.vboxlayout1.addWidget(self.lb_screenres) + self.hboxlayout3.addWidget(self.groupBox_screenres) self.groupBox_gra_checkboxes = QtGui.QGroupBox(self.horizontalLayout_4) self.groupBox_gra_checkboxes.setEnabled(True) self.groupBox_gra_checkboxes.setObjectName("groupBox_gra_checkboxes") self.verticalLayout_28 = QtGui.QWidget(self.groupBox_gra_checkboxes) - self.verticalLayout_28.setGeometry(QtCore.QRect(10,10,201,61)) + self.verticalLayout_28.setGeometry(QtCore.QRect(10,10,191,61)) self.verticalLayout_28.setObjectName("verticalLayout_28") - self.vboxlayout1 = QtGui.QVBoxLayout(self.verticalLayout_28) - self.vboxlayout1.setMargin(0) - self.vboxlayout1.setSpacing(6) - self.vboxlayout1.setObjectName("vboxlayout1") + self.vboxlayout2 = QtGui.QVBoxLayout(self.verticalLayout_28) + self.vboxlayout2.setMargin(0) + self.vboxlayout2.setSpacing(6) + self.vboxlayout2.setObjectName("vboxlayout2") - self.hboxlayout1 = QtGui.QHBoxLayout() - self.hboxlayout1.setMargin(0) - self.hboxlayout1.setSpacing(6) - self.hboxlayout1.setObjectName("hboxlayout1") + self.hboxlayout4 = QtGui.QHBoxLayout() + self.hboxlayout4.setMargin(0) + self.hboxlayout4.setSpacing(6) + self.hboxlayout4.setObjectName("hboxlayout4") self.cb_gra_windowed = QtGui.QCheckBox(self.verticalLayout_28) self.cb_gra_windowed.setObjectName("cb_gra_windowed") - self.hboxlayout1.addWidget(self.cb_gra_windowed) + self.hboxlayout4.addWidget(self.cb_gra_windowed) self.cb_gra_vsync = QtGui.QCheckBox(self.verticalLayout_28) self.cb_gra_vsync.setObjectName("cb_gra_vsync") - self.hboxlayout1.addWidget(self.cb_gra_vsync) - self.vboxlayout1.addLayout(self.hboxlayout1) + self.hboxlayout4.addWidget(self.cb_gra_vsync) + self.vboxlayout2.addLayout(self.hboxlayout4) self.cb_gra_shadow = QtGui.QCheckBox(self.verticalLayout_28) self.cb_gra_shadow.setObjectName("cb_gra_shadow") - self.vboxlayout1.addWidget(self.cb_gra_shadow) - self.hboxlayout.addWidget(self.groupBox_gra_checkboxes) + self.vboxlayout2.addWidget(self.cb_gra_shadow) + self.hboxlayout3.addWidget(self.groupBox_gra_checkboxes) self.groupBox_gra_quality = QtGui.QGroupBox(self.tab_graphics) self.groupBox_gra_quality.setEnabled(True) - self.groupBox_gra_quality.setGeometry(QtCore.QRect(10,90,471,281)) + self.groupBox_gra_quality.setGeometry(QtCore.QRect(10,90,451,281)) self.groupBox_gra_quality.setObjectName("groupBox_gra_quality") self.verticalLayout_47 = QtGui.QWidget(self.groupBox_gra_quality) self.verticalLayout_47.setGeometry(QtCore.QRect(20,20,201,251)) self.verticalLayout_47.setObjectName("verticalLayout_47") - self.vboxlayout2 = QtGui.QVBoxLayout(self.verticalLayout_47) - self.vboxlayout2.setMargin(0) - self.vboxlayout2.setSpacing(6) - self.vboxlayout2.setObjectName("vboxlayout2") - - self.vboxlayout3 = QtGui.QVBoxLayout() + self.vboxlayout3 = QtGui.QVBoxLayout(self.verticalLayout_47) self.vboxlayout3.setMargin(0) self.vboxlayout3.setSpacing(6) self.vboxlayout3.setObjectName("vboxlayout3") + self.vboxlayout4 = QtGui.QVBoxLayout() + self.vboxlayout4.setMargin(0) + self.vboxlayout4.setSpacing(6) + self.vboxlayout4.setObjectName("vboxlayout4") + self.lb_gra_quality = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_quality.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_quality.setObjectName("lb_gra_quality") - self.vboxlayout3.addWidget(self.lb_gra_quality) + self.vboxlayout4.addWidget(self.lb_gra_quality) self.sl_gra_quality = QtGui.QSlider(self.verticalLayout_47) self.sl_gra_quality.setMinimum(0) @@ -163,43 +281,43 @@ self.sl_gra_quality.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_quality.setTickInterval(1) self.sl_gra_quality.setObjectName("sl_gra_quality") - self.vboxlayout3.addWidget(self.sl_gra_quality) + self.vboxlayout4.addWidget(self.sl_gra_quality) - self.hboxlayout2 = QtGui.QHBoxLayout() - self.hboxlayout2.setMargin(0) - self.hboxlayout2.setSpacing(6) - self.hboxlayout2.setObjectName("hboxlayout2") + self.hboxlayout5 = QtGui.QHBoxLayout() + self.hboxlayout5.setMargin(0) + self.hboxlayout5.setSpacing(6) + self.hboxlayout5.setObjectName("hboxlayout5") self.lb_gra_quality_low = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_quality_low.setObjectName("lb_gra_quality_low") - self.hboxlayout2.addWidget(self.lb_gra_quality_low) + self.hboxlayout5.addWidget(self.lb_gra_quality_low) self.lb_gra_quality_medium = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_quality_medium.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_quality_medium.setObjectName("lb_gra_quality_medium") - self.hboxlayout2.addWidget(self.lb_gra_quality_medium) + self.hboxlayout5.addWidget(self.lb_gra_quality_medium) self.lb_gra_quality_high = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_quality_high.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_quality_high.setObjectName("lb_gra_quality_high") - self.hboxlayout2.addWidget(self.lb_gra_quality_high) + self.hboxlayout5.addWidget(self.lb_gra_quality_high) self.lb_gra_quality_ultra = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_quality_ultra.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lb_gra_quality_ultra.setObjectName("lb_gra_quality_ultra") - self.hboxlayout2.addWidget(self.lb_gra_quality_ultra) - self.vboxlayout3.addLayout(self.hboxlayout2) - self.vboxlayout2.addLayout(self.vboxlayout3) + self.hboxlayout5.addWidget(self.lb_gra_quality_ultra) + self.vboxlayout4.addLayout(self.hboxlayout5) + self.vboxlayout3.addLayout(self.vboxlayout4) - self.vboxlayout4 = QtGui.QVBoxLayout() - self.vboxlayout4.setMargin(0) - self.vboxlayout4.setSpacing(6) - self.vboxlayout4.setObjectName("vboxlayout4") + self.vboxlayout5 = QtGui.QVBoxLayout() + self.vboxlayout5.setMargin(0) + self.vboxlayout5.setSpacing(6) + self.vboxlayout5.setObjectName("vboxlayout5") self.lb_gra_aa = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_aa.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_aa.setObjectName("lb_gra_aa") - self.vboxlayout4.addWidget(self.lb_gra_aa) + self.vboxlayout5.addWidget(self.lb_gra_aa) self.sl_gra_antialias = QtGui.QSlider(self.verticalLayout_47) self.sl_gra_antialias.setMinimum(0) @@ -213,33 +331,33 @@ self.sl_gra_antialias.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_antialias.setTickInterval(2) self.sl_gra_antialias.setObjectName("sl_gra_antialias") - self.vboxlayout4.addWidget(self.sl_gra_antialias) + self.vboxlayout5.addWidget(self.sl_gra_antialias) - self.hboxlayout3 = QtGui.QHBoxLayout() - self.hboxlayout3.setMargin(0) - self.hboxlayout3.setSpacing(6) - self.hboxlayout3.setObjectName("hboxlayout3") + self.hboxlayout6 = QtGui.QHBoxLayout() + self.hboxlayout6.setMargin(0) + self.hboxlayout6.setSpacing(6) + self.hboxlayout6.setObjectName("hboxlayout6") self.lb_gra_aa_low = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_aa_low.setObjectName("lb_gra_aa_low") - self.hboxlayout3.addWidget(self.lb_gra_aa_low) + self.hboxlayout6.addWidget(self.lb_gra_aa_low) self.lb_gra_aa_low1 = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_aa_low1.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lb_gra_aa_low1.setObjectName("lb_gra_aa_low1") - self.hboxlayout3.addWidget(self.lb_gra_aa_low1) - self.vboxlayout4.addLayout(self.hboxlayout3) - self.vboxlayout2.addLayout(self.vboxlayout4) + self.hboxlayout6.addWidget(self.lb_gra_aa_low1) + self.vboxlayout5.addLayout(self.hboxlayout6) + self.vboxlayout3.addLayout(self.vboxlayout5) - self.vboxlayout5 = QtGui.QVBoxLayout() - self.vboxlayout5.setMargin(0) - self.vboxlayout5.setSpacing(6) - self.vboxlayout5.setObjectName("vboxlayout5") + self.vboxlayout6 = QtGui.QVBoxLayout() + self.vboxlayout6.setMargin(0) + self.vboxlayout6.setSpacing(6) + self.vboxlayout6.setObjectName("vboxlayout6") self.lb_gra_sq = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_sq.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_sq.setObjectName("lb_gra_sq") - self.vboxlayout5.addWidget(self.lb_gra_sq) + self.vboxlayout6.addWidget(self.lb_gra_sq) self.sl_gra_shadow = QtGui.QSlider(self.verticalLayout_47) self.sl_gra_shadow.setMinimum(0) @@ -252,42 +370,42 @@ self.sl_gra_shadow.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_shadow.setTickInterval(25) self.sl_gra_shadow.setObjectName("sl_gra_shadow") - self.vboxlayout5.addWidget(self.sl_gra_shadow) + self.vboxlayout6.addWidget(self.sl_gra_shadow) - self.hboxlayout4 = QtGui.QHBoxLayout() - self.hboxlayout4.setMargin(0) - self.hboxlayout4.setSpacing(6) - self.hboxlayout4.setObjectName("hboxlayout4") + self.hboxlayout7 = QtGui.QHBoxLayout() + self.hboxlayout7.setMargin(0) + self.hboxlayout7.setSpacing(6) + self.hboxlayout7.setObjectName("hboxlayout7") self.lb_gra_sq_low = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_sq_low.setObjectName("lb_gra_sq_low") - self.hboxlayout4.addWidget(self.lb_gra_sq_low) + self.hboxlayout7.addWidget(self.lb_gra_sq_low) self.lb_gra_sq_high = QtGui.QLabel(self.verticalLayout_47) self.lb_gra_sq_high.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lb_gra_sq_high.setObjectName("lb_gra_sq_high") - self.hboxlayout4.addWidget(self.lb_gra_sq_high) - self.vboxlayout5.addLayout(self.hboxlayout4) - self.vboxlayout2.addLayout(self.vboxlayout5) + self.hboxlayout7.addWidget(self.lb_gra_sq_high) + self.vboxlayout6.addLayout(self.hboxlayout7) + self.vboxlayout3.addLayout(self.vboxlayout6) self.verticalLayout_48 = QtGui.QWidget(self.groupBox_gra_quality) - self.verticalLayout_48.setGeometry(QtCore.QRect(250,20,201,166)) + self.verticalLayout_48.setGeometry(QtCore.QRect(240,20,201,166)) self.verticalLayout_48.setObjectName("verticalLayout_48") - self.vboxlayout6 = QtGui.QVBoxLayout(self.verticalLayout_48) - self.vboxlayout6.setMargin(0) - self.vboxlayout6.setSpacing(6) - self.vboxlayout6.setObjectName("vboxlayout6") - - self.vboxlayout7 = QtGui.QVBoxLayout() + self.vboxlayout7 = QtGui.QVBoxLayout(self.verticalLayout_48) self.vboxlayout7.setMargin(0) self.vboxlayout7.setSpacing(6) self.vboxlayout7.setObjectName("vboxlayout7") + self.vboxlayout8 = QtGui.QVBoxLayout() + self.vboxlayout8.setMargin(0) + self.vboxlayout8.setSpacing(6) + self.vboxlayout8.setObjectName("vboxlayout8") + self.lb_gra_tq = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_tq.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_tq.setObjectName("lb_gra_tq") - self.vboxlayout7.addWidget(self.lb_gra_tq) + self.vboxlayout8.addWidget(self.lb_gra_tq) self.sl_gra_texture = QtGui.QSlider(self.verticalLayout_48) self.sl_gra_texture.setMinimum(0) @@ -300,33 +418,33 @@ self.sl_gra_texture.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_texture.setTickInterval(1) self.sl_gra_texture.setObjectName("sl_gra_texture") - self.vboxlayout7.addWidget(self.sl_gra_texture) + self.vboxlayout8.addWidget(self.sl_gra_texture) - self.hboxlayout5 = QtGui.QHBoxLayout() - self.hboxlayout5.setMargin(0) - self.hboxlayout5.setSpacing(6) - self.hboxlayout5.setObjectName("hboxlayout5") + self.hboxlayout8 = QtGui.QHBoxLayout() + self.hboxlayout8.setMargin(0) + self.hboxlayout8.setSpacing(6) + self.hboxlayout8.setObjectName("hboxlayout8") self.lb_gra_tq_low = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_tq_low.setObjectName("lb_gra_tq_low") - self.hboxlayout5.addWidget(self.lb_gra_tq_low) + self.hboxlayout8.addWidget(self.lb_gra_tq_low) self.lb_gra_tq_high = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_tq_high.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lb_gra_tq_high.setObjectName("lb_gra_tq_high") - self.hboxlayout5.addWidget(self.lb_gra_tq_high) - self.vboxlayout7.addLayout(self.hboxlayout5) - self.vboxlayout6.addLayout(self.vboxlayout7) + self.hboxlayout8.addWidget(self.lb_gra_tq_high) + self.vboxlayout8.addLayout(self.hboxlayout8) + self.vboxlayout7.addLayout(self.vboxlayout8) - self.vboxlayout8 = QtGui.QVBoxLayout() - self.vboxlayout8.setMargin(0) - self.vboxlayout8.setSpacing(6) - self.vboxlayout8.setObjectName("vboxlayout8") + self.vboxlayout9 = QtGui.QVBoxLayout() + self.vboxlayout9.setMargin(0) + self.vboxlayout9.setSpacing(6) + self.vboxlayout9.setObjectName("vboxlayout9") self.lb_gra_af = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_af.setAlignment(QtCore.Qt.AlignCenter) self.lb_gra_af.setObjectName("lb_gra_af") - self.vboxlayout8.addWidget(self.lb_gra_af) + self.vboxlayout9.addWidget(self.lb_gra_af) self.sl_gra_anisotropic = QtGui.QSlider(self.verticalLayout_48) self.sl_gra_anisotropic.setMinimum(1) @@ -339,156 +457,117 @@ self.sl_gra_anisotropic.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_gra_anisotropic.setTickInterval(5) self.sl_gra_anisotropic.setObjectName("sl_gra_anisotropic") - self.vboxlayout8.addWidget(self.sl_gra_anisotropic) + self.vboxlayout9.addWidget(self.sl_gra_anisotropic) - self.hboxlayout6 = QtGui.QHBoxLayout() - self.hboxlayout6.setMargin(0) - self.hboxlayout6.setSpacing(6) - self.hboxlayout6.setObjectName("hboxlayout6") + self.hboxlayout9 = QtGui.QHBoxLayout() + self.hboxlayout9.setMargin(0) + self.hboxlayout9.setSpacing(6) + self.hboxlayout9.setObjectName("hboxlayout9") self.lb_gra_af_low = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_af_low.setObjectName("lb_gra_af_low") - self.hboxlayout6.addWidget(self.lb_gra_af_low) + self.hboxlayout9.addWidget(self.lb_gra_af_low) self.lb_gra_af_high = QtGui.QLabel(self.verticalLayout_48) self.lb_gra_af_high.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.lb_gra_af_high.setObjectName("lb_gra_af_high") - self.hboxlayout6.addWidget(self.lb_gra_af_high) - self.vboxlayout8.addLayout(self.hboxlayout6) - self.vboxlayout6.addLayout(self.vboxlayout8) + self.hboxlayout9.addWidget(self.lb_gra_af_high) + self.vboxlayout9.addLayout(self.hboxlayout9) + self.vboxlayout7.addLayout(self.vboxlayout9) self.tab_sub_settings.addTab(self.tab_graphics,"") self.tab_audio = QtGui.QWidget() self.tab_audio.setObjectName("tab_audio") - self.groupBox_aud_hardware = QtGui.QGroupBox(self.tab_audio) - self.groupBox_aud_hardware.setEnabled(True) - self.groupBox_aud_hardware.setGeometry(QtCore.QRect(10,260,471,111)) - self.groupBox_aud_hardware.setObjectName("groupBox_aud_hardware") + self.groupBox_aud_level = QtGui.QGroupBox(self.tab_audio) + self.groupBox_aud_level.setEnabled(True) + self.groupBox_aud_level.setGeometry(QtCore.QRect(10,0,451,171)) + self.groupBox_aud_level.setObjectName("groupBox_aud_level") - self.verticalLayout_61 = QtGui.QWidget(self.groupBox_aud_hardware) - self.verticalLayout_61.setGeometry(QtCore.QRect(20,20,191,75)) - self.verticalLayout_61.setObjectName("verticalLayout_61") + self.layoutWidget = QtGui.QWidget(self.groupBox_aud_level) + self.layoutWidget.setGeometry(QtCore.QRect(20,20,191,112)) + self.layoutWidget.setObjectName("layoutWidget") - self.vboxlayout9 = QtGui.QVBoxLayout(self.verticalLayout_61) - self.vboxlayout9.setMargin(0) - self.vboxlayout9.setSpacing(6) - self.vboxlayout9.setObjectName("vboxlayout9") - - self.lb_aud_device_modes = QtGui.QLabel(self.verticalLayout_61) - self.lb_aud_device_modes.setAlignment(QtCore.Qt.AlignCenter) - self.lb_aud_device_modes.setObjectName("lb_aud_device_modes") - self.vboxlayout9.addWidget(self.lb_aud_device_modes) - - self.lb_aud_device = QtGui.QLabel(self.verticalLayout_61) - self.lb_aud_device.setAlignment(QtCore.Qt.AlignCenter) - self.lb_aud_device.setObjectName("lb_aud_device") - self.vboxlayout9.addWidget(self.lb_aud_device) - - self.sl_aud_device = QtGui.QSlider(self.verticalLayout_61) - self.sl_aud_device.setMaximum(2) - self.sl_aud_device.setPageStep(1) - self.sl_aud_device.setSliderPosition(0) - self.sl_aud_device.setTracking(False) - self.sl_aud_device.setOrientation(QtCore.Qt.Horizontal) - self.sl_aud_device.setTickPosition(QtGui.QSlider.TicksBelow) - self.sl_aud_device.setTickInterval(1) - self.sl_aud_device.setObjectName("sl_aud_device") - self.vboxlayout9.addWidget(self.sl_aud_device) - - self.verticalLayout_60 = QtGui.QWidget(self.groupBox_aud_hardware) - self.verticalLayout_60.setGeometry(QtCore.QRect(250,15,191,79)) - self.verticalLayout_60.setObjectName("verticalLayout_60") - - self.vboxlayout10 = QtGui.QVBoxLayout(self.verticalLayout_60) + self.vboxlayout10 = QtGui.QVBoxLayout(self.layoutWidget) self.vboxlayout10.setMargin(0) self.vboxlayout10.setSpacing(6) self.vboxlayout10.setObjectName("vboxlayout10") - self.cb_aud_eax = QtGui.QCheckBox(self.verticalLayout_60) - self.cb_aud_eax.setObjectName("cb_aud_eax") - self.vboxlayout10.addWidget(self.cb_aud_eax) + self.verticalLayout_57 = QtGui.QWidget(self.layoutWidget) + self.verticalLayout_57.setObjectName("verticalLayout_57") - self.lb_aud_priority_3 = QtGui.QLabel(self.verticalLayout_60) - self.lb_aud_priority_3.setAlignment(QtCore.Qt.AlignCenter) - self.lb_aud_priority_3.setObjectName("lb_aud_priority_3") - self.vboxlayout10.addWidget(self.lb_aud_priority_3) - - self.sl_aud_priority = QtGui.QSlider(self.verticalLayout_60) - self.sl_aud_priority.setMaximum(9) - self.sl_aud_priority.setPageStep(1) - self.sl_aud_priority.setSliderPosition(0) - self.sl_aud_priority.setTracking(False) - self.sl_aud_priority.setOrientation(QtCore.Qt.Horizontal) - self.sl_aud_priority.setTickPosition(QtGui.QSlider.TicksBelow) - self.sl_aud_priority.setTickInterval(3) - self.sl_aud_priority.setObjectName("sl_aud_priority") - self.vboxlayout10.addWidget(self.sl_aud_priority) - - self.groupBox_voicechat = QtGui.QGroupBox(self.tab_audio) - self.groupBox_voicechat.setEnabled(True) - self.groupBox_voicechat.setGeometry(QtCore.QRect(10,170,471,91)) - self.groupBox_voicechat.setObjectName("groupBox_voicechat") - - self.cb_aud_voicechat = QtGui.QCheckBox(self.groupBox_voicechat) - self.cb_aud_voicechat.setGeometry(QtCore.QRect(250,40,171,19)) - self.cb_aud_voicechat.setObjectName("cb_aud_voicechat") - - self.verticalLayout_62 = QtGui.QWidget(self.groupBox_voicechat) - self.verticalLayout_62.setGeometry(QtCore.QRect(20,20,191,54)) - self.verticalLayout_62.setObjectName("verticalLayout_62") - - self.vboxlayout11 = QtGui.QVBoxLayout(self.verticalLayout_62) + self.vboxlayout11 = QtGui.QVBoxLayout(self.verticalLayout_57) self.vboxlayout11.setMargin(0) self.vboxlayout11.setSpacing(6) self.vboxlayout11.setObjectName("vboxlayout11") - self.lb_aud_microphon = QtGui.QLabel(self.verticalLayout_62) - self.lb_aud_microphon.setEnabled(False) - self.lb_aud_microphon.setAlignment(QtCore.Qt.AlignCenter) - self.lb_aud_microphon.setObjectName("lb_aud_microphon") - self.vboxlayout11.addWidget(self.lb_aud_microphon) + self.lb_aud_fx_3 = QtGui.QLabel(self.verticalLayout_57) + self.lb_aud_fx_3.setAlignment(QtCore.Qt.AlignCenter) + self.lb_aud_fx_3.setObjectName("lb_aud_fx_3") + self.vboxlayout11.addWidget(self.lb_aud_fx_3) - self.sl_aud_microphon = QtGui.QSlider(self.verticalLayout_62) - self.sl_aud_microphon.setEnabled(False) - self.sl_aud_microphon.setMinimum(0) - self.sl_aud_microphon.setMaximum(100) - self.sl_aud_microphon.setPageStep(10) - self.sl_aud_microphon.setProperty("value",QtCore.QVariant(0)) - self.sl_aud_microphon.setSliderPosition(0) - self.sl_aud_microphon.setTracking(False) - self.sl_aud_microphon.setOrientation(QtCore.Qt.Horizontal) - self.sl_aud_microphon.setTickPosition(QtGui.QSlider.TicksBelow) - self.sl_aud_microphon.setTickInterval(25) - self.sl_aud_microphon.setObjectName("sl_aud_microphon") - self.vboxlayout11.addWidget(self.sl_aud_microphon) + self.sl_aud_fx = QtGui.QSlider(self.verticalLayout_57) + self.sl_aud_fx.setMinimum(0) + self.sl_aud_fx.setMaximum(100) + self.sl_aud_fx.setPageStep(10) + self.sl_aud_fx.setProperty("value",QtCore.QVariant(0)) + self.sl_aud_fx.setSliderPosition(0) + self.sl_aud_fx.setTracking(False) + self.sl_aud_fx.setOrientation(QtCore.Qt.Horizontal) + self.sl_aud_fx.setTickPosition(QtGui.QSlider.TicksBelow) + self.sl_aud_fx.setTickInterval(25) + self.sl_aud_fx.setObjectName("sl_aud_fx") + self.vboxlayout11.addWidget(self.sl_aud_fx) + self.vboxlayout10.addWidget(self.verticalLayout_57) - self.groupBox_aud_level = QtGui.QGroupBox(self.tab_audio) - self.groupBox_aud_level.setEnabled(True) - self.groupBox_aud_level.setGeometry(QtCore.QRect(10,0,471,171)) - self.groupBox_aud_level.setObjectName("groupBox_aud_level") + self.verticalLayout_59 = QtGui.QWidget(self.layoutWidget) + self.verticalLayout_59.setObjectName("verticalLayout_59") - self.widget = QtGui.QWidget(self.groupBox_aud_level) - self.widget.setGeometry(QtCore.QRect(250,20,191,139)) - self.widget.setObjectName("widget") - - self.vboxlayout12 = QtGui.QVBoxLayout(self.widget) + self.vboxlayout12 = QtGui.QVBoxLayout(self.verticalLayout_59) self.vboxlayout12.setMargin(0) self.vboxlayout12.setSpacing(6) self.vboxlayout12.setObjectName("vboxlayout12") - self.verticalLayout_58 = QtGui.QWidget(self.widget) - self.verticalLayout_58.setObjectName("verticalLayout_58") + self.lb_aud_music = QtGui.QLabel(self.verticalLayout_59) + self.lb_aud_music.setAlignment(QtCore.Qt.AlignCenter) + self.lb_aud_music.setObjectName("lb_aud_music") + self.vboxlayout12.addWidget(self.lb_aud_music) - self.vboxlayout13 = QtGui.QVBoxLayout(self.verticalLayout_58) + self.sl_aud_music = QtGui.QSlider(self.verticalLayout_59) + self.sl_aud_music.setMinimum(0) + self.sl_aud_music.setMaximum(100) + self.sl_aud_music.setPageStep(10) + self.sl_aud_music.setProperty("value",QtCore.QVariant(0)) + self.sl_aud_music.setSliderPosition(0) + self.sl_aud_music.setTracking(False) + self.sl_aud_music.setOrientation(QtCore.Qt.Horizontal) + self.sl_aud_music.setTickPosition(QtGui.QSlider.TicksBelow) + self.sl_aud_music.setTickInterval(25) + self.sl_aud_music.setObjectName("sl_aud_music") + self.vboxlayout12.addWidget(self.sl_aud_music) + self.vboxlayout10.addWidget(self.verticalLayout_59) + + self.layoutWidget1 = QtGui.QWidget(self.groupBox_aud_level) + self.layoutWidget1.setGeometry(QtCore.QRect(240,20,191,139)) + self.layoutWidget1.setObjectName("layoutWidget1") + + self.vboxlayout13 = QtGui.QVBoxLayout(self.layoutWidget1) self.vboxlayout13.setMargin(0) self.vboxlayout13.setSpacing(6) self.vboxlayout13.setObjectName("vboxlayout13") + self.verticalLayout_58 = QtGui.QWidget(self.layoutWidget1) + self.verticalLayout_58.setObjectName("verticalLayout_58") + + self.vboxlayout14 = QtGui.QVBoxLayout(self.verticalLayout_58) + self.vboxlayout14.setMargin(0) + self.vboxlayout14.setSpacing(6) + self.vboxlayout14.setObjectName("vboxlayout14") + self.lb_aud_ambience = QtGui.QLabel(self.verticalLayout_58) self.lb_aud_ambience.setAlignment(QtCore.Qt.AlignCenter) self.lb_aud_ambience.setObjectName("lb_aud_ambience") - self.vboxlayout13.addWidget(self.lb_aud_ambience) + self.vboxlayout14.addWidget(self.lb_aud_ambience) self.sl_aud_ambience = QtGui.QSlider(self.verticalLayout_58) self.sl_aud_ambience.setMinimum(0) @@ -501,21 +580,21 @@ self.sl_aud_ambience.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_aud_ambience.setTickInterval(25) self.sl_aud_ambience.setObjectName("sl_aud_ambience") - self.vboxlayout13.addWidget(self.sl_aud_ambience) - self.vboxlayout12.addWidget(self.verticalLayout_58) + self.vboxlayout14.addWidget(self.sl_aud_ambience) + self.vboxlayout13.addWidget(self.verticalLayout_58) - self.verticalLayout_56 = QtGui.QWidget(self.widget) + self.verticalLayout_56 = QtGui.QWidget(self.layoutWidget1) self.verticalLayout_56.setObjectName("verticalLayout_56") - self.vboxlayout14 = QtGui.QVBoxLayout(self.verticalLayout_56) - self.vboxlayout14.setMargin(0) - self.vboxlayout14.setSpacing(6) - self.vboxlayout14.setObjectName("vboxlayout14") + self.vboxlayout15 = QtGui.QVBoxLayout(self.verticalLayout_56) + self.vboxlayout15.setMargin(0) + self.vboxlayout15.setSpacing(6) + self.vboxlayout15.setObjectName("vboxlayout15") self.lb_aud_npc = QtGui.QLabel(self.verticalLayout_56) self.lb_aud_npc.setAlignment(QtCore.Qt.AlignCenter) self.lb_aud_npc.setObjectName("lb_aud_npc") - self.vboxlayout14.addWidget(self.lb_aud_npc) + self.vboxlayout15.addWidget(self.lb_aud_npc) self.sl_aud_npc = QtGui.QSlider(self.verticalLayout_56) self.sl_aud_npc.setMinimum(0) @@ -528,82 +607,122 @@ self.sl_aud_npc.setTickPosition(QtGui.QSlider.TicksBelow) self.sl_aud_npc.setTickInterval(25) self.sl_aud_npc.setObjectName("sl_aud_npc") - self.vboxlayout14.addWidget(self.sl_aud_npc) - self.vboxlayout12.addWidget(self.verticalLayout_56) + self.vboxlayout15.addWidget(self.sl_aud_npc) + self.vboxlayout13.addWidget(self.verticalLayout_56) - self.cb_aud_mute = QtGui.QCheckBox(self.widge... [truncated message content] |
From: <ti...@us...> - 2007-01-31 00:22:36
|
Revision: 104 http://pymoul.svn.sourceforge.net/pymoul/?rev=104&view=rev Author: tiran Date: 2007-01-30 16:22:36 -0800 (Tue, 30 Jan 2007) Log Message: ----------- Fixed mixed small errors and typos on Windows Modified Paths: -------------- pymoul/trunk/distutils_iss.py pymoul/trunk/src/moul/osdependent/processinfo.py pymoul/trunk/template.iss Modified: pymoul/trunk/distutils_iss.py =================================================================== --- pymoul/trunk/distutils_iss.py 2007-01-30 20:23:14 UTC (rev 103) +++ pymoul/trunk/distutils_iss.py 2007-01-31 00:22:36 UTC (rev 104) @@ -348,7 +348,7 @@ dist_dir - internal windows_exe_files - internal lib_files - internal - isscript=None - path to IS script output file + inno_script=None - path to IS script output file templates = None - list of template file names or single file version = "1.0" - version string interpolation - dict with additional %()s interpolation items @@ -491,7 +491,7 @@ def compile(self): import ctypes res = ctypes.windll.shell32.ShellExecuteA(0, "compile", - self.isscript, + self.inno_script, None, None, 0) Modified: pymoul/trunk/src/moul/osdependent/processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-30 20:23:14 UTC (rev 103) +++ pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-31 00:22:36 UTC (rev 104) @@ -184,7 +184,7 @@ hModule = c_ulong() count = c_ulong() modname = c_buffer(51) - mapping = [] + mapping = {} for pid in self.getPids(): # Get handle to the process based on PID hProcess = KERNEL.OpenProcess(PROCESS_FLAGS, False, pid) Modified: pymoul/trunk/template.iss =================================================================== --- pymoul/trunk/template.iss 2007-01-30 20:23:14 UTC (rev 103) +++ pymoul/trunk/template.iss 2007-01-31 00:22:36 UTC (rev 104) @@ -10,10 +10,10 @@ AppUpdatesURL=http://sourceforge.net/projects/pymoul/ DefaultDirName={pf}\%(appname)s DefaultGroupName=%(appname)s -LicenseFile=GPL.txt -InfoBeforeFile=README.txt -;InfoAfterFile=c:\Programme\Inno Setup 5\license.txt -OutputDir=dist\ +LicenseFile=docs\GPL.txt +;InfoBeforeFile=docs\README.txt +InfoAfterFile=docs\README.txt +OutputDir=installer\ OutputBaseFilename=setup_%(appnamestripped)s_%(version)s Compression=lzma SolidCompression=yes @@ -34,7 +34,7 @@ Name: "{group}\%(appname)s"; Filename: "{app}\%(appexe)s" Name: "{group}\{cm:ProgramOnTheWeb,%(appname)s}"; Filename: "http://pymoul.sourceforge.net/" Name: "{group}\{cm:UninstallProgram,%(appname)s}"; Filename: "{uninstallexe}" -Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\%(appname)s"; Filename: "{app}\%(appexe)"; Tasks: quicklaunchicon +Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\%(appname)s"; Filename: "{app}\%(appexe)s"; Tasks: quicklaunchicon [Run] -Filename: "{app}%(appexe)s"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent +Filename: "{app}\%(appexe)s"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-31 03:00:54
|
Revision: 106 http://pymoul.svn.sourceforge.net/pymoul/?rev=106&view=rev Author: tiran Date: 2007-01-30 19:00:50 -0800 (Tue, 30 Jan 2007) Log Message: ----------- minor windows build tweaks Modified Paths: -------------- pymoul/trunk/build.bat pymoul/trunk/setup_win32.py Added Paths: ----------- pymoul/trunk/installer.bat Modified: pymoul/trunk/build.bat =================================================================== --- pymoul/trunk/build.bat 2007-01-31 02:59:33 UTC (rev 105) +++ pymoul/trunk/build.bat 2007-01-31 03:00:50 UTC (rev 106) @@ -1,4 +1,6 @@ @echo off rd /S /Q build +cls +set PYTHONPATH=src python setup.py py2exe -pause \ No newline at end of file +pause Added: pymoul/trunk/installer.bat =================================================================== --- pymoul/trunk/installer.bat (rev 0) +++ pymoul/trunk/installer.bat 2007-01-31 03:00:50 UTC (rev 106) @@ -0,0 +1,7 @@ +@echo off +rd /S /Q build +cls +set PYTHONPATH=src +set INNOSETUP=yes +python setup.py py2exe +pause Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-31 02:59:33 UTC (rev 105) +++ pymoul/trunk/setup_win32.py 2007-01-31 03:00:50 UTC (rev 106) @@ -20,24 +20,27 @@ if len(sys.argv) == 1: sys.argv.append("py2exe") -# py2exe's ModuleFinder can't handle runtime changes to __path__, -# but win32com uses them -try: - import modulefinder - import win32com - for p in win32com.__path__[1:]: - modulefinder.AddPackagePath("win32com", p) - for extra in ["win32com.shell"]: - __import__(extra) - m = sys.modules[extra] - for p in m.__path__[1:]: - modulefinder.AddPackagePath(extra, p) -except ImportError: - # no build path setup, no worries. - pass +def import_win32com(): + """py2exe's ModuleFinder can't handle runtime changes to __path__ + but win32com uses them + """ + try: + import modulefinder + import win32com + for p in win32com.__path__[1:]: + modulefinder.AddPackagePath("win32com", p) + for extra in ["win32com.shell"]: + __import__(extra) + m = sys.modules[extra] + for p in m.__path__[1:]: + modulefinder.AddPackagePath(extra, p) + except ImportError: + # no build path setup, no worries. + pass # PyTz uses some import magic def findPyTz(): + import pytz packages = ['pytz.zoneinfo'] for tz in ('GMT', 'UTC'): packages.append('pytz.zoneinfo.%s' % tz) @@ -45,7 +48,6 @@ for tz in ('US',): packages.append('pytz.zoneinfo.%s.*' % tz) return packages -# import pytz # pytz_dir = os.path.dirname(pytz.__file__) # if not os.path.isdir(pytz_dir): # raise ValueError('Install pytz with easy_install -Z pytz') @@ -68,11 +70,13 @@ pexe = kw['options'].setdefault('py2exe', {}) pexe['compressed'] = 100 # compress zip file pexe['optimize'] = 0 # 0,1,2 - pexe['includes'] = ['sip', 'PyQt4', 'encodings', 'encodings.*'] + pexe['includes'] = ['sip', 'PyQt4'] # 'encodings'] # , 'encodings.*'] # SSL currently not in use but imported by socket - pexe['excludes'] = ['_ssl', 'win32pipe', 'win32evtlog', 'win32file', 'win32api'] - # added by logging.handlers.SMTPHandler but not yet required - pexe['excludes'].append('smtplib') + # mail stuff added by logging.handlers.SMTPHandler + pexe['excludes'] = ['_ssl', 'doctest', 'smtplib', 'email'] + # no need for win32 so far + pexe['excludes'].extend(['win32pipe', 'win32evtlog', 'win32file', 'win32api', + 'win32con', 'winerror']) # UPX pexe['upx'] = True pexe['upx_args'] = '--mono --best' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-31 14:46:59
|
Revision: 108 http://pymoul.svn.sourceforge.net/pymoul/?rev=108&view=rev Author: tiran Date: 2007-01-31 06:46:54 -0800 (Wed, 31 Jan 2007) Log Message: ----------- propset fix Modified Paths: -------------- pymoul/trunk/INSTALL.txt pymoul/trunk/compileui.py pymoul/trunk/setup.py pymoul/trunk/setup_win32.py Property Changed: ---------------- pymoul/trunk/AUTHORS.txt pymoul/trunk/GPL.txt pymoul/trunk/INSTALL.txt pymoul/trunk/README.txt pymoul/trunk/compileui.py pymoul/trunk/contrib/build_exe.py pymoul/trunk/distutils_iss.py pymoul/trunk/distutils_upx.py pymoul/trunk/doc/TODO.txt pymoul/trunk/ez_setup.py pymoul/trunk/setup.py pymoul/trunk/setup_win32.py pymoul/trunk/src/moul/__init__.py pymoul/trunk/src/moul/cli/__init__.py pymoul/trunk/src/moul/cli/moullauncher.py pymoul/trunk/src/moul/config/__init__.py pymoul/trunk/src/moul/config/generic.py pymoul/trunk/src/moul/crypt/__init__.py pymoul/trunk/src/moul/crypt/elf.py pymoul/trunk/src/moul/crypt/whatdoyousee.py pymoul/trunk/src/moul/crypt/xtea.py pymoul/trunk/src/moul/file/__init__.py pymoul/trunk/src/moul/file/chatlog.py pymoul/trunk/src/moul/file/kiimage.py pymoul/trunk/src/moul/file/localization.py pymoul/trunk/src/moul/file/plasmalog.py pymoul/trunk/src/moul/file/wdysini.py pymoul/trunk/src/moul/log.py pymoul/trunk/src/moul/metadata.py pymoul/trunk/src/moul/qt/__init__.py pymoul/trunk/src/moul/qt/moulqt.py pymoul/trunk/src/moul/qt/ui/__init__.py pymoul/trunk/src/moul/qt/ui/mainwindow.py pymoul/trunk/src/moul/qt/ui/moulqt_rc.py pymoul/trunk/src/moul/time/__init__.py pymoul/trunk/src/moul/time/cavern.py pymoul/trunk/src/moul/time/dni.py pymoul/trunk/test.py pymoul/trunk/version.txt Property changes on: pymoul/trunk/AUTHORS.txt ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Property changes on: pymoul/trunk/GPL.txt ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Modified: pymoul/trunk/INSTALL.txt =================================================================== --- pymoul/trunk/INSTALL.txt 2007-01-31 14:41:17 UTC (rev 107) +++ pymoul/trunk/INSTALL.txt 2007-01-31 14:46:54 UTC (rev 108) @@ -5,7 +5,7 @@ * Python 2.5.x http://www.python.org/ * easy_install http://peak.telecommunity.com/DevCenter/EasyInstall * setuptools (via easy install) - * PyTz (via $ easy_install-2.5 pytz) + * PyTz (via $ easy_install-2.5 -Z pytz) * Qt4 GPL 4.2+ http://www.trolltech.com/developer/downloads/qt/ * PyQt4 4.1.1+ http://www.riverbankcomputing.co.uk/pyqt/ Property changes on: pymoul/trunk/INSTALL.txt ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Property changes on: pymoul/trunk/README.txt ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Modified: pymoul/trunk/compileui.py =================================================================== --- pymoul/trunk/compileui.py 2007-01-31 14:41:17 UTC (rev 107) +++ pymoul/trunk/compileui.py 2007-01-31 14:46:54 UTC (rev 108) @@ -3,7 +3,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision: 45 $" +__revision__ = "$Revision$" import os import re Property changes on: pymoul/trunk/compileui.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Name: eol-style - native Name: svn:executable + * Property changes on: pymoul/trunk/contrib/build_exe.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/distutils_iss.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Property changes on: pymoul/trunk/distutils_upx.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Property changes on: pymoul/trunk/doc/TODO.txt ___________________________________________________________________ Name: svn:keywords + Id Revision Property changes on: pymoul/trunk/ez_setup.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Name: eol-style - native Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-01-31 14:41:17 UTC (rev 107) +++ pymoul/trunk/setup.py 2007-01-31 14:46:54 UTC (rev 108) @@ -5,7 +5,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision: 58 $" +__revision__ = "$Revision$" import sys import os @@ -57,7 +57,7 @@ setup_options = dict( setup_requires = ["setuptools>="+SETUPTOOLS_VERSION,], - install_requires = [], + install_requires = ["pytz>=2006p",], data_files = [ ('docs', list(glob('*.txt'))), ('i18', list(glob('src/moul/qt/i18n/pymoul_*.*'))), Property changes on: pymoul/trunk/setup.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Name: eol-style - native Modified: pymoul/trunk/setup_win32.py =================================================================== --- pymoul/trunk/setup_win32.py 2007-01-31 14:41:17 UTC (rev 107) +++ pymoul/trunk/setup_win32.py 2007-01-31 14:46:54 UTC (rev 108) @@ -2,7 +2,7 @@ """ __author__ = "Christian Heimes" __version__ = "$Id$" -__revision__ = "$Revision: 86 $" +__revision__ = "$Revision$" import os import sys Property changes on: pymoul/trunk/setup_win32.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Name: eol-style - native Property changes on: pymoul/trunk/src/moul/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/cli/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/cli/moullauncher.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/config/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/config/generic.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/crypt/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/crypt/elf.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/crypt/whatdoyousee.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/crypt/xtea.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/chatlog.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/kiimage.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/localization.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/plasmalog.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/file/wdysini.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/log.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/metadata.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/qt/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/qt/moulqt.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/qt/ui/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/qt/ui/mainwindow.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/qt/ui/moulqt_rc.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/time/__init__.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/time/cavern.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/src/moul/time/dni.py ___________________________________________________________________ Name: eol-style - native Property changes on: pymoul/trunk/test.py ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision Property changes on: pymoul/trunk/version.txt ___________________________________________________________________ Name: svn:keywords - Id Revisioni + Id Revision This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-31 14:58:01
|
Revision: 109 http://pymoul.svn.sourceforge.net/pymoul/?rev=109&view=rev Author: tiran Date: 2007-01-31 06:57:57 -0800 (Wed, 31 Jan 2007) Log Message: ----------- Two small fixes to make unit tests work again Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/time/cavern.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-31 14:46:54 UTC (rev 108) +++ pymoul/trunk/Makefile.in 2007-01-31 14:57:57 UTC (rev 109) @@ -38,10 +38,10 @@ ui: $(PYTHON) compileui.py -test_build: build compileui +test_build: build ui PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) -test_inplace: compileui +test_inplace: ui PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) doc_html: Modified: pymoul/trunk/src/moul/time/cavern.py =================================================================== --- pymoul/trunk/src/moul/time/cavern.py 2007-01-31 14:46:54 UTC (rev 108) +++ pymoul/trunk/src/moul/time/cavern.py 2007-01-31 14:57:57 UTC (rev 109) @@ -25,6 +25,12 @@ from datetime import datetime +# pytz is an egg +from moul.osdependent import __FROZEN__ +if not __FROZEN__: + import pkg_resources + pkg_resources.require("pytz>=2006p") + #from pytz import common_timezones from pytz import all_timezones from pytz import timezone This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-01-31 15:40:57
|
Revision: 110 http://pymoul.svn.sourceforge.net/pymoul/?rev=110&view=rev Author: tiran Date: 2007-01-31 07:40:51 -0800 (Wed, 31 Jan 2007) Log Message: ----------- Small doc string adjustments to make epydoc happy Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/genepydoc.py pymoul/trunk/src/moul/file/wdysini.py pymoul/trunk/src/moul/osdependent/processinfo.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/moulqt.py pymoul/trunk/src/moul/time/cavern.py pymoul/trunk/src/moul/time/dni.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/Makefile.in 2007-01-31 15:40:51 UTC (rev 110) @@ -45,8 +45,14 @@ PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) doc_html: - PYTHONPATH="src" $(EPYDOC) -v --html --output="doc/html" moul + PYTHONPATH="src" $(EPYDOC) -v --html --no-sourcecode \ + --output="doc/html" moul +doc_html_graph: + PYTHONPATH="src" $(EPYDOC) -v --html --no-sourcecode --graph=all \ + --output="doc/html" moul + + # What should the default be? test: test_inplace Modified: pymoul/trunk/genepydoc.py =================================================================== --- pymoul/trunk/genepydoc.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/genepydoc.py 2007-01-31 15:40:51 UTC (rev 110) @@ -8,13 +8,13 @@ #from epydoc.docstringparser import register_field_handler STANDARD_FIELDS.append( - DocstringField(['slots', 'qtslots'], 'Qt Slot: %s', 'Qt Slots: %s', + DocstringField(['slot', 'qtslot'], 'Qt Slot', 'Qt Slots', short=False, multivalue=True, takes_arg=True) ) STANDARD_FIELDS.append( - DocstringField(['signal', 'qtsignal'], 'Emits Qt Signal: %s', - 'Emit Qt Signals: %s', short=False, multivalue=True, + DocstringField(['signal', 'qtsignal'], 'Emits Qt Signal', + 'Emit Qt Signals', short=False, multivalue=True, takes_arg=True) ) Modified: pymoul/trunk/src/moul/file/wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/wdysini.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/file/wdysini.py 2007-01-31 15:40:51 UTC (rev 110) @@ -347,8 +347,10 @@ up, the new data is written to another file and at last the original file is replaced with the new file. - WINDOWS: os.rename() can't replace the file in place under Windows. - The final operation is not atomic. :( + WINDOWS + ------- + os.rename() can't replace the file in place under Windows. The final + operation is not atomic. :( """ orig = self._fpath if orig is None: @@ -382,7 +384,8 @@ def parseString(self, s): """Parse string with file contents - @param s newline seperated file (string) + @param s: newline seperated file + @type s: string """ self.clear() lines = s.split('\n') Modified: pymoul/trunk/src/moul/osdependent/processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/osdependent/processinfo.py 2007-01-31 15:40:51 UTC (rev 110) @@ -17,11 +17,12 @@ # """Get process informations -API: - getPids() - list of ints/longs - getPidNames() - mapping pid -> name - getPidDetails(pid) - detailed informations about a process - getPidDetails('self') - detailed informations about current process +API +=== + getPids() - list of ints/longs + getPidNames() - mapping pid -> name + getPidDetails(pid) - detailed informations about a process + getPidDetails('self') - detailed informations about current process >>> cur = os.getpid() >>> exe = sys.executable Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-01-31 15:40:51 UTC (rev 110) @@ -17,10 +17,9 @@ # """Simple single instance application -Includes portalocker code with minor tweaks for Python 2.4+ - Author: Jonathan Feinberg <jd...@po...> - Version: $Id$ - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 +Includes portalocker code with minor tweaks for Python 2.4+ from +Jonathan Feinberg <jd...@po...> +http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65203 Unit tests for lock/unlock are in tests/test_singleapp @@ -38,6 +37,7 @@ >>> singleapp.release() >>> os.path.isfile(lckfile) False + """ __author__ = "Christian Heimes" __version__ = "$Id$" Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-01-31 15:40:51 UTC (rev 110) @@ -95,6 +95,9 @@ @signalLogDecorator(LOG) def on_moulIsRunning(self, boolean): + """ + @qtslot moulIsRunning(bool): notify if moul is running + """ sb = self.statusbar boolean = bool(boolean) if boolean is not self._moulrunning: @@ -125,7 +128,9 @@ """ Close event handler - @param event close event (QCloseEvent) + @qtslot closeEvent(event QCloseEvent): notify on close + @param event: close event + @type event: QCloseEvent instance """ #if self._dirty: # event.reject() @@ -137,9 +142,11 @@ def keyPressEvent(self, event): """ Key event handler - - @param event key event (QKeyEvent) - + + @qtslot keyPressEvent(event QKeyEvent): notify on key pressed + @param event: key event + @type event: QKeyEvent + Has to ignore unknown events """ #if event.key() == Qt.Key_Escape: @@ -189,7 +196,7 @@ @signalLogDecorator(LOG) def on_graphicsini_loaded(self): """ - SIGNAL graphicsini_loaded() + @qtslot graphicsini_loaded(): notify when a graphics.ini is loaded """ inipath = lookupDir('ini') self._graphics_ini = gini = GraphicsIni() Modified: pymoul/trunk/src/moul/qt/moulqt.py =================================================================== --- pymoul/trunk/src/moul/qt/moulqt.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/qt/moulqt.py 2007-01-31 15:40:51 UTC (rev 110) @@ -41,13 +41,13 @@ """Main application Flow diagram: - * create app - * check if other instance of pymoulqt is running - o exit app if another instance is running - * create log file handler - * check if URU is running - o exit if URU is running - * Show the main window + - create app + - check if other instance of pymoulqt is running + - exit app if another instance is running + - create log file handler + - check if URU is running + - exit if URU is running + - Show the main window """ LOG.info("Starting PyMoul QT UI with argv %s" % repr(args)) app = QtGui.QApplication(*args) Modified: pymoul/trunk/src/moul/time/cavern.py =================================================================== --- pymoul/trunk/src/moul/time/cavern.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/time/cavern.py 2007-01-31 15:40:51 UTC (rev 110) @@ -117,14 +117,14 @@ zone. Call a CavernTime object: utc - datetime -- Current time in UTC as <datetime> object + - datetime -- Current time in UTC as <datetime> object cavern, pacific - datetime -- current time TZ as <datetime> object - tz -- time zone object - dst -- dst in seconds if dst - utcoffset -- (signum, hours, fraction) offset from UTC - name -- long time like US/Mountain - id -- short name like MST + - datetime -- current time TZ as <datetime> object + - tz -- time zone object + - dst -- dst in seconds if dst + - utcoffset -- (signum, hours, fraction) offset from UTC + - name -- long time like US/Mountain + - id -- short name like MST >>> ct = CavernTime() >>> result = ct() Modified: pymoul/trunk/src/moul/time/dni.py =================================================================== --- pymoul/trunk/src/moul/time/dni.py 2007-01-31 14:57:57 UTC (rev 109) +++ pymoul/trunk/src/moul/time/dni.py 2007-01-31 15:40:51 UTC (rev 110) @@ -67,28 +67,28 @@ The DniTime class assumes the following rules: - * Hahrtee Farah 1 started on 21st of April 7656 B.C. - * Hahrtee Fahrah 15 started 1719 A.C. - * A new hahr starts on 21st of April. - * The reference time for the calculation is Mountain Standard Time (MST) - without (!) DST. The UTC offset is always UTC-7. - * To compensate leap years a new hahr starts on midnight (0:00am) in every - forth year (year % 4 == 0). - * To simplify the code special cases like year % 100 and year % 400 are - NOT taken into account. I'm assuming a year has 365,25 days (which is - wrong). A year according to the Gregorian Calendar has 365,2425 days. + - Hahrtee Farah 1 started on 21st of April 7656 B.C. + - Hahrtee Fahrah 15 started 1719 A.C. + - A new hahr starts on 21st of April. + - The reference time for the calculation is Mountain Standard Time (MST) + without (!) DST. The UTC offset is always UTC-7. + - To compensate leap years a new hahr starts on midnight (0:00am) in every + forth year (year % 4 == 0). + - To simplify the code special cases like year % 100 and year % 400 are + NOT taken into account. I'm assuming a year has 365,25 days (which is + wrong). A year according to the Gregorian Calendar has 365,2425 days. Overview - --------- + -------- - fahrah millenium 625 years - hahr year 1 year - vailee month 10 per year - yahr day 29 per vailee, about 30h 14min - gahrtahvo section about 6h, 3min - tahvo quarter about 14,5min - gorahn minute 36 seconds - prorahn second about 1.3929 seconds + fahrah millenium 625 years + hahr year 1 year + vailee month 10 per year + yahr day 29 per vailee, about 30h 14min + gahrtahvo section about 6h, 3min + tahvo quarter about 14,5min + gorahn minute 36 seconds + prorahn second about 1.3929 seconds """ _fahrah = None # millenium (625 years) _hahr = None # year (1 year) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-01 00:05:40
|
Revision: 111 http://pymoul.svn.sourceforge.net/pymoul/?rev=111&view=rev Author: tiran Date: 2007-01-31 16:05:40 -0800 (Wed, 31 Jan 2007) Log Message: ----------- Added some informations and donate link to README.txt Modified Paths: -------------- pymoul/trunk/README.txt pymoul/trunk/src/moul/file/tests/test_wdysini.py pymoul/trunk/src/moul/file/wdysini.py pymoul/trunk/src/moul/qt/mainwindow.py Added Paths: ----------- pymoul/trunk/src/moul/file/directories.py Modified: pymoul/trunk/README.txt =================================================================== --- pymoul/trunk/README.txt 2007-01-31 15:40:51 UTC (rev 110) +++ pymoul/trunk/README.txt 2007-02-01 00:05:40 UTC (rev 111) @@ -0,0 +1,19 @@ +========================================= +Python library for Myst Online : Uru Live +========================================= + +About +===== + +pyMoul is a set of Python libraries around MOUL (Myst Online : Uru Live). At +the moment the main focus is on the Qt4 based graphical tool. + +Donate +====== + +If you like the tool and find it usful please donate some money. You can +use the link below to send me money over PayPal. You don't need a PayPal +account. A credit card or bank account is sufficient. + +https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=christian%40cheimes%2ede&item_name=Donate%20for%20Tiran%27s%20open%20source%20activities&page_style=PayPal&no_shipping=2&cn=Your%20note%20for%20me&tax=0¤cy_code=EUR&lc=DE&bn=PP%2dDonationsBF&charset=UTF%2d8 + Added: pymoul/trunk/src/moul/file/directories.py =================================================================== --- pymoul/trunk/src/moul/file/directories.py (rev 0) +++ pymoul/trunk/src/moul/file/directories.py 2007-02-01 00:05:40 UTC (rev 111) @@ -0,0 +1,78 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +"""Directories: Uru game directory and Uru personal data directory +""" +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + +import os + +from moul.log import getLogger +from moul.file.chatlog import ChatlogMover +from moul.file.chatlog import ChatlogDirectoryView +from moul.file.plasmalog import PlasmalogZipper +from moul.file.kiimage import KIImageFixer + +LOG = getLogger('moul.file.directory') + +class AbstractUruDirectory(object): + """Abstract class for an Uru directory + """ + _dirmapping = {} + + def __init__(self, basedir): + self._basedir = basedir + + def exists(self): + return os.path.isdir(self._basedir) + + def get(self, name): + path = self._dirmapping(name) + return os.path.join(self._basedir, path) + +class UruGameDataDirectory(AbstractUruDirectory): + """Uru game directory handler + + An uru game directory contains the launcher, explorer, age files, sound + files, localizations and other stuff. + """ + _dirmapping = { + 'loc' : 'dat', + 'dat' : 'dat', + 'sound' : 'sfx' + 'soundwav' : 'sfx' + os.sep + 'streamingCache', + 'video' : 'avi', + } + +class UruPersonalDataDirectory(AbstractUruDirectory): + """Uru personal data handler + + An uru personal data directory contains per user data like audio and + graphics settings, KI shots, avatar images, logs and pyMoul specific + data. + """ + _dirmapping = { + 'log' : 'Log', + 'kiimages' : 'KIimages', + 'avatars' : 'Avatars', + 'ini' : 'init', + 'chatlogs' : 'Chatlogs', + 'zipped' : 'ZippedLogs', + } + Modified: pymoul/trunk/src/moul/file/tests/test_wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-01-31 15:40:51 UTC (rev 110) +++ pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-02-01 00:05:40 UTC (rev 111) @@ -26,6 +26,8 @@ from StringIO import StringIO import unittest from doctest import DocTestSuite +from tempfile import mkdtemp +import shutil from moul.crypt.whatdoyousee import decryptWDYS from moul.file.wdysini import AudioIni @@ -45,12 +47,14 @@ def setUp(self): self.enc_fd = open(self.enc, 'rb') self.dec_fd = open(self.dec, 'r') - self.parser = self.parserClass() - + self.tmpdir = mkdtemp() + shutil.copy(self.enc, self.tmpdir) + def tearDown(self): self.enc_fd.close() self.dec_fd.close() - + shutil.rmtree(self.tmpdir) + def _compareLines(self, first, second): flines = first.split('\n') slines = second.split('\n') @@ -58,39 +62,58 @@ self.failUnlessEqual(fline, slines[i]) def test_parseString(self): - p = self.parser + p = self.parserClass(self.tmpdir) data = self.dec_fd.read() - p.parseString(data) + p._parseString(data) self.failUnless(p._filedata) self.failIf(p.isChanged()) - newdata = p.writeString() + self.failUnless(p.exists()) + newdata = p._writeString() self._compareLines(data, newdata) def test_chars(self): + p = self.parserClass(self.tmpdir) valid = string.ascii_letters + '_. ' data = self.dec_fd.read() - self.parser.parseString(data) - for key in self.parser._filedata: + p._parseString(data) + for key in p._filedata: for s in key: self.failUnless(s in valid, s) def test_cryptparse(self): - p = self.parser + p = self.parserClass(self.tmpdir) data = self.dec_fd.read() - p.parseEncFile(self.enc) - newdata = p.writeString() + p._parseEncFile(self.enc) + newdata = p._writeString() self._compareLines(data, newdata) fdout = StringIO() - p.writeEncFile(fdout) - + p._writeEncFile(fdout) + # round trip fdout.seek(0) encdata = decryptWDYS(fdout) - p.parseString(encdata) - newdata = p.writeString() + p._parseString(encdata) + newdata = p._writeString() self._compareLines(data, newdata) - - + + def test_publicapi_read(self): + p = self.parserClass(self.tmpdir) + p.read() + self.failUnless(p.exists()) + p.write() + # TODO: more + + def test_publicapi_create(self): + inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) + os.unlink(inipath) + p = self.parserClass(self.tmpdir) + self.failIf(p.exists()) + p.create() + self.failUnless(p.exists()) + p.write() + self.failUnless(p.exists()) + # TODO: more + class AudioIniTest(GenericIniTest): enc = aud_enc dec = aud_dec @@ -102,10 +125,10 @@ parserClass = GraphicsIni def test_properties(self): - p = self.parser + p = self.parserClass(self.tmpdir) eq = self.failUnlessEqual - p.parseEncFile(self.enc) + p.read() eq(p.screenres, 1) eq(p.windowed, True) eq(p.antialias, 2) @@ -116,10 +139,10 @@ eq(p.vsync, False) def test_property_edit(self): - p = self.parser + p = self.parserClass(self.tmpdir) eq = self.failUnlessEqual - p.parseEncFile(self.enc) + p.read() self.failIf(p.isChanged()) p.vsync = True Modified: pymoul/trunk/src/moul/file/wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/wdysini.py 2007-01-31 15:40:51 UTC (rev 110) +++ pymoul/trunk/src/moul/file/wdysini.py 2007-02-01 00:05:40 UTC (rev 111) @@ -307,46 +307,75 @@ class ConfFile(object): _options = {} + _defaults = {} _filename = None - def __init__(self): + def __init__(self, path): + if not os.path.isdir(path): + raise OSError("Directory not found %s" % path) + self._fpath = os.path.join(path, self._filename) self._filedata = {} self._newdata = {} self._order = [] - self._fpath = None - + self._opened = False + def clear(self): """Clear all informations """ self._filedata.clear() self._newdata.clear() self._order[:] = [] - + def reset(self): """Reset state of the ini parser - + Copies file data to new data """ self._newdata.clear() self._newdata.update(self._filedata.copy()) - - def open(self, path): - """Open encrypted file at 'path' + + def exists(self): + """Test if the file exists """ - if self._fpath is not None: + return os.path.isfile(self._fpath) + + def isChanged(self): + """Check if the data was changed + """ + for key, value in self._filedata.items(): + if value != self._newdata[key]: + return True + return False + + def read(self): + """Open encrypted file at 'path' and parse its data + """ + if self._opened: raise ValueError("File already open") - if not os.path.isdir(path): - raise OSError("Directory not found %s" % path) - self._fpath = os.path.join(path, self._filename) - self.parseEncFile(self._fpath) - + self._opened = True + self._parseEncFile(self._fpath) + + def create(self): + """Create a new file using default values + """ + if self._opened: + raise ValueError("File already open") + # Create a dummy file + fd = open(self._fpath, 'w') + fd.write("Created by pyMoul") + fd.close() + self._opened = True + for key, value in self._defaults.items(): + self._filedata[key] = value + self.reset() + def write(self): """Write data to file - + The write method uses the savest way possible. The old file is backed up, the new data is written to another file and at last the original file is replaced with the new file. - + WINDOWS ------- os.rename() can't replace the file in place under Windows. The final @@ -355,17 +384,19 @@ orig = self._fpath if orig is None: raise ValueError("Full path not set") + if not self._opened: + raise ValueError("File not opened") bak = orig + ".bak" new = orig + ".new" shutil.copyfile(orig, bak) # make backup - self.writeEncFile(new) # write new + self._writeEncFile(new) # write new os.unlink(orig) # stupid windows can't perform an atomic rename os.rename(new, orig) # move new to orig - + # reread the file again - self.parseEncFile(self._fpath) - - def parseEncFile(self, fd_name): + self._parseEncFile(self._fpath) + + def _parseEncFile(self, fd_name): """Read and parse file (fd or file name) """ self.clear() @@ -379,9 +410,9 @@ data = decryptWDYS(fd) if close: fd.close() - self.parseString(data) - - def parseString(self, s): + self._parseString(data) + + def _parseString(self, s): """Parse string with file contents @param s: newline seperated file @@ -414,22 +445,14 @@ raise ValueError(line) self.reset() - self.parserDoneHook() + self._parserDoneHook() - def parserDoneHook(self): + def _parserDoneHook(self): """Hook called after the data is read and parsed """ pass - - def isChanged(self): - """Check if the data was changed - """ - for key, value in self._filedata.items(): - if value != self._newdata[key]: - return True - return False - - def writeString(self): + + def _writeString(self): """Create a string with new file contents """ out = [] @@ -448,7 +471,7 @@ out.append('') # new line at EOF return '\n'.join(out) - def writeEncFile(self, fd_name): + def _writeEncFile(self, fd_name): """Write file (fd or file name) """ if isinstance(fd_name, basestring): @@ -457,7 +480,7 @@ else: fd = fd_name close = False - data = self.writeString() + data = self._writeString() encryptWDYS(data, fd) if close: fd.close() @@ -508,9 +531,23 @@ 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui # microphon missing -> OS mixer } + _defaults = { + 'Audio.Initialize' : BoolString(True), + 'Audio.UseEAX' : BoolString(False), + 'Audio.SetPriorityCutoff' : 6, + 'Audio.MuteAll' : 0, # 0, 1 + 'Audio.SetChannelVolume SoundFX' : FloatString(1.0), + 'Audio.SetChannelVolume BgndMusic' : FloatString(1.0), + 'Audio.SetChannelVolume Ambience' : FloatString(1.0), + 'Audio.SetChannelVolume NPCVoice' : FloatString(1.0), + 'Audio.EnableVoiceRecording' : 1, + 'Audio.SetDeviceName' : QuotedString('"Generic Software"'), + 'Audio.SetChannelVolume GUI' : FloatString(1.0), + # microphon missing -> OS mixer + } _devices = ['"Generic Software"', '"Generic Hardware"'] # plus maybe a custom OpenAL v1.1 device - + def parserDoneHook(self): """Hook called after the data is read and parsed """ @@ -596,7 +633,21 @@ 'Graphics.EnableVSync' : (BoolString, Constrain()), # true/false 'Graphics.Shadow.VisibleDistance' : (FloatString, MinMax(0.0, 1.0)), # 0-1, 0-100% } - + _defaults = { + 'Graphics.Width' : 800, + 'Graphics.Height' : 600, + 'Graphics.ColorDepth' : 32, + 'Graphics.Windowed' : BoolString(False), + 'Graphics.AntiAliasAmount' : 0, + 'Graphics.AnisotropicLevel' : 1, + 'Graphics.TextureQuality' : 1, + 'Quality.Level' : 2, + 'Graphics.Shadow.Enable' : 1, + 'Graphics.EnablePlanarReflections' : 1, + 'Graphics.EnableVSync' : BoolString(False), + 'Graphics.Shadow.VisibleDistance' : FloatString(0.337126016617), + } + def _getScreenRes(self): w = self._newdata['Graphics.Width'] h = self._newdata['Graphics.Height'] Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-01-31 15:40:51 UTC (rev 110) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-01 00:05:40 UTC (rev 111) @@ -199,9 +199,9 @@ @qtslot graphicsini_loaded(): notify when a graphics.ini is loaded """ inipath = lookupDir('ini') - self._graphics_ini = gini = GraphicsIni() + self._graphics_ini = gini = GraphicsIni(inipath) try: - gini.open(inipath) + gini.read() except Exception, msg: LOG.exception("Something bad happened while parsing the graphics.ini file") QtGui.QMessageBox.critical(None, @@ -349,9 +349,9 @@ SIGNAL: audioini_loaded() """ inipath = lookupDir('ini') - self._audio_ini = aini = AudioIni() + self._audio_ini = aini = AudioIni(inipath) try: - aini.open(inipath) + aini.read() except Exception, msg: LOG.exception("Something bad happened while parsing the audio.ini file") QtGui.QMessageBox.critical(None, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-02 14:38:56
|
Revision: 119 http://pymoul.svn.sourceforge.net/pymoul/?rev=119&view=rev Author: tiran Date: 2007-02-02 06:38:56 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Added simple progress bar. Use it in the loc loader screen Modified Paths: -------------- pymoul/trunk/doc/TODO.txt pymoul/trunk/src/moul/qt/errorhandler.py pymoul/trunk/src/moul/qt/localization.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/threadlet.py Added Paths: ----------- pymoul/trunk/src/moul/qt/simpleprogressbar.py pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py pymoul/trunk/src/moul/qt/ui/simpleprogressbar.ui Modified: pymoul/trunk/doc/TODO.txt =================================================================== --- pymoul/trunk/doc/TODO.txt 2007-02-02 12:35:40 UTC (rev 118) +++ pymoul/trunk/doc/TODO.txt 2007-02-02 14:38:56 UTC (rev 119) @@ -12,3 +12,7 @@ * complete chatlog viewer * more checks and exceptions! Never fail silentely * update readme.txt + * connect QThread.terminate() slots with its parents close/destroy signal + handler + * clean documents/journal/localization naming + Modified: pymoul/trunk/src/moul/qt/errorhandler.py =================================================================== --- pymoul/trunk/src/moul/qt/errorhandler.py 2007-02-02 12:35:40 UTC (rev 118) +++ pymoul/trunk/src/moul/qt/errorhandler.py 2007-02-02 14:38:56 UTC (rev 119) @@ -38,8 +38,6 @@ LOG = getLogger('moul.qt.error') -def trUtf8(s): - return s def qtexcepthook(typ, value, traceback): """ @@ -49,8 +47,10 @@ LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) return # XXX: remove try: - title = trUtf8("An unhandled error has occured") - msg = (trUtf8("Please report the error:\n\n") + + title= QtGui.QApplication.translate("excepthook", + "An unhandled error has occured", + None, QtGui.QApplication.UnicodeUTF8) + msg = ("Please report the error:\n\n" + '\n'.join([line.strip() for line in format_exception(typ, value, traceback)]) ) @@ -111,7 +111,7 @@ """ Info message box """ - mb = _mkMessageBox(context, icon='Info') + mb = _mkMessageBox(context, icon='Information') mb.setStandardButtons(QtGui.QMessageBox.Ok) mb.setWindowTitle(title) mb.setText(text) Modified: pymoul/trunk/src/moul/qt/localization.py =================================================================== --- pymoul/trunk/src/moul/qt/localization.py 2007-02-02 12:35:40 UTC (rev 118) +++ pymoul/trunk/src/moul/qt/localization.py 2007-02-02 14:38:56 UTC (rev 119) @@ -37,6 +37,7 @@ from moul.log import getLogger from moul.log import signalLogDecorator from moul.qt.threadlet import Threadlet +from moul.qt.simpleprogressbar import SimpleProgressbar LOG = getLogger('moul.loc') @@ -49,10 +50,43 @@ Mixin for documentation tab """ def _documents_init(self): - installDir = lookupDir('install') + """ + @qtsignal loadLocalization(): load loc data + """ + self._journals_loaded = False + self.connect(self, SIGNAL('loadLocalization()'), + self.on_localization_doload) + self.cb_doc_language.addItems(insertDummyQ([])) + self.cb_doc_language_eventFilter = LocalizationLoadEventFilter(self) + self.cb_doc_language.installEventFilter(self.cb_doc_language_eventFilter) + + @signalLogDecorator(LOG) + def on_localization_doload(self): + """ + @qtslot loadLocalization(): Load localization + @qtsignal finished(): self._journal_threadlet + """ + if self.cb_doc_language_eventFilter: + self.cb_doc_language.removeEventFilter( + self.cb_doc_language_eventFilter + ) + self.cb_doc_language_eventFilter = None + + if self._journals_loaded: + return + + # TODO: other message box + self._journal_progressbar = SimpleProgressbar(self) + self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) + self._journal_progressbar.setProgressbar(0, 1, 0) + self._journal_progressbar.show() + + installDir = lookupDir('install') self._gamedir = UruGameDataDirectory(installDir) if not self._gamedir.exists('loc'): + self.tab_sub_journals.setEnabled(False) return + self._journal_threadlet = Threadlet() self.connect(self._journal_threadlet, SIGNAL('finished()'), self.on_localization_loaded) @@ -60,8 +94,20 @@ @signalLogDecorator(LOG) def on_localization_loaded(self): - self.tab_sub_journals.setEnabled(True) + """ + @qtslot finished(): self._journal_threadlet + """ + # remove thread + self.disconnect(self._journal_threadlet, SIGNAL('finished()'), + self.on_localization_loaded) + del self._journal_threadlet + # close and remove info message box + self._journal_progressbar.setValue(1) + self._journal_progressbar.close() + del self._journal_progressbar + self._journals_loaded = True + self._documents_state = {} self.connect(self.cb_doc_language, SIGNAL("currentIndexChanged(int)"), @@ -72,9 +118,9 @@ self.on_cb_doc_set_currentIndexChanged) #self.connect(self.cb_doc_element, SIGNAL("currentIndexChanged(int)"), # self.on_cb_doc_element_currentIndexChanged) - languages = sorted(tr.languages()) self._documents_state['languages'] = languages + self.cb_doc_language.clear() self.cb_doc_language.addItems(insertDummyQ(languages)) self.cb_doc_language.setCurrentIndex(0) @@ -140,5 +186,17 @@ translation = tr[(lang, age, set, element)] qstr = QtCore.QString(translation) self.te_doc_view.setPlainText(qstr) - self.te_doc_view.setEnabled(True) - + self.te_doc_view.setEnabled(True) + +class LocalizationLoadEventFilter(QtCore.QObject): + """Event filter to load localization + """ + def eventFilter(self, target, event): + """ + Event filter + """ + if event.type() in (QtCore.QEvent.MouseButtonPress, + QtCore.QEvent.FocusIn): + self.parent().emit(SIGNAL('loadLocalization()')) + + return QtCore.QObject.eventFilter(self, target, event) Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-02 12:35:40 UTC (rev 118) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-02 14:38:56 UTC (rev 119) @@ -63,7 +63,6 @@ # dirty flag: unsaved changes self._dirty = False self.setDirty(False) - self.tab_sub_journals.setEnabled(False) # init handlers self._timezone_init() @@ -80,7 +79,7 @@ self.connect(self._moulrunning_thread, SIGNAL('moulIsRunning(bool)'), self.on_moulIsRunning) self._moulrunning_thread.startChecker(5.0) # check now and every 5 seconds - + @signalLogDecorator(LOG) def on_moulIsRunning(self, boolean): """ Added: pymoul/trunk/src/moul/qt/simpleprogressbar.py =================================================================== --- pymoul/trunk/src/moul/qt/simpleprogressbar.py (rev 0) +++ pymoul/trunk/src/moul/qt/simpleprogressbar.py 2007-02-02 14:38:56 UTC (rev 119) @@ -0,0 +1,69 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +"""Moul QT GUI main windows +""" +__author__ = "Christian Heimes" +__version__ = "$Id: mainwindow.py 116 2007-02-02 03:32:28Z tiran $" +__revision__ = "$Revision: 116 $" + +__all__ = ['SimpleProgressbar'] + +from PyQt4 import QtGui +from PyQt4.QtCore import pyqtSignature + +from moul.qt.ui.simpleprogressbar import Ui_SimpleProgressbar + +class SimpleProgressbar(QtGui.QDialog, Ui_SimpleProgressbar): + """A simple progress bar dialog + + >>> bar = SimpleProgressbar() + >>> bar.setWindowTitle(bar.trUtf8('a bar')) + >>> bar.setProgressbar(0, 100, 20) + >>> bar.setValue(50) + """ + + def __init__(self, parent=None): + QtGui.QDialog.__init__(self, parent) + self.setupUi(self) + + def setProgressbar(self, minval, maxval, value=None): + """Set progress bar min, max and initial value + + @param minval: minimum value + @type minval: int + @param maxval: maximum value + @type maxval: int + @param value: initial value (set to minval if value is None) + @type value: int, None + """ + if value is None: + value = minval + self.progressbar.setMinimum(minval) + self.progressbar.setMaximum(maxval) + self.progressbar.setValue(value) + + @pyqtSignature("int") + def setValue(self, value): + """Set value of progress bar + + @qtslot setValue(int): set value of progress bar + @param value: current value of the progress bar + @type value: int + """ + return self.progressbar.setValue(value) Modified: pymoul/trunk/src/moul/qt/threadlet.py =================================================================== --- pymoul/trunk/src/moul/qt/threadlet.py 2007-02-02 12:35:40 UTC (rev 118) +++ pymoul/trunk/src/moul/qt/threadlet.py 2007-02-02 14:38:56 UTC (rev 119) @@ -36,34 +36,53 @@ Use this class to run a CPU or I/O bound function in a seperate thread. - @signal started(): Signal is emitted when the thread starts executing. - @signal finished(): Signal is emitted when the thread has finished. - @signal terminated(): Signal is emitted when the thread is terminated. - @signal done(result): Signal is emitted when the function has returned. - The result argument contains the return value of the function. - + >>> def pow(x, y): return x**y >>> def printer(r): print r - >>> example =Threadlet() - >>> connect(example, SIGNAL('done(result)'), printer) - >>> example.detach(pow, 2, 6) - - started() - done(result) - finished() - - @warning: The function and all applied arguments must be reentrant or - thread safe! + >>> parent.example = Threadlet() + >>> parent.connect(parent.example, SIGNAL('done(result)'), printer) + >>> parent.example.detach(pow, 2, 6) + + Signals emitted: + - started() + - done(result) + - finished() + + You should disconnect all signals after the threadlet has finished + >>> parent.disconnect(parent.example, SIGNAL('done(result)')) + >>> del parent.example + + @qtsignal started(): Signal is emitted when the thread starts executing. + @qtsignal finished(): Signal is emitted when the thread has finished. + @qtsignal terminated(): Signal is emitted when the thread is terminated. + @qtsignal done(result): Signal is emitted when the function has returned. + + @warning: The function and all applied arguments must be thread safe! """ def __init__(self, parent=None): + """Constructor + + @param parent: Qt parent object + @type parent: QObject instance or None + """ QtCore.QThread.__init__(self, parent) self.mutex = QtCore.QMutex() + self.clear() + + def clear(self): + """ + Clear variables + + Mutex must be locked before clear() is called from a method! + """ self._func = None self._args = None self._kwargs = None def detach(self, func, *args, **kwargs): """ + Detach a function call + @param func: a callable @param *args: additional arguments for the function @param **kwargs: additional keyword arguments for the function @@ -77,7 +96,15 @@ self.start() def run(self): + """ + Payload - runs the script and emits done(result) + + The function and its args/kwargs are cleared after the function has + run to avoid cyclic references. + """ self.mutex.lock() result = self._func(*self._args, **self._kwargs) self.emit(SIGNAL("done(result)"), result) + self.clear() self.mutex.unlock() + Added: pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py (rev 0) +++ pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py 2007-02-02 14:38:56 UTC (rev 119) @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- + +# Form implementation generated from reading ui file 'src/moul/qt/ui/simpleprogressbar.ui' +# +# Created: Fri Feb 2 15:36:30 2007 +# by: PyQt4 UI code generator 4.1.1 +# +# WARNING! All changes made in this file will be lost! + +import sys +from PyQt4 import QtCore, QtGui + +class Ui_SimpleProgressbar(object): + def setupUi(self, SimpleProgressbar): + SimpleProgressbar.setObjectName("SimpleProgressbar") + SimpleProgressbar.resize(QtCore.QSize(QtCore.QRect(0,0,203,38).size()).expandedTo(SimpleProgressbar.minimumSizeHint())) + SimpleProgressbar.setMinimumSize(QtCore.QSize(203,38)) + SimpleProgressbar.setMaximumSize(QtCore.QSize(203,38)) + SimpleProgressbar.setWindowIcon(QtGui.QIcon(":/resources/uru_icon_32x32.png")) + + self.verticalLayout = QtGui.QWidget(SimpleProgressbar) + self.verticalLayout.setGeometry(QtCore.QRect(0,0,201,41)) + self.verticalLayout.setObjectName("verticalLayout") + + self.vboxlayout = QtGui.QVBoxLayout(self.verticalLayout) + self.vboxlayout.setMargin(0) + self.vboxlayout.setSpacing(6) + self.vboxlayout.setObjectName("vboxlayout") + + self.progressbar = QtGui.QProgressBar(self.verticalLayout) + self.progressbar.setMinimum(0) + self.progressbar.setMaximum(100) + self.progressbar.setProperty("value",QtCore.QVariant(0)) + self.progressbar.setTextVisible(False) + self.progressbar.setOrientation(QtCore.Qt.Horizontal) + self.progressbar.setObjectName("progressbar") + self.vboxlayout.addWidget(self.progressbar) + + self.retranslateUi(SimpleProgressbar) + QtCore.QMetaObject.connectSlotsByName(SimpleProgressbar) + + def retranslateUi(self, SimpleProgressbar): + SimpleProgressbar.setWindowTitle(QtGui.QApplication.translate("SimpleProgressbar", "Title", None, QtGui.QApplication.UnicodeUTF8)) + +from moul.qt.ui import moulqt_rc + +if __name__ == "__main__": + app = QtGui.QApplication(sys.argv) + SimpleProgressbar = QtGui.QDialog() + ui = Ui_SimpleProgressbar() + ui.setupUi(SimpleProgressbar) + SimpleProgressbar.show() + sys.exit(app.exec_()) Added: pymoul/trunk/src/moul/qt/ui/simpleprogressbar.ui =================================================================== --- pymoul/trunk/src/moul/qt/ui/simpleprogressbar.ui (rev 0) +++ pymoul/trunk/src/moul/qt/ui/simpleprogressbar.ui 2007-02-02 14:38:56 UTC (rev 119) @@ -0,0 +1,72 @@ +<ui version="4.0" > + <class>SimpleProgressbar</class> + <widget class="QDialog" name="SimpleProgressbar" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>203</width> + <height>38</height> + </rect> + </property> + <property name="minimumSize" > + <size> + <width>203</width> + <height>38</height> + </size> + </property> + <property name="maximumSize" > + <size> + <width>203</width> + <height>38</height> + </size> + </property> + <property name="windowTitle" > + <string>Title</string> + </property> + <property name="windowIcon" > + <iconset resource="moulqt.qrc" >:/resources/uru_icon_32x32.png</iconset> + </property> + <widget class="QWidget" name="verticalLayout" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>201</width> + <height>41</height> + </rect> + </property> + <layout class="QVBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QProgressBar" name="progressbar" > + <property name="minimum" > + <number>0</number> + </property> + <property name="maximum" > + <number>100</number> + </property> + <property name="value" > + <number>0</number> + </property> + <property name="textVisible" > + <bool>false</bool> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + <resources> + <include location="moulqt.qrc" /> + </resources> + <connections/> +</ui> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-02 17:22:25
|
Revision: 121 http://pymoul.svn.sourceforge.net/pymoul/?rev=121&view=rev Author: tiran Date: 2007-02-02 09:22:22 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Moved utils to utilities/ Added some useful stuff from Zope3 Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/setup.py Added Paths: ----------- pymoul/trunk/doc/XXXreport.html pymoul/trunk/utilities/ pymoul/trunk/utilities/XXXreport pymoul/trunk/utilities/XXXreport2html.py pymoul/trunk/utilities/compileui.py pymoul/trunk/utilities/distutils_iss.py pymoul/trunk/utilities/distutils_upx.py pymoul/trunk/utilities/ez_setup.py pymoul/trunk/utilities/genepydoc.py pymoul/trunk/utilities/importchecker.py pymoul/trunk/utilities/setup_win32.py Removed Paths: ------------- pymoul/trunk/compileui.py pymoul/trunk/distutils_iss.py pymoul/trunk/distutils_upx.py pymoul/trunk/ez_setup.py pymoul/trunk/genepydoc.py pymoul/trunk/setup_win32.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-02-02 17:13:40 UTC (rev 120) +++ pymoul/trunk/Makefile.in 2007-02-02 17:22:22 UTC (rev 121) @@ -1,5 +1,5 @@ -PYTHON?=python -EPYDOC=$(PYTHON) genepydoc.py +PYTHON?=python2.5 +EPYDOC=$(PYTHON) utilities/genepydoc.py NOTSVN=-a -not -wholename '*.svn*' FINDPYTXT=find src/moul \( -name '*.py' -o -name '*.txt' \) $(NOTSVN) FINDPY=find src/moul -name '*.py' $(NOTSVN) @@ -36,7 +36,7 @@ dist/moulqt.exe ui: - $(PYTHON) compileui.py + $(PYTHON) utilities/compileui.py ./src/moul/ test_build: build ui PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS) @@ -91,3 +91,9 @@ cd dist && $(FINDHASH) | xargs sha1sum >sha1.txt cd dist && $(FINDHASH) | xargs gpg --detach-sign -a +xxxreport: + utilities/XXXreport + +importchecker: + $(PYTHON) utilities/importchecker.py ./src/moul/ + Deleted: pymoul/trunk/compileui.py =================================================================== --- pymoul/trunk/compileui.py 2007-02-02 17:13:40 UTC (rev 120) +++ pymoul/trunk/compileui.py 2007-02-02 17:22:22 UTC (rev 121) @@ -1,115 +0,0 @@ -#!/usr/bin/env python2.5 -"""Compile QtDesigner's UI and QRC files to Python files -""" -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - -import os -import re -from stat import ST_MTIME - -from PyQt4 import uic - -RE_RC_TEXT = "^import[ \.\\/]*(?P<module>[a-zA-Z]\w*_rc)\s$" -RE_RC = re.compile(RE_RC_TEXT) - -UI_EXT = '.ui' -PY_EXT = '.py' -QRC_EXT = '.qrc' -PY_QRC_EXT = '_rc.py' -QRC_COMPILER = "pyrcc4 -o %(py)s %(qrc)s" -QRC_PACKAGE = "moul.qt.ui" - -def _newer(orig, py): - try: - return os.stat(orig)[ST_MTIME] > os.stat(py)[ST_MTIME] - except Exception: - return True - - -def previewUi(uifname): - """Copied from PyQt.uic.pyuic - """ - from PyQt4 import QtGui - app = QtGui.QApplication([uifname]) - widget = uic.loadUi(uifname) - widget.show() - return app.exec_() - -def findFiles(base): - uis = [] - qrcs = [] - if not os.path.isdir(base): - raise IOError("%s is not a directory" % root) - for root, dirs, files in os.walk(base): - if '.svn' in dirs: - dirs.remove('.svn') - for file in files: - if file.endswith(UI_EXT): - uis.append((root, file)) - if file.endswith(QRC_EXT): - qrcs.append((root, file)) - return uis, qrcs - -def compileUiFiles(uis, execute=False, preview=False): - pys = [] - for root, ui_name in uis: - py_name = ui_name.lower()[:-len(UI_EXT)]+PY_EXT - ui_path = os.path.join(root, ui_name) - py_path = os.path.join(root, py_name) - if not _newer(ui_path, py_path): - continue - ui = open(ui_path, 'r') - py = open(py_path, 'w') - err = uic.compileUi(ui, py, execute) - ui.close() - py.close() - if err: - raise RuntimeError("%s: %s" % (ui_path, str(err))) - fixRelativeImport(py_path) - if preview: - previewUi(ui_path) - pys.append(py_path) - return pys - -def fixRelativeImport(fname): - lines = [] - fin = open(fname, 'r') - for line in fin: - if line.startswith('import'): - # faster than re - match = RE_RC.match(line) - if match: - line = match.expand("from %s import \g<module>" % QRC_PACKAGE) - lines.append(line) - fin.close() - fout = open(fname, 'w') - fout.write(''.join(lines)) - fout.close() - -def compileQRCFiles(qrcs): - pys = [] - for root, qrc_name in qrcs: - py_name = qrc_name.lower()[:-len(QRC_EXT)]+PY_QRC_EXT - kw = {} - kw['qrc'] = os.path.join(root, qrc_name) - kw['py'] = os.path.join(root, py_name) - if not _newer(kw['qrc'], kw['py']): - continue - err = os.system(QRC_COMPILER % kw) - if err != 0: - raise RuntimeError("pyrcc error") - pys.append(kw['py']) - return pys - -def compileUi(base='src', execute=True, preview=False): - uis, qrcs = findFiles(base) - upys = compileUiFiles(uis, execute=execute, preview=preview) - qpys = compileQRCFiles(qrcs) - return upys + qpys - -if __name__ == '__main__': - pys = compileUi() - print "Python files written:\n" - print '\n'.join(pys) Deleted: pymoul/trunk/distutils_iss.py =================================================================== --- pymoul/trunk/distutils_iss.py 2007-02-02 17:13:40 UTC (rev 120) +++ pymoul/trunk/distutils_iss.py 2007-02-02 17:22:22 UTC (rev 121) @@ -1,514 +0,0 @@ -"""Distutils helper for creating and running InnoSetup Script files -""" -__author__ = "Christian Heimes" -__version__ = "$Id" -__revision__ = "$Revision$" - -import os -import sys -import re -from distutils import log -from fnmatch import fnmatch -from subprocess import call as subcall -from ConfigParser import SafeConfigParser -from ConfigParser import NoSectionError -from ConfigParser import DEFAULTSECT -from string import ascii_letters - -class ISSConfigParser(SafeConfigParser): - """Config parser with some extensions for ISS - - new methods: - add_header(string) - Adds comments to the header - set_raw(section, string) - Adds a raw entry to a section - add_sectionif(section) - setif(section, option, value) - - changed behavior: - doesn't write [default] section to file - interpolates "%(...)s" when writing to file - doesn't parse key: value - parses "Key: "value"; ..." to raw - writes sections in the order they are created - - >>> from StringIO import StringIO - >>> defaults = {'appname' : 'Test App'} - >>> cfg = ISSConfigParser(defaults) - >>> cfg.add_header("header") - - >>> cfg.add_section("testsection") - >>> cfg.set("testsection", "key", "value %(appname)s") - >>> cfg.set_raw("testsection", 'Rawline: "%(appname)s";') - - >>> out = StringIO() - >>> cfg.write(out) - >>> out.seek(0) - >>> data = out.read() - >>> print data - ; header - [testsection] - key = value Test App - Rawline: "Test App"; - <BLANKLINE> - - >>> template = StringIO(data) - >>> del cfg, out, data - >>> cfg = ISSConfigParser(defaults) - >>> cfg.readfp(template) - >>> cfg._sections - {'testsection': {'__name__': 'testsection', 'key': 'value Test App'}} - >>> cfg._raw - {'testsection': ['Rawline: "Test App";']} - - >>> out = StringIO() - >>> cfg.write(out) - >>> out.seek(0) - >>> data = out.read() - >>> print data - [testsection] - key = value Test App - Rawline: "Test App"; - <BLANKLINE> - - >>> - """ - def __init__(self, defaults=None): - SafeConfigParser.__init__(self, defaults) - self._raw = {} - self._header = [] - self._order = [] - - def add_header(self, value): - """Add a header comment - """ - self._header.append(value) - - def add_section(self, section): - """Create a new section in the configuration. - """ - SafeConfigParser.add_section(self, section) - self._raw[section]= [] - self._order.append(section) - - def add_sectionif(self, section): - """Create a new section in the configuration if section doesn't exist. - """ - if not self.has_section(section): - self.add_section(section) - return True - - def setif(self, section, option, value): - """Set section-option to value if option is not yet set - """ - if not self.has_option(section, option): - self.set(section, option, value) - return True - - def set_raw(self, section, raw): - """Add a raw string to a section - """ - try: - sec = self._raw[section] - except KeyError: - raise NoSectionError(section) - if isinstance(raw, (tuple, list)): - for r in raw: - sec.append(r) - else: - sec.append(raw) - - def get_raw(self, section, raw=False, vars=None): - """Get all raw lines as string for a given section. - - Interpolates %(var)s vars - """ - d = self._defaults.copy() - try: - d.update(self._sections[section]) - except KeyError: - if section != DEFAULTSECT: - raise NoSectionError(section) - # Update with the entry specific variables - if vars: - for key, value in vars.items(): - d[self.optionxform(key)] = value - try: - rawdata = "\n".join(self._raw[section]) - except KeyError: - return None - - if raw: - return rawdata - else: - return self._interpolate(section, "RAWDATA", rawdata, d) - - def optionxform(self, optionstr): - return optionstr - - def write(self, fp): - """Write an .ini-format representation of the configuration state.""" - for header in self._header: - fp.write("; %s\n" % header.replace('\n', '; \n')) - #if self._defaults: - # fp.write("[%s]\n" % DEFAULTSECT) - # for (key, value) in self._defaults.items(): - # fp.write("%s = %s\n" % (key, str(value).replace('\n', '\n\t'))) - # fp.write("\n") - for section in self._order: - fp.write("[%s]\n" % section) - for key in self._sections[section]: - if key == "__name__": - continue - value = self.get(section, key, raw=False) - fp.write("%s = %s\n" % - (key, str(value).replace('\n', '\n\t'))) - rawdata = self.get_raw(section, raw=False) - if rawdata: - fp.write(rawdata) - fp.write("\n") - - def remove_section(self, section): - """Remove a file section.""" - existed = RawConfigParser.remove_section(self, section) - if existed: - del self._raw[section] - return existed - - OPTCRE = re.compile( - r'(?P<option>[^=\s][^=]*)' # very permissive! - r'\s*(?P<vi>[=])\s*' # any number of space/tab, - # followed by separator - # (either : or =), followed - # by any # space/tab - r'(?P<value>.*)$' # everything up to eol - ) - - RAWRE = re.compile( - r'^[A-Z][A-Za-z]*:\s?' # 'Name: ' - r'".*";' # '"value ...";' and - ) - - def _read(self, fp, fpname): - """Parse a sectioned setup file. - - From ConfigParser.RawConfigParser - """ - cursect = None # None, or a dictionary - curraw = None - optname = None - lineno = 0 - e = None # None, or an exception - while True: - line = fp.readline() - if not line: - break - lineno = lineno + 1 - # comment or blank line? - if line.strip() == '' or line[0] in '#;': - continue - if line.split(None, 1)[0].lower() == 'rem' and line[0] in "rR": - # no leading whitespace - continue - # continuation line? - if line[0].isspace() and cursect is not None and optname: - value = line.strip() - if value: - cursect[optname] = "%s\n%s" % (cursect[optname], value) - # a section header or option header? - else: - # is it a section header? - mo = self.SECTCRE.match(line) - if mo: - sectname = mo.group('header') - if sectname in self._sections: - cursect = self._sections[sectname] - curraw = self._raw[sectname] - elif sectname == DEFAULTSECT: - cursect = self._defaults - else: - cursect = {'__name__': sectname} - curraw = [] # new - self._order.append(sectname) # new - self._sections[sectname] = cursect - self._raw[sectname] = curraw # new - # So sections can't start with a continuation line - optname = None - # no section header in the file? - elif cursect is None: - raise MissingSectionHeaderError(fpname, lineno, line) - # an option line? - else: - mo = self.OPTCRE.match(line) - if mo: - optname, vi, optval = mo.group('option', 'vi', 'value') - if vi in ('=', ':') and ';' in optval: - # ';' is a comment delimiter only if it follows - # a spacing character - pos = optval.find(';') - if pos != -1 and optval[pos-1].isspace(): - optval = optval[:pos] - optval = optval.strip() - # allow empty values - if optval == '""': - optval = '' - optname = self.optionxform(optname.rstrip()) - cursect[optname] = optval - else: - mo = self.RAWRE.match(line) # new - if mo: - # found a InnoSetup raw line - curraw.append(line.strip()) - else: - # a non-fatal parsing error occurred. set up the - # exception but keep going. the exception will be - # raised at the end of the file and will contain a - # list of all bogus lines - if not e: - e = ParsingError(fpname) - e.append(lineno, repr(line)) - # if any parsing errors occurred, raise an exception - if e: - raise e - - -class InnoSetupCommandMixin: - """Mixin class class for a distutils command - - You have call initialize_options() and run() from your class! - - >>> from tempfile import mkstemp - >>> tmphdlr, tmpfile = mkstemp() - - >>> test = InnoSetupCommandMixin() - >>> test.initialize_options() - >>> test.app_name = "Test App" - >>> test.innosetup = True - >>> test.inno_script = tmpfile - >>> test.lib_dir = 'li', - >>> test.dist_dir = 'dist' - >>> test.windows_exe_files = [r'dist\\test.exe'] - >>> test.lib_files = [r'dist\\lib1', r'dist\\lib2'] - - >>> try: - ... test.run() - ... finally: - ... data = open(tmpfile).read() - ... os.unlink(tmpfile) - - #>>> print data - """ - def initialize_options(self): - self.app_name = '' - self.innosetup = False - self.inno_script = None - self.inno_version = "1.0" - self.inno_templates = None - self.inno_interpolation = {} - self.inno_sections = {} - self.inno_languages = [('nl', 'Dutch'), ('de', 'German'), - ('fr', 'French'), ('it', 'Italian'), - ('es', 'Spanish') - ] - - def run(self): - self._createInnoSetup() - - def _createInnoSetup(self): - if not self.innosetup: - return - - self._inno_script = InnoScript( - self.app_name, - self.lib_dir, - self.dist_dir, - self.windows_exe_files, - self.lib_files, - inno_script = self.inno_script, - templates = self.inno_templates, - interpolation = self.inno_interpolation, - sections = self.inno_sections, - languages = self.inno_languages) - - print "*** creating the inno setup script***" - self._inno_script.create() - print "*** compiling the inno setup script***" - try: - self._inno_script.compile() - except RuntimeError, msg: - print "Failed to create installer:\n%s" % msg - # Note: By default the final setup.exe will be in an Output subdirectory. - -class InnoScript: - """Based on py2exe/samples/extending/setup.py - - Requires http://www.jrsoftware.org - - appname - name of the app - lib_dir - internal - dist_dir - internal - windows_exe_files - internal - lib_files - internal - inno_script=None - path to IS script output file - templates = None - list of template file names or single file - version = "1.0" - version string - interpolation - dict with additional %()s interpolation items - sections - dict with additional section informations - languages - list with languages tuples e.g. [('de', 'German')] - - sections = {'sectioname' : - {'key' : 'value', - 'RAW' : 'string or list with raw items' - } - } - - """ - def __init__(self, - appname, - lib_dir, - dist_dir, - windows_exe_files, - lib_files, - inno_script=None, - templates = None, - version = "1.0", - interpolation = {}, - sections = {}, - languages = [] - ): - self.lib_dir = lib_dir - self.dist_dir = dist_dir - if not self.dist_dir[-1] in "\\/": - self.dist_dir += "\\" - self.windows_exe_files = [self.chop(p) for p in windows_exe_files] - self.lib_files = [self.chop(p) for p in lib_files] - if inno_script is None: - self.inno_script = os.path.join(dist_dir, appname.replace(' ', '_')+'.iss') - else: - self.inno_script = inno_script - self.fd = open(self.inno_script, "w") - - ip = interpolation.copy() - ip['appname'] = appname - ip['version'] = version - ip['appnamestripped'] = "".join([c for c in appname - if c in ascii_letters]) - ip['appexe'] = self.windows_exe_files[0] - self.interpolation = ip - - self.cfg = ISSConfigParser(ip) - if templates: - read = self.cfg.read(templates) - self.sections = sections - self.languages = languages - - def chop(self, pathname): - assert pathname.startswith(self.dist_dir) - return pathname[len(self.dist_dir):] - - def create(self): - """create Inno Script - """ - self.createInnoScript() - self.modifyInnoScript() - self.writeInnoScript() - - def createInnoScript(self): - """Create Inno Script cfg - """ - cfg = self.cfg - cfg.add_header("WARNING: This script has been created by py2exe. Changes to this script") - cfg.add_header("will be overwritten the next time py2exe is run!\n") - - cfg.add_sectionif("Setup") - # Setup - cfg.setif("Setup", "AppName", "%(appname)s") - cfg.setif("Setup", "AppVerName", "%(appname)s %(version)s") - cfg.setif("Setup", "DefaultDirName", "{pf}\%(appname)s") - cfg.setif("Setup", "DefaultGroupName", "%(appname)s") - - self._writeLanguagesSect() - self._writeWindowsExeFiles() - self._writeLibFiles() - #self._writeIcons() - self._writeSections() - - def _writeLanguagesSect(self): - cfg = self.cfg - if not self.languages: - return - cfg.add_sectionif('Languages') - for key, lang in self.languages: - cfg.set_raw("Languages", - 'Name: "%s"; MessagesFile: "compiler:Languages\%s.isl"' % - (key, lang)) - - def _writeWindowsExeFiles(self): - cfg = self.cfg - cfg.add_sectionif("Files") - for path in self.windows_exe_files: - cfg.set_raw("Files", - r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' - % (path, os.path.dirname(path)) ) - - def _writeLibFiles(self): - cfg = self.cfg - cfg.add_sectionif("Files") - for path in self.lib_files: - cfg.set_raw("Files", - r'Source: "%s"; DestDir: "{app}\%s"; Flags: ignoreversion' - % (path, os.path.dirname(path)) ) - - def _writeIcons(self): - cfg = self.cfg - cfg.add_sectionif("Icons") - for path in self.windows_exe_files: - cfg.set_raw("Icons", - 'Name: "{group}\\%(appname)s"; Filename: "{app}\\' + path + '"') - cfg.set_raw("Icons", r'Name: "{group}\Uninstall %(appname)s"; Filename: "{uninstallexe}"') - - def _writeSections(self): - cfg = self.cfg - # Additional things in self.sections - for section in self.sections: - cfg.add_sectionif(section) - for key, value in self.sections[section].items(): - if key == "RAW": - cfg.set_raw(section, value) - else: - cfg.set(section, key, value) - - def modifyInnoScript(self): - """Hook - """ - pass - - def writeInnoScript(self): - """Write script to disk - """ - self.cfg.write(self.fd) - self.fd.close() - - def compile(self): - import ctypes - res = ctypes.windll.shell32.ShellExecuteA(0, "compile", - self.inno_script, - None, - None, - 0) - if res < 32: - raise RuntimeError("ShellExecute failed, error %d" % res) - - def __call__(self): - self.create() - self.compile() - -def test_suite(): - import unittest - from doctest import DocTestSuite - return unittest.TestSuite(( - DocTestSuite(__name__), - )) - -if __name__ == '__main__': - import unittest - unittest.main(defaultTest="test_suite") Deleted: pymoul/trunk/distutils_upx.py =================================================================== --- pymoul/trunk/distutils_upx.py 2007-02-02 17:13:40 UTC (rev 120) +++ pymoul/trunk/distutils_upx.py 2007-02-02 17:22:22 UTC (rev 121) @@ -1,157 +0,0 @@ -"""Patched distutils Command -""" -__author__ = "Christian Heimes" -__version__ = "$Id" -__revision__ = "$Revision$" - -import os -import sys -from inspect import getmro -from tempfile import TemporaryFile -from subprocess import call as subcall -from distutils import log -from stat import ST_SIZE -from fnmatch import fnmatch -from distutils_iss import InnoSetupCommandMixin - -class UpxCommand(InnoSetupCommandMixin): - """Upx packer mixin class for distutils - - Usage: - class UpxPy2exe(UpxCommand, py2exe): - pass - - setup(..., cmdclass = {'py2exe': UpxPy2exe}) - - The mixin class should work for every distutils Command based class on - every os (Win32, Mac, Linux). - - New options: - o upx - True/False - o upx_args - additional args for upx (e.g. "--no-color --best") - o upx_path - path to upx if not in os.environ['PATH'] - o upx_extensions - list of extensions to packed (e.g. ['dll','pyd','exe']) - o upx_ignore - list of pattern to ignore (e.g. ['python*.dll']= - """ - - def initialize_options(self): - result = self._otherclass().initialize_options(self) - InnoSetupCommandMixin.initialize_options(self) - self.upx = True - self.upx_args = '--no-color' - self.upx_path = 'upx' - self.upx_extensions = [ - 'pyd', 'dll', 'exe', # Windows - '', 'so', # Linux - 'dylib', # Mac OS X - ] - self.upx_ignore = [] - return result - - def finalize_options(self): - result = self._otherclass().finalize_options(self) - self.has_upx = self._upxAvailable() - self.upx_packlist = [] - return result - - def copy_file(self, *args, **kwargs): - result = self._otherclass().copy_file(self, *args, **kwargs) - self.upx_packlist.append(result) - return result - - def run(self, *args, **kwargs): - result = self._otherclass().run(self, *args, **kwargs) - self._upxPack() - InnoSetupCommandMixin.run(self) - return result - - def _upxPack(self): - """Pack files - - At last pack the files. I had some hard to debug errors as I tried to - pack the files inside the copy_file() method. Some dll and exe files - were broken. Perhaps some file handlers weren't closed? - """ - if not self.has_upx or not self.upx: - return - - packed = [] - for fname, copied in self.upx_packlist: - if not copied: - continue - basename = os.path.basename(fname) - tmp, ext = os.path.splitext(basename) - ext = ext[1:] # strip leading dot - - # check extension - if ext not in self.upx_extensions: - continue - # check ignores - if self.upx_ignore: - matches = [pat for pat in self.upx_ignore if fnmatch(basename, pat)] - if matches: - continue - - origsize = os.stat(fname)[ST_SIZE] - self._upxPackFile(os.path.normpath(fname)) - newsize = os.stat(fname)[ST_SIZE] - ratio = newsize*100 / origsize - packed.append((basename, origsize, newsize, ratio)) - - print "\n*** UPX result ***" - for basename, origsize, newsize, ratio in packed: - print " %s packed to %i%%" % (basename, ratio) - if not packed: - print " no files packed" - print "\n" - - def _upxPackFile(self, fname): - """Pack a file - """ - retcode = subcall('%s %s "%s"' % (self.upx_path, self.upx_args, fname)) - if retcode == 0: # OK, file packed - pass - elif retcode == 2: # OK, file already packed - pass - else: # something bad has happend - sys.exit(retcode) # XXX - - def _upxAvailable(self): - """Search for UPX in search path - """ - stdout = TemporaryFile() - try: - try: - retcode = subcall("%s --version" % self.upx_path, stdout=stdout) - finally: - if stdout: - stdout.close() - except OSError: - log.debug('UPX not found') - return False - else: - if retcode == 0: - log.debug('UPX found') - return True - else: - log.debug('UPX: an error occured %i' % retcode) - return False - - @classmethod - def _otherclass(cls): - """Workaround: distutils.cmd.Command is an old style class - - Find next class in MRO that is not based on UpxCommand class - """ - for c in getmro(cls): - if not issubclass(c, (UpxCommand, InnoSetupCommandMixin)): - return c - raise ValueError(cls) - -try: - from py2exe.build_exe import py2exe -except ImportError: - pass -else: - class UpxPy2exe(UpxCommand, py2exe): - pass Added: pymoul/trunk/doc/XXXreport.html =================================================================== --- pymoul/trunk/doc/XXXreport.html (rev 0) +++ pymoul/trunk/doc/XXXreport.html 2007-02-02 17:22:22 UTC (rev 121) @@ -0,0 +1,411 @@ +<html><head><title>XXX/TODO/FIXME-Comment report for pyMoul</title> +</head> + +<body> +<h1>pyMoul - Developer report tools: XXX/TODO/FIXME comments</h1> +<p>Generated on Fri, 02 Feb 2007 18:18:36 CET, based on Zope 3's XXX report</p> +<hr> +<h3>Summary</h3> +<p> + There are currently 100 XXX/TODO/FIXME comments. +</p> +<hr/> +<h3>Listing</h3> +<ol><li><b>File: utilities/../.svn/text-base/ez_setup.py.svn-base:92</b><br/><pre> # XXX could we install in a subprocess here? +base-93- print >>sys.stderr, ( +base-94- "The required version of setuptools (>=%s) is not available, and\n" +base-95- "can't be installed while this script is running. Please install\n" +</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are +base-549- # separated by a horizontal dash line. Only the first one of +base-550- # them is now colorized properly. +base-551- header = lines[0] +</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:603</b><br/><pre> # TODO: Scrape and colorize the traceback. +base-604- result.append(self.colorize('doctest_got', line)) +base-605- elif remaining[0] == 'Differences (ndiff with -expected +actual):': +base-606- result.append(self.colorize('doctest_title', remaining.pop(0))) # E. raised: +</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:623</b><br/><pre> # TODO: We only deal with the output from Zope 3's doctest module. +base-624- # A colorizer for the Python's doctest module would be nice too. +base-625- if doctest: +base-626- # If we have a doctest, we do not care about this header. All the +</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:690</b><br/><pre> # TODO these should be hookable +base-691- from zope.tales.tales import TALESTracebackSupplement +base-692- from zope.pagetemplate.pagetemplate \ +base-693- import PageTemplateTracebackSupplement +</pre></li><li><b>File: utilities/../.svn/text-base/setup_win32.py.svn-base:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: +base-85- pexe['inno_templates'] = "template.iss" +base-86- pexe['app_name'] = 'pyMoul' +base-87- pexe['includes'].extend(findPyTz()) +</pre></li><li><b>File: utilities/../.svn/text-base/distutils_upx.py.svn-base:117</b><br/><pre> sys.exit(retcode) # XXX +base-118- +base-119- def _upxAvailable(self): +base-120- """Search for UPX in search path +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/chatlog.py.svn-base:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +base-269- return iter(self._fd) +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:112</b><br/><pre> # XXX use struct +base-113- if header is None: +base-114- fd = self._fd +base-115- fd.seek(0) +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:127</b><br/><pre> # XXX use struct +base-128- if size is None: +base-129- size = self.getFileSize() +base-130- leading = 4* [None] +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:156</b><br/><pre> # TODO: write me +base-157- pass +base-158- +base-159-class Constrain(object): +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +base-541- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui +base-542- # microphon missing -> OS mixer +base-543- } +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +base-629- +base-630-class GraphicsIni(ConfFile): +base-631- _filename = 'graphics.ini' +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/directory.py.svn-base:58</b><br/><pre> # TODO: fnmatch +base-59- return len([name for name in os.listdir(path) +base-60- if os.path.isfile(os.path.join(path, name))]) +base-61- +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:104</b><br/><pre> # TODO: more +base-105- +base-106- def test_publicapi_create(self): +base-107- inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:115</b><br/><pre> # TODO: more +base-116- +base-117-class AudioIniTest(GenericIniTest): +base-118- enc = aud_enc +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:153</b><br/><pre> #XXX self.failIf(p.isChanged()) +base-154- +base-155- p.screenres = 0 +base-156- eq(p._get('Graphics.Width'), 800) +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/utils.py.svn-base:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 +base-80- fd = open(os.path.join(path, fname), 'wb') +base-81- fd.write('dummy') +base-82- fd.close() +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:104</b><br/><pre> # TODO: more + + def test_publicapi_create(self): + inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:115</b><br/><pre> # TODO: more + +class AudioIniTest(GenericIniTest): + enc = aud_enc +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:153</b><br/><pre> #XXX self.failIf(p.isChanged()) + + p.screenres = 0 + eq(p._get('Graphics.Width'), 800) +</pre></li><li><b>File: utilities/../src/moul/file/tests/utils.py:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 + fd = open(os.path.join(path, fname), 'wb') + fd.write('dummy') + fd.close() +</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file + return iter(self._fd) +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:112</b><br/><pre> # XXX use struct + if header is None: + fd = self._fd + fd.seek(0) +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:127</b><br/><pre> # XXX use struct + if size is None: + size = self.getFileSize() + leading = 4* [None] +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:156</b><br/><pre> # TODO: write me + pass + +class Constrain(object): +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check + 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui + # microphon missing -> OS mixer + } +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. + +class GraphicsIni(ConfFile): + _filename = 'graphics.ini' +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py~:112</b><br/><pre> # XXX use struct + if header is None: + fd = self._fd + fd.seek(0) +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py~:127</b><br/><pre> # XXX use struct + if size is None: + size = self.getFileSize() + leading = 4* [None] +</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py~:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file + return iter(self._fd) +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:156</b><br/><pre> # TODO: write me + pass + +class Constrain(object): +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check + 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui + # microphon missing -> OS mixer + } +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. + +class GraphicsIni(ConfFile): + _filename = 'graphics.ini' +</pre></li><li><b>File: utilities/../src/moul/file/directory.py:58</b><br/><pre> # TODO: fnmatch + return len([name for name in os.listdir(path) + if os.path.isfile(os.path.join(path, name))]) + +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:76</b><br/><pre> # XXX: dos format +base-77- return data.replace("\r\n", "\n") +base-78- +base-79-def encryptWDYS(instr, fout): +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:86</b><br/><pre> # XXX: dos format +base-87- instr = instr.replace("\n", "\r\n") +base-88- fout.seek(0) +base-89- fout.write(HEADER) +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/elf.py.svn-base:70</b><br/><pre> # XXX NotImplemented +base-71- raise NotImplementedError +base-72- +base-73-def decipher(crypt, size, key): +</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:76</b><br/><pre> # XXX: dos format + return data.replace("\r\n", "\n") + +def encryptWDYS(instr, fout): +</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:86</b><br/><pre> # XXX: dos format + instr = instr.replace("\n", "\r\n") + fout.seek(0) + fout.write(HEADER) +</pre></li><li><b>File: utilities/../src/moul/crypt/elf.py:70</b><br/><pre> # XXX NotImplemented + raise NotImplementedError + +def decipher(crypt, size, key): +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/localization.py.svn-base:78</b><br/><pre> # TODO: other message box +base-79- self._journal_progressbar = SimpleProgressbar(self) +base-80- self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) +base-81- self._journal_progressbar.setProgressbar(0, 1, 0) +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:76</b><br/><pre> # TODO: checks +base-77- self.urudatadir.initializeFactories() +base-78- +base-79- # init handlers +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:152</b><br/><pre> # FIXME: signal doesn't do anything +base-153- self.emit(SIGNAL("close()")) +base-154- event.accept() +base-155- event.ignore() +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:189</b><br/><pre> # TODO: msg +base-190- return +base-191- +base-192- self.pb_kiimage_repair.setEnabled(False) +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:219</b><br/><pre> # TODO: msg +base-220- +base-221- # ************************************************************************ +base-222- # graphics settings +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit +base-238- +base-239- @signalLogDecorator(LOG) +base-240- def on_graphicsini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:297</b><br/><pre> # XXX: fixme +base-298- txt = videoModes.getVidModeHuman(idx) +base-299- self.lb_screenres.setText(QtCore.QString(txt)) +base-300- self._graphics_ini.screenres = idx +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit +base-388- +base-389- @signalLogDecorator(LOG) +base-390- def on_audioini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active +base-507- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) +base-508- timer.start() +base-509- +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:602</b><br/><pre> # TODO: thread safety! +base-603- self.servers = servers +base-604- if not self.isRunning(): +base-605- self.start() +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:608</b><br/><pre> # TODO: thread safety! +base-609- # emit a list of names first +base-610- for server in self.servers: +base-611- self.emit(SIGNAL("server(const QString&)"), server.name) +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:644</b><br/><pre> # TODO check this +base-645- self._running = False +base-646- self.condition.wakeAll() +base-647- +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/errorhandler.py.svn-base:46</b><br/><pre> # TODO: translation aware +base-47- LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) +base:48: return # XXX: remove +base-49- try: +base-50- title= QtGui.QApplication.translate("excepthook", +base-51- "An unhandled error has occured", +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:76</b><br/><pre> # TODO: checks + self.urudatadir.initializeFactories() + + # init handlers +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:152</b><br/><pre> # FIXME: signal doesn't do anything + self.emit(SIGNAL("close()")) + event.accept() + event.ignore() +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:189</b><br/><pre> # TODO: msg + return + + self.pb_kiimage_repair.setEnabled(False) +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:236</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit + + @signalLogDecorator(LOG) + def on_graphicsini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:296</b><br/><pre> # XXX: fixme + txt = videoModes.getVidModeHuman(idx) + self.lb_screenres.setText(QtCore.QString(txt)) + self._graphics_ini.screenres = idx +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:386</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit + + @signalLogDecorator(LOG) + def on_audioini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:505</b><br/><pre> # TODO: needs optimization? run only when timer tab is active + self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) + timer.start() + +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:601</b><br/><pre> # TODO: thread safety! + self.servers = servers + if not self.isRunning(): + self.start() +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:607</b><br/><pre> # TODO: thread safety! + # emit a list of names first + for server in self.servers: + self.emit(SIGNAL("server(const QString&)"), server.name) +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:643</b><br/><pre> # TODO check this + self._running = False + self.condition.wakeAll() + +</pre></li><li><b>File: utilities/../src/moul/qt/localization.py:78</b><br/><pre> # TODO: other message box + self._journal_progressbar = SimpleProgressbar(self) + self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) + self._journal_progressbar.setProgressbar(0, 1, 0) +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:76</b><br/><pre> # TODO: checks + self.urudatadir.initializeFactories() + + # init handlers +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:152</b><br/><pre> # FIXME: signal doesn't do anything + self.emit(SIGNAL("close()")) + event.accept() + event.ignore() +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:189</b><br/><pre> # TODO: msg + return + + self.pb_kiimage_repair.setEnabled(False) +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:219</b><br/><pre> # TODO: msg + + # ************************************************************************ + # graphics settings +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit + + @signalLogDecorator(LOG) + def on_graphicsini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:297</b><br/><pre> # XXX: fixme + txt = videoModes.getVidModeHuman(idx) + self.lb_screenres.setText(QtCore.QString(txt)) + self._graphics_ini.screenres = idx +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit + + @signalLogDecorator(LOG) + def on_audioini_loaded(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active + self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) + timer.start() + +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:602</b><br/><pre> # TODO: thread safety! + self.servers = servers + if not self.isRunning(): + self.start() +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:608</b><br/><pre> # TODO: thread safety! + # emit a list of names first + for server in self.servers: + self.emit(SIGNAL("server(const QString&)"), server.name) +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:644</b><br/><pre> # TODO check this + self._running = False + self.condition.wakeAll() + +</pre></li><li><b>File: utilities/../src/moul/qt/errorhandler.py:46</b><br/><pre> # TODO: translation aware + LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) + try: + title= QtGui.QApplication.translate("excepthook", + "An unhandled error has occured", +</pre></li><li><b>File: utilities/../src/moul/osdependent/__init__.py:116</b><br/><pre># XXX: what about cygwin, bsd and others? +_thismodule = sys.modules[__name__] +if __WIN32__: + from moul.osdependent import win32 as osdep_win32 +</pre></li><li><b>File: utilities/../src/moul/osdependent/.svn/text-base/__init__.py.svn-base:116</b><br/><pre># XXX: what about cygwin, bsd and others? +base-117-_thismodule = sys.modules[__name__] +base-118-if __WIN32__: +base-119- from moul.osdependent import win32 as osdep_win32 +</pre></li><li><b>File: utilities/../test.py:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are + # separated by a horizontal dash line. Only the first one of + # them is now colorized properly. + header = lines[0] +</pre></li><li><b>File: utilities/../test.py:603</b><br/><pre> # TODO: Scrape and colorize the traceback. + result.append(self.colorize('doctest_got', line)) + elif remaining[0] == 'Differences (ndiff with -expected +actual):': + result.append(self.colorize('doctest_title', remaining.pop(0))) # E. raised: +</pre></li><li><b>File: utilities/../test.py:623</b><br/><pre> # TODO: We only deal with the output from Zope 3's doctest module. + # A colorizer for the Python's doctest module would be nice too. + if doctest: + # If we have a doctest, we do not care about this header. All the +</pre></li><li><b>File: utilities/../test.py:690</b><br/><pre> # TODO these should be hookable + from zope.tales.tales import TALESTracebackSupplement + from zope.pagetemplate.pagetemplate \ + import PageTemplateTracebackSupplement +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:6</b><br/><pre># Todo: +base-7-# +base-8-# Make 'unbuffered' a per-target option +base-9- +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:357</b><br/><pre>## extra_path = ["."] # XXX +base-358- extra_path = [] +base-359- dlls, unfriendly_dlls, other_depends = \ +base-360- self.find_dependend_dlls(dlls, +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:403</b><br/><pre> # XXX all dlls are copied into the same directory - a flat name space. +base-404- # sooner or later that will give conflicts. +base-405- dst = os.path.join(self.lib_dir, os.path.basename(item.__file__)) +base-406- self.copy_file(src, dst, preserve_mode=0) +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:919</b><br/><pre> # XXX On Windows NT, the SYSTEM directory is also searched +base-920- exedir = os.path.dirname(sys.executable) +base-921- syspath = os.environ['PATH'] +base-922- loadpath = ';'.join([exedir, sysdir, windir, syspath]) +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:1329</b><br/><pre># XXX This list is NOT complete (it cannot be) +base-1330-# Note: ALL ENTRIES MUST BE IN LOWER CASE! +base-1331-EXCLUDED_DLLS = ( +base-1332- "advapi32.dll", +</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:1362</b><br/><pre># XXX Perhaps it would be better to assume dlls from the systemdir are system dlls, +base-1363-# and make some exceptions for known dlls, like msvcr71, pythonXY.dll, and so on? +base-1364-def isSystemDLL(pathname): +base-1365- if os.path.basename(pathname).lower() in ("msvcr71.dll", "msvcr71d.dll"): +</pre></li><li><b>File: utilities/../contrib/build_exe.py:6</b><br/><pre># Todo: +# +# Make 'unbuffered' a per-target option + +</pre></li><li><b>File: utilities/../contrib/build_exe.py:357</b><br/><pre>## extra_path = ["."] # XXX + extra_path = [] + dlls, unfriendly_dlls, other_depends = \ + self.find_dependend_dlls(dlls, +</pre></li><li><b>File: utilities/../contrib/build_exe.py:403</b><br/><pre> # XXX all dlls are copied into the same directory - a flat name space. + # sooner or later that will give conflicts. + dst = os.path.join(self.lib_dir, os.path.basename(item.__file__)) + self.copy_file(src, dst, preserve_mode=0) +</pre></li><li><b>File: utilities/../contrib/build_exe.py:919</b><br/><pre> # XXX On Windows NT, the SYSTEM directory is also searched + exedir = os.path.dirname(sys.executable) + syspath = os.environ['PATH'] + loadpath = ';'.join([exedir, sysdir, windir, syspath]) +</pre></li><li><b>File: utilities/../contrib/build_exe.py:1329</b><br/><pre># XXX This list is NOT complete (it cannot be) +# Note: ALL ENTRIES MUST BE IN LOWER CASE! +EXCLUDED_DLLS = ( + "advapi32.dll", +</pre></li><li><b>File: utilities/../contrib/build_exe.py:1362</b><br/><pre># XXX Perhaps it would be better to assume dlls from the systemdir are system dlls, +# and make some exceptions for known dlls, like msvcr71, pythonXY.dll, and so on? +def isSystemDLL(pathname): + if os.path.basename(pathname).lower() in ("msvcr71.dll", "msvcr71d.dll"): +</pre></li><li><b>File: utilities/../utilities/.svn/text-base/setup_win32.py.svn-base:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: +base-85- pexe['inno_templates'] = "template.iss" +base-86- pexe['app_name'] = 'pyMoul' +base-87- pexe['includes'].extend(findPyTz()) +</pre></li><li><b>File: utilities/../utilities/.svn/text-base/distutils_upx.py.svn-base:117</b><br/><pre> sys.exit(retcode) # XXX +base-118- +base-119- def _upxAvailable(self): +base-120- """Search for UPX in search path +</pre></li><li><b>File: utilities/../utilities/.svn/text-base/ez_setup.py.svn-base:92</b><br/><pre> # XXX could we install in a subprocess here? +base-93- print >>sys.stderr, ( +base-94- "The required version of setuptools (>=%s) is not available, and\n" +base-95- "can't be installed while this script is running. Please install\n" +</pre></li><li><b>File: utilities/../utilities/setup_win32.py:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: + pexe['inno_templates'] = "template.iss" + pexe['app_name'] = 'pyMoul' + pexe['includes'].extend(findPyTz()) +</pre></li><li><b>File: utilities/../utilities/distutils_upx.py:117</b><br/><pre> sys.exit(retcode) # XXX + + def _upxAvailable(self): + """Search for UPX in search path +</pre></li><ol></body></html> \ No newline at end of file Deleted: pymoul/trunk/ez_setup.py =================================================================== --- pymoul/trunk/ez_setup.py 2007-02-02 17:13:40 UTC (rev 120) +++ pymoul/trunk/ez_setup.py 2007-02-02 17:22:22 UTC (rev 121) @@ -1,228 +0,0 @@ -#!python -"""Bootstrap setuptools installation - -If you want to use setuptools in your package's setup.py, just include this -file in the same directory with it, and add this to the top of your setup.py:: - - from ez_setup import use_setuptools - use_setuptools() - -If you want to require a specific version of setuptools, set a download -mirror, or use an alternate download directory, you can do so by supplying -the appropriate options to ``use_setuptools()``. - -This file can also be run as a script to install or upgrade setuptools. -""" -import sys -DEFAULT_VERSION = "0.6c5" -DEFAULT_URL = "http://cheeseshop.python.org/packages/%s/s/setuptools/" % sys.version[:3] - -md5_data = { - 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', - 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', - 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', - 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', - 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', - 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', - 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', - 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', - 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', - 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', - 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', - 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', - 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', - 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', - 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', - 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', - 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', - 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', - 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', - 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', - 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', -} - -import sys, os - -def _validate_md5(egg_name, data): - if egg_name in md5_data: - from md5 import md5 - digest = md5(data).hexdigest() - if digest != md5_data[egg_name]: - print >>sys.stderr, ( - "md5 validation of %s failed! (Possible download problem?)" - % egg_name - ) - sys.exit(2) - return data - - -def use_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - download_delay=15 -): - """Automatically find/download setuptools and make it available on sys.path - - `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end with - a '/'). `to_dir` is the directory where setuptools will be downloaded, if - it is not already available. If `download_delay` is specified, it should - be the number of seconds that will be paused before initiating a download, - should one be required. If an older version of setuptools is installed, - this routine will print a message to ``sys.stderr`` and raise SystemExit in - an attempt to abort the calling script. - """ - try: - import setuptools - if setuptools.__version__ == '0.0.1': - print >>sys.stderr, ( - "You have an obsolete version of setuptools installed. Please\n" - "remove it from your system entirely before rerunning this script." - ) - sys.exit(2) - except ImportError: - egg = download_setuptools(version, download_base, to_dir, download_delay) - sys.path.insert(0, egg) - import setuptools; setuptools.bootstrap_install_from = egg - - import pkg_resources - try: - pkg_resources.require("setuptools>="+version) - - except pkg_resources.VersionConflict, e: - # XXX could we install in a subprocess here? - print >>sys.stderr, ( - "The required version of setuptools (>=%s) is not available, and\n" - "can't be installed while this script is running. Please install\n" - " a more recent version first.\n\n(Currently using %r)" - ) % (version, e.args[0]) - sys.exit(2) - -def download_setuptools( - version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, - delay = 15 -): - """Download setuptools from a specified location and return its filename - - `version` should be a valid setuptools version number that is available - as an egg for download under the `download_base` URL (which should end - with a '/'). `to_dir` is the directory where the egg will be downloaded. - `delay` is the number of seconds to pause before an actual download attempt. - """ - import urllib2, shutil - egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) - url = download_base + egg_name - saveto = os.path.join(to_dir, egg_name) ... [truncated message content] |
From: <ti...@us...> - 2007-02-02 17:34:18
|
Revision: 122 http://pymoul.svn.sourceforge.net/pymoul/?rev=122&view=rev Author: tiran Date: 2007-02-02 09:34:06 -0800 (Fri, 02 Feb 2007) Log Message: ----------- Added importorder.py from Zope3 Rearranged import order Modified Paths: -------------- pymoul/trunk/src/moul/__init__.py pymoul/trunk/src/moul/cli/moullauncher.py pymoul/trunk/src/moul/config/__init__.py pymoul/trunk/src/moul/config/tests/test_config.py pymoul/trunk/src/moul/crypt/elf.py pymoul/trunk/src/moul/crypt/tests/test_elf.py pymoul/trunk/src/moul/crypt/tests/test_wdys.py pymoul/trunk/src/moul/crypt/whatdoyousee.py pymoul/trunk/src/moul/file/chatlog.py pymoul/trunk/src/moul/file/directory.py pymoul/trunk/src/moul/file/kiimage.py pymoul/trunk/src/moul/file/localization.py pymoul/trunk/src/moul/file/plasmalog.py pymoul/trunk/src/moul/file/tests/test_chatlog.py pymoul/trunk/src/moul/file/tests/test_directory.py pymoul/trunk/src/moul/file/tests/test_kiimage.py pymoul/trunk/src/moul/file/tests/test_localization.py pymoul/trunk/src/moul/file/tests/test_plasmalog.py pymoul/trunk/src/moul/file/tests/test_wdysini.py pymoul/trunk/src/moul/file/tests/utils.py pymoul/trunk/src/moul/file/wdysini.py pymoul/trunk/src/moul/i18n.py pymoul/trunk/src/moul/log.py pymoul/trunk/src/moul/osdependent/__init__.py pymoul/trunk/src/moul/osdependent/darwin/__init__.py pymoul/trunk/src/moul/osdependent/linux/__init__.py pymoul/trunk/src/moul/osdependent/processinfo.py pymoul/trunk/src/moul/osdependent/singleapp.py pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py pymoul/trunk/src/moul/osdependent/win32/__init__.py pymoul/trunk/src/moul/osdependent/win32/registry.py pymoul/trunk/src/moul/osdependent/win32/winpath.py pymoul/trunk/src/moul/qt/__init__.py pymoul/trunk/src/moul/qt/errorhandler.py pymoul/trunk/src/moul/qt/localization.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/moulqt.py pymoul/trunk/src/moul/qt/simpleprogressbar.py pymoul/trunk/src/moul/qt/threadlet.py pymoul/trunk/src/moul/qt/ui/mainwindow.py pymoul/trunk/src/moul/qt/ui/moulqt_rc.py pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py pymoul/trunk/src/moul/server/ping.py pymoul/trunk/src/moul/server/tests/test_ping.py pymoul/trunk/src/moul/server/tests/test_serverlist.py pymoul/trunk/src/moul/tests/test_i18n.py pymoul/trunk/src/moul/time/cavern.py pymoul/trunk/src/moul/time/dni.py pymoul/trunk/src/moul/time/tests/test_cavern.py pymoul/trunk/src/moul/time/tests/test_dni.py Added Paths: ----------- pymoul/trunk/utilities/importorder.py Modified: pymoul/trunk/src/moul/__init__.py =================================================================== --- pymoul/trunk/src/moul/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -3,6 +3,8 @@ try: __import__('pkg_resources').declare_namespace(__name__) except ImportError: - from pkgutil import extend_path + from pkgutil import extend_p + +ath __path__ = extend_path(__path__, __name__) Modified: pymoul/trunk/src/moul/cli/moullauncher.py =================================================================== --- pymoul/trunk/src/moul/cli/moullauncher.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/cli/moullauncher.py 2007-02-02 17:34:06 UTC (rev 122) @@ -27,11 +27,12 @@ from optparse import OptionParser from optparse import OptionValueError -from moul.file import plasmalog -from moul.file import chatlog from moul import config from moul import metadata +from moul.file import chatlog +from moul.file import plasmalog + class MoulLauncher(object): _parser = None _options = None Modified: pymoul/trunk/src/moul/config/__init__.py =================================================================== --- pymoul/trunk/src/moul/config/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/config/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -46,6 +46,7 @@ from moul.osdependent import getMoulUserDataDir from moul.osdependent import getPyMoulDataDir + _marker=object() # configuration Modified: pymoul/trunk/src/moul/config/tests/test_config.py =================================================================== --- pymoul/trunk/src/moul/config/tests/test_config.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/config/tests/test_config.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.config + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.config') Modified: pymoul/trunk/src/moul/crypt/elf.py =================================================================== --- pymoul/trunk/src/moul/crypt/elf.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/crypt/elf.py 2007-02-02 17:34:06 UTC (rev 122) @@ -25,6 +25,7 @@ import struct + def list2int(lst): return [ord(s) for s in lst] Modified: pymoul/trunk/src/moul/crypt/tests/test_elf.py =================================================================== --- pymoul/trunk/src/moul/crypt/tests/test_elf.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/crypt/tests/test_elf.py 2007-02-02 17:34:06 UTC (rev 122) @@ -28,6 +28,7 @@ import moul.file from moul.crypt.elf import decryptElf + base = os.path.dirname(moul.file.__file__) elf_enc = os.path.join(base, 'tests', 'audiocaps.0.elf') elf_dec = os.path.join(base, 'tests', 'audiocaps.0.txt') Modified: pymoul/trunk/src/moul/crypt/tests/test_wdys.py =================================================================== --- pymoul/trunk/src/moul/crypt/tests/test_wdys.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/crypt/tests/test_wdys.py 2007-02-02 17:34:06 UTC (rev 122) @@ -29,6 +29,7 @@ from moul.crypt.whatdoyousee import decryptWDYS from moul.crypt.whatdoyousee import encryptWDYS + base = os.path.join(os.path.dirname(moul.file.__file__), 'tests') gra_enc = os.path.join(base, 'graphics.ini') gra_dec = os.path.join(base, 'graphics.txt') Modified: pymoul/trunk/src/moul/crypt/whatdoyousee.py =================================================================== --- pymoul/trunk/src/moul/crypt/whatdoyousee.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/crypt/whatdoyousee.py 2007-02-02 17:34:06 UTC (rev 122) @@ -34,6 +34,7 @@ from moul.crypt.xtea import xtea_encrypt from moul.log import getLogger + HEADER = "whatdoyousee" CROSS_REF = (0x6c0a5452, 0x03827d0f, 0x3a170b92, 0x16db7fc2) CROSS_KEY = struct.pack("<4L", *CROSS_REF) Modified: pymoul/trunk/src/moul/file/chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/chatlog.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/chatlog.py 2007-02-02 17:34:06 UTC (rev 122) @@ -35,12 +35,13 @@ import os import re from fnmatch import fnmatch +from shutil import move from stat import ST_MTIME -from shutil import move from time import localtime from moul.log import getLogger + RE_FLAGS = re.LOCALE CHAT_RE = re.compile( r"^\((?P<M>\d{1,2})/(?P<D>\d{1,2})\ " # MM/DD Modified: pymoul/trunk/src/moul/file/directory.py =================================================================== --- pymoul/trunk/src/moul/file/directory.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/directory.py 2007-02-02 17:34:06 UTC (rev 122) @@ -23,15 +23,16 @@ import os -from moul.log import getLogger +from moul.file.chatlog import ChatlogDirectoryView from moul.file.chatlog import ChatlogMover -from moul.file.chatlog import ChatlogDirectoryView +from moul.file.kiimage import KIImageFixer +from moul.file.localization import parseLocDirectory from moul.file.plasmalog import PlasmalogZipper -from moul.file.kiimage import KIImageFixer +from moul.file.wdysini import AudioIni from moul.file.wdysini import GraphicsIni -from moul.file.wdysini import AudioIni -from moul.file.localization import parseLocDirectory +from moul.log import getLogger + LOG = getLogger('moul.file.directory') class DirectoryCount(object): Modified: pymoul/trunk/src/moul/file/kiimage.py =================================================================== --- pymoul/trunk/src/moul/file/kiimage.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/kiimage.py 2007-02-02 17:34:06 UTC (rev 122) @@ -22,14 +22,15 @@ __revision__ = "$Revision$" import os +import struct import tempfile -import struct +from fnmatch import fnmatch +from stat import ST_MTIME from stat import ST_SIZE -from stat import ST_MTIME -from fnmatch import fnmatch from moul.log import getLogger + JPEG_HEADER = "\377\330\377" LOG = getLogger("moul.kiimage") Modified: pymoul/trunk/src/moul/file/localization.py =================================================================== --- pymoul/trunk/src/moul/file/localization.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/localization.py 2007-02-02 17:34:06 UTC (rev 122) @@ -17,8 +17,15 @@ # """LOC file parser """ +import glob +import os from __future__ import with_statement +from xml.sax import ContentHandler +from xml.sax import make_parser +from xml.sax.handler import feature_namespaces +from moul.log import getLogger + __author__ = "Christian Heimes" __version__ = "$Id$" __revision__ = "$Revision$" @@ -26,14 +33,6 @@ __all__ = ('translationRegistry', 'parseLocDirectory') -import os -import glob - -from xml.sax import ContentHandler -from xml.sax import make_parser -from xml.sax.handler import feature_namespaces - -from moul.log import getLogger LOG = getLogger('moul loc') IGNORE_AGES = [u'OptionsMenu', u'ACA', u'Global', u'KI', u'Heek'] Modified: pymoul/trunk/src/moul/file/plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/plasmalog.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/plasmalog.py 2007-02-02 17:34:06 UTC (rev 122) @@ -22,14 +22,15 @@ __revision__ = "$Revision$" import os -from stat import ST_MTIME import time import zipfile from fnmatch import fnmatch +from stat import ST_MTIME from moul.crypt.elf import decryptElf from moul.log import getLogger + PLASMA_LOG = "plasmalog.txt" LOG = getLogger('moul.plasma') Modified: pymoul/trunk/src/moul/file/tests/test_chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_chatlog.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_chatlog.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.file.chatlog + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.file.chatlog') Modified: pymoul/trunk/src/moul/file/tests/test_directory.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_directory.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_directory.py 2007-02-02 17:34:06 UTC (rev 122) @@ -27,13 +27,13 @@ from moul.file.directory import UruGameDataDirectory from moul.file.directory import UruPersonalDataDirectory - +from moul.file.tests.utils import base +from moul.file.tests.utils import fakeUruGameDir from moul.file.tests.utils import fakeUruPersonalDataDir -from moul.file.tests.utils import fakeUruGameDir from moul.file.tests.utils import mkTempdir from moul.file.tests.utils import rmTempdir -from moul.file.tests.utils import base + class AbstractTest(unittest.TestCase): klass = None Modified: pymoul/trunk/src/moul/file/tests/test_kiimage.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_kiimage.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_kiimage.py 2007-02-02 17:34:06 UTC (rev 122) @@ -22,14 +22,15 @@ __revision__ = "$Revision$" import os +import unittest from StringIO import StringIO -import unittest from doctest import DocTestSuite +from moul.file.kiimage import JPEG_HEADER from moul.file.kiimage import KIImage from moul.file.kiimage import KIImageError -from moul.file.kiimage import JPEG_HEADER + base = os.path.dirname(__file__) kiimg = os.path.join(base, 'avatar.jpg') kiclean = os.path.join(base, 'avatar_clean.jpg') Modified: pymoul/trunk/src/moul/file/tests/test_localization.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_localization.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_localization.py 2007-02-02 17:34:06 UTC (rev 122) @@ -25,10 +25,11 @@ import unittest from doctest import DocTestSuite +from moul.file.localization import parseLoc from moul.file.localization import parseLocDirectory -from moul.file.localization import parseLoc from moul.file.localization import translationRegistry + base = os.path.dirname(__file__) class LocalizationTest(unittest.TestCase): Modified: pymoul/trunk/src/moul/file/tests/test_plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_plasmalog.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_plasmalog.py 2007-02-02 17:34:06 UTC (rev 122) @@ -21,26 +21,25 @@ __version__ = "$Id$" __revision__ = "$Revision$" -import unittest -from doctest import DocTestSuite - import os import shutil +import unittest +from doctest import DocTestSuite from tempfile import mkdtemp -from moul.file.plasmalog import PlasmalogZipper -from moul.file.chatlog import ChatlogMover from moul.file.chatlog import ChatlogDirectoryView +from moul.file.chatlog import ChatlogMover from moul.file.chatlog import ChatlogView -from moul.file.kiimage import KIImageFixer from moul.file.kiimage import KIImage - -from moul.file.tests.utils import fakeUruPersonalDataDir +from moul.file.kiimage import KIImageFixer +from moul.file.plasmalog import PlasmalogZipper +from moul.file.tests.utils import base from moul.file.tests.utils import fakeUruGameDir +from moul.file.tests.utils import fakeUruPersonalDataDir from moul.file.tests.utils import mkTempdir from moul.file.tests.utils import rmTempdir -from moul.file.tests.utils import base + class PlasmaChatTest(unittest.TestCase): def setUp(self): self._tmpdir = mkTempdir() Modified: pymoul/trunk/src/moul/file/tests/test_wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-02-02 17:34:06 UTC (rev 122) @@ -22,17 +22,18 @@ __revision__ = "$Revision$" import os +import shutil import string +import unittest from StringIO import StringIO -import unittest from doctest import DocTestSuite from tempfile import mkdtemp -import shutil from moul.crypt.whatdoyousee import decryptWDYS from moul.file.wdysini import AudioIni from moul.file.wdysini import GraphicsIni + base = os.path.dirname(__file__) gra_enc = os.path.join(base, 'graphics.ini') gra_dec = os.path.join(base, 'graphics.txt') Modified: pymoul/trunk/src/moul/file/tests/utils.py =================================================================== --- pymoul/trunk/src/moul/file/tests/utils.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/tests/utils.py 2007-02-02 17:34:06 UTC (rev 122) @@ -25,6 +25,7 @@ import shutil from tempfile import mkdtemp + FILE_LIST = ['audio.0.elf', 'audiocaps.0.elf', 'audioTimes.0.elf', 'Avatar.0.elf', 'impacts.0.elf', 'LocalizationDataMgr.0.elf', 'Marker.0.elf', 'NetScreener.0.elf', 'patcher.0.elf', 'pipeline.0.elf', Modified: pymoul/trunk/src/moul/file/wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/wdysini.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/file/wdysini.py 2007-02-02 17:34:06 UTC (rev 122) @@ -28,6 +28,7 @@ from moul.crypt.whatdoyousee import encryptWDYS from moul.log import getLogger + LOG = getLogger('moul.file.wdysini') class BoolStringError(ValueError): Modified: pymoul/trunk/src/moul/i18n.py =================================================================== --- pymoul/trunk/src/moul/i18n.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/i18n.py 2007-02-02 17:34:06 UTC (rev 122) @@ -56,6 +56,7 @@ from string import Template + __all__ = ['_', 'PymoulMessageFactory', 'MessageFactory'] class Message(unicode, Template): Modified: pymoul/trunk/src/moul/log.py =================================================================== --- pymoul/trunk/src/moul/log.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/log.py 2007-02-02 17:34:06 UTC (rev 122) @@ -23,14 +23,16 @@ __all__ = ['LOG', 'getLogger', 'signalLogDecorator'] +import logging import os +import platform import sys -import platform -import logging from logging import Formatter from logging import handlers + from moul.metadata import __version__ as moul_version + getLogger = logging.getLogger __FROZEN__ = bool(getattr(sys, 'frozen', False)) Modified: pymoul/trunk/src/moul/osdependent/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -38,9 +38,10 @@ from types import ModuleType from moul.log import getLogger +from moul.osdependent.processinfo import getPidNames from moul.osdependent.processinfo import getPids -from moul.osdependent.processinfo import getPidNames + LOG = getLogger('moul.osdependent') # a program under py2exe is sys.frozen Modified: pymoul/trunk/src/moul/osdependent/darwin/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/darwin/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/darwin/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -23,8 +23,10 @@ import os from subprocess import Popen + from moul.log import getLogger + LOG = getLogger('moul.darwin') LOG.critical('Darwin/Mac support is not tested') Modified: pymoul/trunk/src/moul/osdependent/linux/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/linux/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -23,8 +23,10 @@ import os from subprocess import Popen + from moul.log import getLogger + LOG = getLogger('moul.linux') LOG.critical('Linux support is not tested') Modified: pymoul/trunk/src/moul/osdependent/processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/processinfo.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/processinfo.py 2007-02-02 17:34:06 UTC (rev 122) @@ -59,6 +59,7 @@ elif _plat('win') or _plat('cygwin'): PLAT = 'win' from ctypes import windll, c_ulong, sizeof, c_buffer, byref + PSAPI = windll.psapi KERNEL = windll.kernel32 PROCESS_QUERY_INFORMATION = 0x0400 Modified: pymoul/trunk/src/moul/osdependent/singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/singleapp.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/singleapp.py 2007-02-02 17:34:06 UTC (rev 122) @@ -44,10 +44,10 @@ __revision__ = "$Revision$" import atexit +import getpass import os -import getpass +import tempfile from logging import getLogger -import tempfile LOG = getLogger('singleapp') @@ -68,6 +68,7 @@ LOCK = "dummy" elif os.name == 'posix': import fcntl + LOCK_EX = fcntl.LOCK_EX LOCK_SH = fcntl.LOCK_SH LOCK_NB = fcntl.LOCK_NB Modified: pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/tests/test_osdependent.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.osdependent + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.osdependent'), Modified: pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/tests/test_processinfo.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.osdependent.processinfo + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.osdependent.processinfo'), Modified: pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py =================================================================== --- pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/tests/test_singleapp.py 2007-02-02 17:34:06 UTC (rev 122) @@ -21,20 +21,20 @@ __version__ = "$Id$" __revision__ = "$Revision$" +import os +import sys +import tempfile import unittest +from StringIO import StringIO from doctest import DocTestSuite +from shutil import rmtree +from subprocess import Popen +from moul.osdependent.singleapp import LOCK_SH, LOCK_NB from moul.osdependent.singleapp import SimpleSingleApp from moul.osdependent.singleapp import lock from moul.osdependent.singleapp import unlock -from moul.osdependent.singleapp import LOCK_SH, LOCK_NB -import sys -import os -import tempfile -from shutil import rmtree -from subprocess import Popen -from StringIO import StringIO tmpdir = tempfile.mkdtemp() testfile = os.path.join(tmpdir, 'test.lck') Modified: pymoul/trunk/src/moul/osdependent/win32/__init__.py =================================================================== --- pymoul/trunk/src/moul/osdependent/win32/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/win32/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -24,11 +24,12 @@ import os from subprocess import Popen -from moul.osdependent.win32.winpath import get_homedir as getMyDocuments -from moul.osdependent.win32.winpath import get_appdata as getAppdata from moul.log import getLogger from moul.osdependent.processinfo import getPidNames +from moul.osdependent.win32.winpath import get_appdata as getAppdata +from moul.osdependent.win32.winpath import get_homedir as getMyDocuments + LOG = getLogger('moul.win') MOUL_DIR = "Uru Live" Modified: pymoul/trunk/src/moul/osdependent/win32/registry.py =================================================================== --- pymoul/trunk/src/moul/osdependent/win32/registry.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/win32/registry.py 2007-02-02 17:34:06 UTC (rev 122) @@ -1,6 +1,7 @@ """Based on http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146305 """ import _winreg as wreg + #import cPickle as pickle class WindowsRegistry: Modified: pymoul/trunk/src/moul/osdependent/win32/winpath.py =================================================================== --- pymoul/trunk/src/moul/osdependent/win32/winpath.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/osdependent/win32/winpath.py 2007-02-02 17:34:06 UTC (rev 122) @@ -29,6 +29,7 @@ # standard library modules import _winreg, os + SHELL_FOLDERS = \ r'Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders' USER_SHELL_FOLDERS = \ Modified: pymoul/trunk/src/moul/qt/__init__.py =================================================================== --- pymoul/trunk/src/moul/qt/__init__.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/__init__.py 2007-02-02 17:34:06 UTC (rev 122) @@ -28,6 +28,7 @@ from moul.log import LOG + # DEBUG system infos LOG.debug("PyQt: %s" % PyQt4.QtCore.PYQT_VERSION_STR) Modified: pymoul/trunk/src/moul/qt/errorhandler.py =================================================================== --- pymoul/trunk/src/moul/qt/errorhandler.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/errorhandler.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,16 +26,16 @@ __version__ = "$Id" __revision__ = "$Revision$" +import os import sys -import os -from traceback import format_exception - +from PyQt4 import QtCore from PyQt4 import QtGui -from PyQt4 import QtCore from PyQt4.QtCore import Qt +from traceback import format_exception from moul.log import getLogger + LOG = getLogger('moul.qt.error') Modified: pymoul/trunk/src/moul/qt/localization.py =================================================================== --- pymoul/trunk/src/moul/qt/localization.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/localization.py 2007-02-02 17:34:06 UTC (rev 122) @@ -22,23 +22,24 @@ __version__ = "$Id$" __revision__ = "$Revision$" +import os import sys -import os - +from PyQt4 import QtCore from PyQt4 import QtGui -from PyQt4 import QtCore from PyQt4.QtCore import Qt +from PyQt4.QtCore import SIGNAL from PyQt4.QtCore import pyqtSignature -from PyQt4.QtCore import SIGNAL from moul.config import lookupDir +from moul.file.directory import UruGameDataDirectory from moul.file.localization import translationRegistry as tr -from moul.file.directory import UruGameDataDirectory from moul.log import getLogger from moul.log import signalLogDecorator + +from moul.qt.simpleprogressbar import SimpleProgressbar from moul.qt.threadlet import Threadlet -from moul.qt.simpleprogressbar import SimpleProgressbar + LOG = getLogger('moul.loc') def insertDummyQ(lst): Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-02 17:34:06 UTC (rev 122) @@ -18,40 +18,43 @@ """Moul QT GUI main windows """ -from __future__ import with_statement - -__author__ = "Christian Heimes" -__version__ = "$Id$" -__revision__ = "$Revision$" - import sys - +from PyQt4 import QtCore from PyQt4 import QtGui -from PyQt4 import QtCore from PyQt4.QtCore import Qt +from PyQt4.QtCore import SIGNAL from PyQt4.QtCore import pyqtSignature -from PyQt4.QtCore import SIGNAL +from __future__ import with_statement -from moul.qt.ui.mainwindow import Ui_MainWindow -from moul.qt.localization import LocalizationMixin -from moul.osdependent import isMoulRunning +from moul import metadata from moul.config import lookupDir from moul.file.directory import UruGameDataDirectory from moul.file.directory import UruPersonalDataDirectory +from moul.file.wdysini import AudioIni +from moul.file.wdysini import GraphicsIni from moul.file.wdysini import videoModes from moul.log import getLogger from moul.log import signalLogDecorator +from moul.osdependent import isMoulRunning from moul.server.ping import ServerList from moul.server.ping import isSocketError from moul.time.cavern import CavernTime + +from moul.qt.localization import LocalizationMixin +from moul.qt.simpleprogressbar import SimpleProgressbar from moul.qt.threadlet import YieldingThreadlet -from moul.qt.simpleprogressbar import SimpleProgressbar -from moul import metadata +from moul.qt.ui.mainwindow import Ui_MainWindow +__author__ = "Christian Heimes" +__version__ = "$Id$" +__revision__ = "$Revision$" + + + + # TBR -from moul.file.wdysini import AudioIni -from moul.file.wdysini import GraphicsIni + LOG = getLogger('moul.qt') class MainWindow(QtGui.QMainWindow, Ui_MainWindow, LocalizationMixin): Modified: pymoul/trunk/src/moul/qt/moulqt.py =================================================================== --- pymoul/trunk/src/moul/qt/moulqt.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/moulqt.py 2007-02-02 17:34:06 UTC (rev 122) @@ -24,19 +24,20 @@ __revision__ = "$Revision$" import sys - from PyQt4 import QtGui -from moul.qt.mainwindow import MainWindow -from moul.qt.errorhandler import criticalMB -from moul.qt.errorhandler import setupQtExceptHook -from moul.qt.errorhandler import removeQtExceptHook -from moul.osdependent.singleapp import SimpleSingleApp from moul.config import getPyMoulDataDir -from moul.osdependent import isMoulRunning from moul.log import createLogfile from moul.log import getLogger +from moul.osdependent import isMoulRunning +from moul.osdependent.singleapp import SimpleSingleApp +from moul.qt.errorhandler import criticalMB +from moul.qt.errorhandler import removeQtExceptHook +from moul.qt.errorhandler import setupQtExceptHook +from moul.qt.mainwindow import MainWindow + + LOG = getLogger('moul.qt') def main(*args): Modified: pymoul/trunk/src/moul/qt/simpleprogressbar.py =================================================================== --- pymoul/trunk/src/moul/qt/simpleprogressbar.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/simpleprogressbar.py 2007-02-02 17:34:06 UTC (rev 122) @@ -29,6 +29,7 @@ from moul.qt.ui.simpleprogressbar import Ui_SimpleProgressbar + class SimpleProgressbar(QtGui.QDialog, Ui_SimpleProgressbar): """A simple progress bar dialog Modified: pymoul/trunk/src/moul/qt/threadlet.py =================================================================== --- pymoul/trunk/src/moul/qt/threadlet.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/threadlet.py 2007-02-02 17:34:06 UTC (rev 122) @@ -24,11 +24,12 @@ __revision__ = "$Revision: 110 $" import sys - from PyQt4 import QtCore -from moul.log import getLogger from PyQt4.QtCore import SIGNAL +from moul.log import getLogger + + LOG = getLogger('moul.tasklet') class Threadlet(QtCore.QThread): Modified: pymoul/trunk/src/moul/qt/ui/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/ui/mainwindow.py 2007-02-02 17:34:06 UTC (rev 122) @@ -5,11 +5,13 @@ # Created: Fri Feb 2 17:26:46 2007 # by: PyQt4 UI code generator 4.1.1 # -# WARNING! All changes made in this file will be lost! +# WARNING! All changes made in this file will be losimport sys +from PyQt4 import QtCore, Qt -import sys -from PyQt4 import QtCore, QtGui +t! +Gui + class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") Modified: pymoul/trunk/src/moul/qt/ui/moulqt_rc.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/moulqt_rc.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/ui/moulqt_rc.py 2007-02-02 17:34:06 UTC (rev 122) @@ -5,10 +5,12 @@ # Created: So Jan 28 18:10:39 2007 # by: The Resource Compiler for PyQt (Qt v4.2.0) # -# WARNING! All changes made in this file will be lost! +# WARNING! All changes made in this file will be losfrom PyQt4 import QtC -from PyQt4 import QtCore +t! +ore + qt_resource_data = "\ \x00\x00\x07\xea\ \x89\ Modified: pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py =================================================================== --- pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/qt/ui/simpleprogressbar.py 2007-02-02 17:34:06 UTC (rev 122) @@ -5,11 +5,13 @@ # Created: Fri Feb 2 15:36:30 2007 # by: PyQt4 UI code generator 4.1.1 # -# WARNING! All changes made in this file will be lost! +# WARNING! All changes made in this file will be losimport sys +from PyQt4 import QtCore, Qt -import sys -from PyQt4 import QtCore, QtGui +t! +Gui + class Ui_SimpleProgressbar(object): def setupUi(self, SimpleProgressbar): SimpleProgressbar.setObjectName("SimpleProgressbar") Modified: pymoul/trunk/src/moul/server/ping.py =================================================================== --- pymoul/trunk/src/moul/server/ping.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/server/ping.py 2007-02-02 17:34:06 UTC (rev 122) @@ -24,6 +24,7 @@ from moul.server.serverlist import PORT from moul.server.serverlist import SERVER_LIST + def isSocketError(stat): return isinstance(stat, socket.error) Modified: pymoul/trunk/src/moul/server/tests/test_ping.py =================================================================== --- pymoul/trunk/src/moul/server/tests/test_ping.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/server/tests/test_ping.py 2007-02-02 17:34:06 UTC (rev 122) @@ -27,9 +27,10 @@ from moul.server.ping import Server from moul.server.ping import ServerList from moul.server.ping import isSocketError +from moul.server.serverlist import PORT from moul.server.serverlist import SERVER_LIST -from moul.server.serverlist import PORT + class PingServerTest(unittest.TestCase): def test_ping_working(self): Modified: pymoul/trunk/src/moul/server/tests/test_serverlist.py =================================================================== --- pymoul/trunk/src/moul/server/tests/test_serverlist.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/server/tests/test_serverlist.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.server.serverlist + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.server.serverlist'), Modified: pymoul/trunk/src/moul/tests/test_i18n.py =================================================================== --- pymoul/trunk/src/moul/tests/test_i18n.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/tests/test_i18n.py 2007-02-02 17:34:06 UTC (rev 122) @@ -26,6 +26,7 @@ import moul.i18n + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.i18n'), Modified: pymoul/trunk/src/moul/time/cavern.py =================================================================== --- pymoul/trunk/src/moul/time/cavern.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/time/cavern.py 2007-02-02 17:34:06 UTC (rev 122) @@ -24,18 +24,20 @@ __all__ = ['CavernTime'] from datetime import datetime +from pytz import all_timezones +from pytz import timezone +from pytz import utc as UTC +from moul.osdependent import __FROZEN__ + # pytz is an egg -from moul.osdependent import __FROZEN__ if not __FROZEN__: import pkg_resources pkg_resources.require("pytz>=2006p") #from pytz import common_timezones -from pytz import all_timezones -from pytz import timezone -from pytz import utc as UTC + ## not used in the current version #SUPPORTED_TZ = ('America', 'Canada', 'Etc', 'Europe', 'US') #ADDITIONAL_TZ = ('GMT', 'UTC') Modified: pymoul/trunk/src/moul/time/dni.py =================================================================== --- pymoul/trunk/src/moul/time/dni.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/time/dni.py 2007-02-02 17:34:06 UTC (rev 122) @@ -23,6 +23,7 @@ from operator import mul + FARAH_1 = -7656 # hahrtee fahrah 1 starts at April 21st 7656 B.C DNI_FACTORS = ( ('hahrtee fahrah', 625), Modified: pymoul/trunk/src/moul/time/tests/test_cavern.py =================================================================== --- pymoul/trunk/src/moul/time/tests/test_cavern.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/time/tests/test_cavern.py 2007-02-02 17:34:06 UTC (rev 122) @@ -27,6 +27,7 @@ import moul.time.cavern + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.time.cavern'), Modified: pymoul/trunk/src/moul/time/tests/test_dni.py =================================================================== --- pymoul/trunk/src/moul/time/tests/test_dni.py 2007-02-02 17:22:22 UTC (rev 121) +++ pymoul/trunk/src/moul/time/tests/test_dni.py 2007-02-02 17:34:06 UTC (rev 122) @@ -27,6 +27,7 @@ import moul.time.dni + def test_suite(): return unittest.TestSuite(( DocTestSuite('moul.time.dni'), Added: pymoul/trunk/utilities/importorder.py =================================================================== --- pymoul/trunk/utilities/importorder.py (rev 0) +++ pymoul/trunk/utilities/importorder.py 2007-02-02 17:34:06 UTC (rev 122) @@ -0,0 +1,386 @@ +#!/usr/bin/env python2.4 +############################################################################## +# +# Copyright (c) 2001, 2002 Zope Corporation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# +############################################################################## +""" +This tool basically can be used to rearrange and order imported +python packages in a particular format for .py files. + +Import Order:- + 1. import modules from standard python library/global packages + 2. import modules from the moul package + 3. import modules from the moul.qt package + +.py [-dfhst] [file/directory] + +-d / --dir + It will sort all the .py files imported python packages in the + entire directory . + +-D / --display + Displays Import order for all .py files in the specified path. + +-f / --file + It will order all imported python packages in a file. + +-s / --split + It splits up multiple import modules in a single import statement + into multiple import statements. + + +-t / --test + It Displays Import order for all py files in the specified path and + doesn't write importorder into .py file. + +$Id: order.py 38688 2005-09-29 16:33:36Z fdrake $ +""" + +import getopt +import glob +import os +import string +import sys +import tokenize + + +PYTHONFILE_FILTER = '*.py' +FROMIMPORT = 'from ' +IMPORT = 'import ' +FROMIMPORT_ZOPE = 'from moul' +IMPORT_ZOPE = 'import moul' +FROMIMPORT_ZOPE_APP = 'from moul.qt' +IMPORT_ZOPE_APP = 'import moul.qt' +NO_CHARACTERS = 80 + + +def getPythonFiles(path): + """returns list of .py files in the specified path""" + pyfiles = [] + if not os.path.exists(path): + print >> sys.stderr, '** Error: '+ path +' not a valid path **' + sys.exit(0) + + #checking path is file + if os.path.isfile(path): + pyfiles.append(path) + + #checking path is a directory + elif os.path.isdir(path): + path = os.path.join(path, PYTHONFILE_FILTER) + path, filter = os.path.split(path) + pyfiles.extend(glob.glob(os.path.join(path, filter))) + + #checking in sub directories + for root, dirs, files in os.walk(path): + for dir in dirs: + pyfiles.extend(glob.glob(\ + os.path.join(root, dir, filter))) + + return pyfiles + + +def importOrderProcessing(path, display=None, write=None, split=None): + """process import order for all .py files in the specified path.""" + pyfiles = getPythonFiles(path) + + print '*****************************************************************' + for file in pyfiles: + print '** File : %s **\n' % (file) + import_block = getFileImportOrder(file, split) + import_order = import_block['import_order'] + non_import_order = import_block['non_import_order'] + if display: + print non_import_order + print '**.......................................................**' + print import_order + if write: + writeFormatedContent(file, import_order, non_import_order) + + + print '*****************************************************************' + + +def getFileImportOrder(file, split=None): + """returns formatted imported packages content""" + import_content = getFileImportContent(file) + import_list = appendImportsToList(import_content) + + #separating from and import statements + imp_list = filterList(import_list, 'import ') + from_list = filterList(import_list, 'from ') + + #extracting non import content + non_import_block = removeList(import_list, imp_list) + non_import_block = removeList(non_import_block, from_list) + non_import_block_fmt = formateBlock(non_import_block) + + #comma separated imports into individual import statements + if split: + imp_list = individualImportLines(imp_list) + from_list = individualImportLines(from_list) + + #extracting zope.app package imports + zope_app_imp_list = filterList(imp_list, IMPORT_ZOPE_APP) + zope_app_from_list = filterList(from_list, FROMIMPORT_ZOPE_APP) + + rem_imp_list1 = removeList(imp_list, zope_app_imp_list) + rem_from_list1 = removeList(from_list, zope_app_from_list) + + #extracting zope package imports + zope_imp_list = filterList(rem_imp_list1, IMPORT_ZOPE) + zope_from_list = filterList(rem_from_list1, FROMIMPORT_ZOPE) + + #extracting global package imports + global_imp_list = removeList(rem_imp_list1, zope_imp_list) + global_from_list = removeList(rem_from_list1, zope_from_list) + + #formating the global, zope and zope.app package imports + format_import_content = mergeAllBlocks(global_imp_list, + zope_imp_list, + zope_app_imp_list, + global_from_list, + zope_from_list, + zope_app_from_list) + + #merging import block and non import block + non_import_block_fmt = string.strip(non_import_block_fmt) + if len(non_import_block_fmt) > 0: + non_import_block_fmt += '\n\n' + + fmt_content = format_import_content + non_import_block_fmt + + return {'import_order':fmt_content, + 'non_import_order':import_content} + + +def getFileImportContent(file): + """returns the imports content available at the top in the .py file""" + import_list = [] + lines = [] + import_block_start_indx = 0 + import_block_end_indx = 0 + index = 0 + for t in tokenize.generate_tokens(open(file, 'rU').readline): + type, string, start, end, line = t + line_no = start[0] + line_len = len(line) + + if line_no not in lines: + lines.append(line_no) + index += line_len + if string in ['from','import'] and line not in import_list: + if len(import_list) == 0: + import_block_start_indx = (index - line_len) + import_list.append(line) + import_block_end_indx = index + elif string in ['def', 'class']: + break + + fc = open(file, 'r').read() + return fc[import_block_start_indx-4:import_block_end_indx-4] + + +def appendImportsToList(import_content): + """returns list of imports of the file""" + import_list = import_content.split('\\') + if len(import_list) > 1: + import_list = concatinateBreakImports(import_list) + else: + import_list = import_content.split('\n') + + return import_list + + +def concatinateBreakImports(import_list): + """concatinate imports into single item in a list""" + indx = 1 + concate_list = [] + for item in import_list: + if indx == 1: + concate_list += item.split('\n') + else: + concate_item = [] + item = string.lstrip(item) + item_list = item.split('\n') + concate_litem = concate_list[-1:][0] + item_list_fitem = item_list[:1][0] + concate_item.append(concate_litem + item_list_fitem) + concate_list = concate_list[:-1] + concate_item + item_list[1:] + indx += 1 + + return concate_list + + +def filterList(list, filter): + """returns filtered list""" + filter_list = [item for item in list + if item.startswith(filter)] + filter_list.sort() + return filter_list + +def individualImportLines(import_list): + """changes comma separated imports to individual import lines""" + import_str = 'import ' + new_import_list = [] + for item in import_list: + if item.find(',') > -1 and (item.startswith('from ') or + item.startswith('import ')): + import_item_split = item.split('import ') + from_import_item = import_item_split[0] + comma_imports = import_item_split[1].split(',') + new_list = [] + for mod_item in comma_imports: + mod_item = string.lstrip(mod_item) + new_list.append(from_import_item + import_str + mod_item) + new_import_list += new_list + else: + new_import_list.append(item) + + return new_import_list + + +def removeList(list, rem_list): + return [item for item in list + if item not in rem_list] + +def mergeAllBlocks(global_imp_list, zope_imp_list, zope_app_imp_list, + global_from_list, zope_from_list, zope_app_from_list): + """merges global, zope and zope.app imports """ + import_block = '' + global_imp_block = formateBlock(global_imp_list) + global_from_block = formateBlock(global_from_list) + zope_imp_block = formateBlock(zope_imp_list) + zope_from_block = formateBlock(zope_from_list) + zope_app_imp_block = formateBlock(zope_app_imp_list) + zope_app_from_block = formateBlock(zope_app_from_list) + + import_block += formatsFromAndImportBlock(global_imp_block, + global_from_block) + + import_block += formatsFromAndImportBlock(zope_imp_block, + zope_from_block) + + import_block += formatsFromAndImportBlock(zope_app_imp_block, + zope_app_from_block) + + return import_block + + +def formatsFromAndImportBlock(imp_block, from_block): + """formats from and import block""" + import_block = '' + if imp_block is not '' or from_block is not '': + import_block += imp_block + import_block += from_block + import_block += '\n' + return import_block + + +def formateBlock(imp_list): + """formats import blocks""" + import_block = '' + if imp_list is not None: + for item in imp_list: + if len(item) > NO_CHARACTERS: + import_block += formatingLargerImports(item) + else: + import_block += str(item) + '\n' + return import_block + +def formatingLargerImports(import_content): + """formates if imports greater than 80 character""" + formatted_line = '' + import_fline = import_content[:NO_CHARACTERS] + + dot_indx = import_fline.rfind('.') + blank_space_indx = import_fline.rfind(' ') + + split_line_indx = 0 + if dot_indx > -1: + split_line_indx = dot_indx + if blank_space_indx > -1 and blank_space_indx < dot_indx: + split_line_indx = blank_space_indx + elif blank_space_indx > -1: + split_line_indx = blank_space_indx + if dot_indx > -1 and dot_indx < blank_space_indx: + split_line_indx = blank_space_indx + + split_line_indx += 1 + + formatted_line += import_content[:split_line_indx] +'\\\n' + if import_content.startswith(IMPORT): + formatted_line += (' ' + + import_content[split_line_indx:] + '\n') + elif import_content.startswith(FROMIMPORT): + formatted_line += (' ' + + import_content[split_line_indx:] + '\n') + + return formatted_line + + +def writeFormatedContent(file, fmt_content, non_fmt_content): + """writes formatted content into the file""" + + fp = open(file, 'r') + file_content = fp.read() + fp.close() + + fp = open(file, 'w') + rep_content = string.replace(file_content, non_fmt_content, + fmt_content) + fp.write(rep_content) + fp.close() + + +def main(argv=None): + if argv is None: + argv = sys.argv + try: + opts, args = getopt.getopt(sys.argv[1:], "dDfhst", + ["help", "dir", "file", "display", + "split", "test"]) + except getopt.error, msg: + print msg + print "Try `python %s -h' for more information." % argv[0] + return 2 + + path = None + display = None + write = True + split = None + + for k, v in opts: + if k in ("-h", "--help"): + print __doc__ + sys.exit(0) + elif k in ("-d", "--dir"): + path = args[0] + elif k in ("-f", "--file"): + path = args[0] + elif k in ("-D", "--display"): + path = args[0] + display = True + elif k in ("-s", "--split"): + path = args[0] + split = True + elif k in ("-t", "--test"): + path = args[0] + display = True + write = False + + importOrderProcessing(path, display, write, split) + return 0 + +if __name__ == '__main__': + main() + Property changes on: pymoul/trunk/utilities/importorder.py ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-05 03:04:22
|
Revision: 135 http://pymoul.svn.sourceforge.net/pymoul/?rev=135&view=rev Author: tiran Date: 2007-02-04 19:04:23 -0800 (Sun, 04 Feb 2007) Log Message: ----------- UI reneval updates languages added not implemented infos Modified Paths: -------------- pymoul/trunk/doc/XXXreport.html pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts pymoul/trunk/src/moul/qt/localization.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/ui/mainwindow.py pymoul/trunk/src/moul/qt/ui/mainwindow.ui pymoul/trunk/src/moul/qt/utils.py Modified: pymoul/trunk/doc/XXXreport.html =================================================================== --- pymoul/trunk/doc/XXXreport.html 2007-02-05 00:33:55 UTC (rev 134) +++ pymoul/trunk/doc/XXXreport.html 2007-02-05 03:04:23 UTC (rev 135) @@ -3,19 +3,15 @@ <body> <h1>pyMoul - Developer report tools: XXX/TODO/FIXME comments</h1> -<p>Generated on Fri, 02 Feb 2007 18:18:36 CET, based on Zope 3's XXX report</p> +<p>Generated on Mon, 05 Feb 2007 03:58:55 CET, based on Zope 3's XXX report</p> <hr> <h3>Summary</h3> <p> - There are currently 100 XXX/TODO/FIXME comments. + There are currently 94 XXX/TODO/FIXME comments. </p> <hr/> <h3>Listing</h3> -<ol><li><b>File: utilities/../.svn/text-base/ez_setup.py.svn-base:92</b><br/><pre> # XXX could we install in a subprocess here? -base-93- print >>sys.stderr, ( -base-94- "The required version of setuptools (>=%s) is not available, and\n" -base-95- "can't be installed while this script is running. Please install\n" -</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are +<ol><li><b>File: utilities/../.svn/text-base/test.py.svn-base:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are base-549- # separated by a horizontal dash line. Only the first one of base-550- # them is now colorized properly. base-551- header = lines[0] @@ -31,16 +27,8 @@ base-691- from zope.tales.tales import TALESTracebackSupplement base-692- from zope.pagetemplate.pagetemplate \ base-693- import PageTemplateTracebackSupplement -</pre></li><li><b>File: utilities/../.svn/text-base/setup_win32.py.svn-base:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: -base-85- pexe['inno_templates'] = "template.iss" -base-86- pexe['app_name'] = 'pyMoul' -base-87- pexe['includes'].extend(findPyTz()) -</pre></li><li><b>File: utilities/../.svn/text-base/distutils_upx.py.svn-base:117</b><br/><pre> sys.exit(retcode) # XXX -base-118- -base-119- def _upxAvailable(self): -base-120- """Search for UPX in search path -</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/chatlog.py.svn-base:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file -base-269- return iter(self._fd) +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/chatlog.py.svn-base:280</b><br/><pre> # TODO: add parser, currently simply iterates over the file +base-281- return iter(self._fd) </pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:112</b><br/><pre> # XXX use struct base-113- if header is None: base-114- fd = self._fd @@ -49,55 +37,59 @@ base-128- if size is None: base-129- size = self.getFileSize() base-130- leading = 4* [None] -</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:156</b><br/><pre> # TODO: write me -base-157- pass -base-158- -base-159-class Constrain(object): -</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check -base-541- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui -base-542- # microphon missing -> OS mixer -base-543- } -</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. -base-629- -base-630-class GraphicsIni(ConfFile): -base-631- _filename = 'graphics.ini' -</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/directory.py.svn-base:58</b><br/><pre> # TODO: fnmatch -base-59- return len([name for name in os.listdir(path) -base-60- if os.path.isfile(os.path.join(path, name))]) -base-61- -</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:104</b><br/><pre> # TODO: more -base-105- -base-106- def test_publicapi_create(self): -base-107- inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) -</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:115</b><br/><pre> # TODO: more -base-116- -base-117-class AudioIniTest(GenericIniTest): -base-118- enc = aud_enc -</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:153</b><br/><pre> #XXX self.failIf(p.isChanged()) -base-154- -base-155- p.screenres = 0 -base-156- eq(p._get('Graphics.Width'), 800) -</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/utils.py.svn-base:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 -base-80- fd = open(os.path.join(path, fname), 'wb') -base-81- fd.write('dummy') -base-82- fd.close() -</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:104</b><br/><pre> # TODO: more +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:267</b><br/><pre> # XXX: move checks to copy method! +base-268- if os.path.isfile(fixed): +base-269- if fixedNewer(ki, fixed): +base-270- LOG.debug("File %s exists but was changed." % name) +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:157</b><br/><pre> # TODO: write me +base-158- pass +base-159- +base-160-class Constrain(object): +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:541</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +base-542- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui +base-543- # microphon missing -> OS mixer +base-544- } +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:629</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +base-630- +base-631-class GraphicsIni(ConfFile): +base-632- _filename = 'graphics.ini' +</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/directory.py.svn-base:59</b><br/><pre> # TODO: fnmatch +base-60- return len([name for name in os.listdir(path) +base-61- if os.path.isfile(os.path.join(path, name))]) +base-62- +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:105</b><br/><pre> # TODO: more +base-106- +base-107- def test_publicapi_create(self): +base-108- inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:116</b><br/><pre> # TODO: more +base-117- +base-118-class AudioIniTest(GenericIniTest): +base-119- enc = aud_enc +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:154</b><br/><pre> #XXX self.failIf(p.isChanged()) +base-155- +base-156- p.screenres = 0 +base-157- eq(p._get('Graphics.Width'), 800) +</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/utils.py.svn-base:80</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 +base-81- fd = open(os.path.join(path, fname), 'wb') +base-82- fd.write('dummy') +base-83- fd.close() +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:105</b><br/><pre> # TODO: more def test_publicapi_create(self): inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) -</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:115</b><br/><pre> # TODO: more +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:116</b><br/><pre> # TODO: more class AudioIniTest(GenericIniTest): enc = aud_enc -</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:153</b><br/><pre> #XXX self.failIf(p.isChanged()) +</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:154</b><br/><pre> #XXX self.failIf(p.isChanged()) p.screenres = 0 eq(p._get('Graphics.Width'), 800) -</pre></li><li><b>File: utilities/../src/moul/file/tests/utils.py:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 +</pre></li><li><b>File: utilities/../src/moul/file/tests/utils.py:80</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 fd = open(os.path.join(path, fname), 'wb') fd.write('dummy') fd.close() -</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py:280</b><br/><pre> # TODO: add parser, currently simply iterates over the file return iter(self._fd) </pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:112</b><br/><pre> # XXX use struct if header is None: @@ -107,15 +99,19 @@ if size is None: size = self.getFileSize() leading = 4* [None] -</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:156</b><br/><pre> # TODO: write me +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:267</b><br/><pre> # XXX: move checks to copy method! + if os.path.isfile(fixed): + if fixedNewer(ki, fixed): + LOG.debug("File %s exists but was changed." % name) +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:157</b><br/><pre> # TODO: write me pass class Constrain(object): -</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:541</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui # microphon missing -> OS mixer } -</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:629</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. class GraphicsIni(ConfFile): _filename = 'graphics.ini' @@ -127,7 +123,11 @@ if size is None: size = self.getFileSize() leading = 4* [None] -</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py~:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py~:267</b><br/><pre> # XXX: move checks to copy method! + if os.path.isfile(fixed): + if fixedNewer(ki, fixed): + LOG.debug("File %s exists but was changed." % name) +</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py~:280</b><br/><pre> # TODO: add parser, currently simply iterates over the file return iter(self._fd) </pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:156</b><br/><pre> # TODO: write me pass @@ -141,189 +141,558 @@ class GraphicsIni(ConfFile): _filename = 'graphics.ini' -</pre></li><li><b>File: utilities/../src/moul/file/directory.py:58</b><br/><pre> # TODO: fnmatch +</pre></li><li><b>File: utilities/../src/moul/file/directory.py:59</b><br/><pre> # TODO: fnmatch return len([name for name in os.listdir(path) if os.path.isfile(os.path.join(path, name))]) -</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:76</b><br/><pre> # XXX: dos format -base-77- return data.replace("\r\n", "\n") -base-78- -base-79-def encryptWDYS(instr, fout): -</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:86</b><br/><pre> # XXX: dos format -base-87- instr = instr.replace("\n", "\r\n") -base-88- fout.seek(0) -base-89- fout.write(HEADER) -</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/elf.py.svn-base:70</b><br/><pre> # XXX NotImplemented -base-71- raise NotImplementedError -base-72- -base-73-def decipher(crypt, size, key): -</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:76</b><br/><pre> # XXX: dos format +</pre></li><li><b>File: utilities/../src/moul/file/directory.py~:59</b><br/><pre> # TODO: fnmatch + return len([name for name in os.listdir(path) + if os.path.isfile(os.path.join(path, name))]) + +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:77</b><br/><pre> # XXX: dos format +base-78- return data.replace("\r\n", "\n") +base-79- +base-80-def encryptWDYS(instr, fout): +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:87</b><br/><pre> # XXX: dos format +base-88- instr = instr.replace("\n", "\r\n") +base-89- fout.seek(0) +base-90- fout.write(HEADER) +</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/elf.py.svn-base:71</b><br/><pre> # XXX NotImplemented +base-72- raise NotImplementedError +base-73- +base-74-def decipher(crypt, size, key): +</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:77</b><br/><pre> # XXX: dos format return data.replace("\r\n", "\n") def encryptWDYS(instr, fout): -</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:86</b><br/><pre> # XXX: dos format +</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:87</b><br/><pre> # XXX: dos format instr = instr.replace("\n", "\r\n") fout.seek(0) fout.write(HEADER) -</pre></li><li><b>File: utilities/../src/moul/crypt/elf.py:70</b><br/><pre> # XXX NotImplemented +</pre></li><li><b>File: utilities/../src/moul/crypt/elf.py:71</b><br/><pre> # XXX NotImplemented raise NotImplementedError def decipher(crypt, size, key): -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/localization.py.svn-base:78</b><br/><pre> # TODO: other message box -base-79- self._journal_progressbar = SimpleProgressbar(self) -base-80- self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) -base-81- self._journal_progressbar.setProgressbar(0, 1, 0) -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:76</b><br/><pre> # TODO: checks -base-77- self.urudatadir.initializeFactories() -base-78- -base-79- # init handlers -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:152</b><br/><pre> # FIXME: signal doesn't do anything -base-153- self.emit(SIGNAL("close()")) -base-154- event.accept() -base-155- event.ignore() -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:189</b><br/><pre> # TODO: msg -base-190- return -base-191- -base-192- self.pb_kiimage_repair.setEnabled(False) -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:219</b><br/><pre> # TODO: msg -base-220- -base-221- # ************************************************************************ -base-222- # graphics settings -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit -base-238- -base-239- @signalLogDecorator(LOG) -base-240- def on_graphicsini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:297</b><br/><pre> # XXX: fixme -base-298- txt = videoModes.getVidModeHuman(idx) -base-299- self.lb_screenres.setText(QtCore.QString(txt)) -base-300- self._graphics_ini.screenres = idx -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit -base-388- -base-389- @signalLogDecorator(LOG) -base-390- def on_audioini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active -base-507- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) -base-508- timer.start() -base-509- -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:602</b><br/><pre> # TODO: thread safety! -base-603- self.servers = servers -base-604- if not self.isRunning(): -base-605- self.start() -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:608</b><br/><pre> # TODO: thread safety! -base-609- # emit a list of names first -base-610- for server in self.servers: -base-611- self.emit(SIGNAL("server(const QString&)"), server.name) -</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:644</b><br/><pre> # TODO check this -base-645- self._running = False -base-646- self.condition.wakeAll() -base-647- +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:151</b><br/><pre> # FIXME: signal doesn't do anything +base-152- self.emit(SIGNAL("close()")) +base-153- event.accept() +base-154- event.ignore() +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:222</b><br/><pre> # TODO: msg +base-223- return +base-224- +base-225- self.pb_kiimage_repair.setEnabled(False) +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:248</b><br/><pre> del self._kiimage_threadlet# TODO: other message box +base-249- del self._kiimage_progressbar +base-250- self.pb_kiimage_repair.setEnabled(True) +base:251: # TODO: msg +base-252- +base-253- # ************************************************************************ +base-254- # system tray +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:281</b><br/><pre> # TODO: needs optimization? run only when timer tab is active +base-282- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) +base-283- timer.start() +base-284- +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:375</b><br/><pre> # TODO: thread safety! +base-376- self.servers = servers +base-377- if not self.isRunning(): +base-378- self.start() +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:381</b><br/><pre> # TODO: thread safety! +base-382- # emit a list of names first +base-383- for server in self.servers: +base-384- self.emit(SIGNAL("server(const QString&)"), server.name) +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:417</b><br/><pre> # TODO check this +base-418- self._running = False +base-419- self.condition.wakeAll() +base-420- </pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/errorhandler.py.svn-base:46</b><br/><pre> # TODO: translation aware base-47- LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) -base:48: return # XXX: remove -base-49- try: -base-50- title= QtGui.QApplication.translate("excepthook", -base-51- "An unhandled error has occured", -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:76</b><br/><pre> # TODO: checks - self.urudatadir.initializeFactories() - - # init handlers -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:152</b><br/><pre> # FIXME: signal doesn't do anything +base-48- if not getattr(sys, 'frozen', False): +base-49- return +</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/wdysini.py.svn-base:67</b><br/><pre> self.context.emit(SIGNAL("audioini_load()")) # XXX: hard coded emit +base:68: self.context.emit(SIGNAL("graphicsini_load()")) # XXX: hard coded emit +base-69- +base-70- @pyqtSignature("bool") +base-71- def on_graphicsChanged(self, boolean): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:143</b><br/><pre> # FIXME: signal doesn't do anything self.emit(SIGNAL("close()")) event.accept() event.ignore() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:189</b><br/><pre> # TODO: msg +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:214</b><br/><pre> # TODO: msg return self.pb_kiimage_repair.setEnabled(False) -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:236</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:241</b><br/><pre> del self._kiimage_threadlet# TODO: other message box + del self._kiimage_progressbar + self.pb_kiimage_repair.setEnabled(True) - @signalLogDecorator(LOG) - def on_graphicsini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:296</b><br/><pre> # XXX: fixme - txt = videoModes.getVidModeHuman(idx) - self.lb_screenres.setText(QtCore.QString(txt)) - self._graphics_ini.screenres = idx -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:386</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit - - @signalLogDecorator(LOG) - def on_audioini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:505</b><br/><pre> # TODO: needs optimization? run only when timer tab is active + @pyqtSignature("") + def on_pb_log_archive_clicked(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:288</b><br/><pre> # TODO: needs optimization? run only when timer tab is active self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) timer.start() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:601</b><br/><pre> # TODO: thread safety! +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:382</b><br/><pre> # TODO: thread safety! self.servers = servers if not self.isRunning(): self.start() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:607</b><br/><pre> # TODO: thread safety! +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:388</b><br/><pre> # TODO: thread safety! # emit a list of names first for server in self.servers: self.emit(SIGNAL("server(const QString&)"), server.name) -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:643</b><br/><pre> # TODO check this +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:424</b><br/><pre> # TODO check this self._running = False self.condition.wakeAll() -</pre></li><li><b>File: utilities/../src/moul/qt/localization.py:78</b><br/><pre> # TODO: other message box - self._journal_progressbar = SimpleProgressbar(self) - self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) - self._journal_progressbar.setProgressbar(0, 1, 0) -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:76</b><br/><pre> # TODO: checks - self.urudatadir.initializeFactories() - - # init handlers -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:152</b><br/><pre> # FIXME: signal doesn't do anything +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:143</b><br/><pre> # FIXME: signal doesn't do anything self.emit(SIGNAL("close()")) event.accept() event.ignore() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:189</b><br/><pre> # TODO: msg +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:214</b><br/><pre> # TODO: msg return self.pb_kiimage_repair.setEnabled(False) -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:219</b><br/><pre> # TODO: msg +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:241</b><br/><pre> del self._kiimage_threadlet# TODO: other message box + del self._kiimage_progressbar + self.pb_kiimage_repair.setEnabled(True) - # ************************************************************************ - # graphics settings -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit - - @signalLogDecorator(LOG) - def on_graphicsini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:297</b><br/><pre> # XXX: fixme - txt = videoModes.getVidModeHuman(idx) - self.lb_screenres.setText(QtCore.QString(txt)) - self._graphics_ini.screenres = idx -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit - - @signalLogDecorator(LOG) - def on_audioini_loaded(self): -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active + @pyqtSignature("") + def on_pb_log_archive_clicked(self): +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:288</b><br/><pre> # TODO: needs optimization? run only when timer tab is active self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) timer.start() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:602</b><br/><pre> # TODO: thread safety! +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:382</b><br/><pre> # TODO: thread safety! self.servers = servers if not self.isRunning(): self.start() -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:608</b><br/><pre> # TODO: thread safety! +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:388</b><br/><pre> # TODO: thread safety! # emit a list of names first for server in self.servers: self.emit(SIGNAL("server(const QString&)"), server.name) -</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:644</b><br/><pre> # TODO check this +</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:424</b><br/><pre> # TODO check this self._running = False self.condition.wakeAll() </pre></li><li><b>File: utilities/../src/moul/qt/errorhandler.py:46</b><br/><pre> # TODO: translation aware LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) - try: - title= QtGui.QApplication.translate("excepthook", - "An unhandled error has occured", -</pre></li><li><b>File: utilities/../src/moul/osdependent/__init__.py:116</b><br/><pre># XXX: what about cygwin, bsd and others? + if not getattr(sys, 'frozen', False): + return +</pre></li><li><b>File: utilities/../src/moul/qt/errorhandler.py~:46</b><br/><pre> # TODO: translation aware + LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) + if not getattr(sys, 'frozen', False): + return +</pre></li><li><b>File: utilities/../src/moul/qt/wdysini.py~:68</b><br/><pre> self.context.emit(SIGNAL("audioini_load()")) # XXX: hard coded emit + + @signalLogDecorator(LOG) + @pyqtSignature("bool") +</pre></li><li><b>File: utilities/../src/moul/qt/wdysini.py:67</b><br/><pre> self.context.emit(SIGNAL("audioini_load()")) # XXX: hard coded emit + + @pyqtSignature("bool") + def on_graphicsChanged(self, boolean): +</pre></li><li><b>File: utilities/../src/moul/osdependent/__init__.py:117</b><br/><pre># XXX: what about cygwin, bsd and others? _thismodule = sys.modules[__name__] if __WIN32__: from moul.osdependent import win32 as osdep_win32 -</pre></li><li><b>File: utilities/../src/moul/osdependent/.svn/text-base/__init__.py.svn-base:116</b><br/><pre># XXX: what about cygwin, bsd and others? -base-117-_thismodule = sys.modules[__name__] -base-118-if __WIN32__: -base-119- from moul.osdependent import win32 as osdep_win32 +</pre></li><li><b>File: utilities/../src/moul/osdependent/.svn/text-base/__init__.py.svn-base:117</b><br/><pre># XXX: what about cygwin, bsd and others? +base-118-_thismodule = sys.modules[__name__] +base-119-if __WIN32__: +base-120- from moul.osdependent import win32 as osdep_win32 +</pre></li><li><b>File: utilities/../doc/.svn/text-base/XXXreport.html.svn-base:14</b><br/><pre><ol><li><b>File: utilities/../.svn/text-base/ez_setup.py.svn-base:92</b><br/><pre> # XXX could we install in a subprocess here? +base-15-base-93- print >>sys.stderr, ( +base-16-base-94- "The required version of setuptools (>=%s) is not available, and\n" +base-17-base-95- "can't be installed while this script is running. Please install\n" +base:18:</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are +base-19-base-549- # separated by a horizontal dash line. Only the first one of +base-20-base-550- # them is now colorized properly. +base-21-base-551- header = lines[0] +base:22:</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:603</b><br/><pre> # TODO: Scrape and colorize the traceback. +base-23-base-604- result.append(self.colorize('doctest_got', line)) +base-24-base-605- elif remaining[0] == 'Differences (ndiff with -expected +actual):': +base-25-base-606- result.append(self.colorize('doctest_title', remaining.pop(0))) # E. raised: +base:26:</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:623</b><br/><pre> # TODO: We only deal with the output from Zope 3's doctest module. +base-27-base-624- # A colorizer for the Python's doctest module would be nice too. +base-28-base-625- if doctest: +base-29-base-626- # If we have a doctest, we do not care about this header. All the +base:30:</pre></li><li><b>File: utilities/../.svn/text-base/test.py.svn-base:690</b><br/><pre> # TODO these should be hookable +base-31-base-691- from zope.tales.tales import TALESTracebackSupplement +base-32-base-692- from zope.pagetemplate.pagetemplate \ +base-33-base-693- import PageTemplateTracebackSupplement +base:34:</pre></li><li><b>File: utilities/../.svn/text-base/setup_win32.py.svn-base:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: +base-35-base-85- pexe['inno_templates'] = "template.iss" +base-36-base-86- pexe['app_name'] = 'pyMoul' +base-37-base-87- pexe['includes'].extend(findPyTz()) +base:38:</pre></li><li><b>File: utilities/../.svn/text-base/distutils_upx.py.svn-base:117</b><br/><pre> sys.exit(retcode) # XXX +base-39-base-118- +base-40-base-119- def _upxAvailable(self): +base-41-base-120- """Search for UPX in search path +base:42:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/chatlog.py.svn-base:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +base-43-base-269- return iter(self._fd) +base:44:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:112</b><br/><pre> # XXX use struct +base-45-base-113- if header is None: +base-46-base-114- fd = self._fd +base-47-base-115- fd.seek(0) +base:48:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/kiimage.py.svn-base:127</b><br/><pre> # XXX use struct +base-49-base-128- if size is None: +base-50-base-129- size = self.getFileSize() +base-51-base-130- leading = 4* [None] +base:52:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:156</b><br/><pre> # TODO: write me +base-53-base-157- pass +base-54-base-158- +base-55-base-159-class Constrain(object): +base:56:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +base-57-base-541- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui +base-58-base-542- # microphon missing -> OS mixer +base-59-base-543- } +base:60:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/wdysini.py.svn-base:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +base-61-base-629- +base-62-base-630-class GraphicsIni(ConfFile): +base-63-base-631- _filename = 'graphics.ini' +base:64:</pre></li><li><b>File: utilities/../src/moul/file/.svn/text-base/directory.py.svn-base:58</b><br/><pre> # TODO: fnmatch +base-65-base-59- return len([name for name in os.listdir(path) +base-66-base-60- if os.path.isfile(os.path.join(path, name))]) +base-67-base-61- +base:68:</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:104</b><br/><pre> # TODO: more +base-69-base-105- +base-70-base-106- def test_publicapi_create(self): +base-71-base-107- inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) +base:72:</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:115</b><br/><pre> # TODO: more +base-73-base-116- +base-74-base-117-class AudioIniTest(GenericIniTest): +base-75-base-118- enc = aud_enc +base:76:</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/test_wdysini.py.svn-base:153</b><br/><pre> #XXX self.failIf(p.isChanged()) +base-77-base-154- +base-78-base-155- p.screenres = 0 +base-79-base-156- eq(p._get('Graphics.Width'), 800) +base:80:</pre></li><li><b>File: utilities/../src/moul/file/tests/.svn/text-base/utils.py.svn-base:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 +base-81-base-80- fd = open(os.path.join(path, fname), 'wb') +base-82-base-81- fd.write('dummy') +base-83-base-82- fd.close() +base:84:</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:104</b><br/><pre> # TODO: more +base-85- +base-86- def test_publicapi_create(self): +base-87- inipath = os.path.join(self.tmpdir, os.path.basename(self.enc)) +base:88:</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:115</b><br/><pre> # TODO: more +base-89- +base-90-class AudioIniTest(GenericIniTest): +base-91- enc = aud_enc +base:92:</pre></li><li><b>File: utilities/../src/moul/file/tests/test_wdysini.py:153</b><br/><pre> #XXX self.failIf(p.isChanged()) +base-93- +base-94- p.screenres = 0 +base-95- eq(p._get('Graphics.Width'), 800) +base:96:</pre></li><li><b>File: utilities/../src/moul/file/tests/utils.py:79</b><br/><pre> for fname in ('UruLauncher.exe', 'UruExplorer.exe'): # XXX: win32 +base-97- fd = open(os.path.join(path, fname), 'wb') +base-98- fd.write('dummy') +base-99- fd.close() +base:100:</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +base-101- return iter(self._fd) +base:102:</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:112</b><br/><pre> # XXX use struct +base-103- if header is None: +base-104- fd = self._fd +base-105- fd.seek(0) +base:106:</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py:127</b><br/><pre> # XXX use struct +base-107- if size is None: +base-108- size = self.getFileSize() +base-109- leading = 4* [None] +base:110:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:156</b><br/><pre> # TODO: write me +base-111- pass +base-112- +base-113-class Constrain(object): +base:114:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +base-115- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui +base-116- # microphon missing -> OS mixer +base-117- } +base:118:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +base-119- +base-120-class GraphicsIni(ConfFile): +base-121- _filename = 'graphics.ini' +base:122:</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py~:112</b><br/><pre> # XXX use struct +base-123- if header is None: +base-124- fd = self._fd +base-125- fd.seek(0) +base:126:</pre></li><li><b>File: utilities/../src/moul/file/kiimage.py~:127</b><br/><pre> # XXX use struct +base-127- if size is None: +base-128- size = self.getFileSize() +base-129- leading = 4* [None] +base:130:</pre></li><li><b>File: utilities/../src/moul/file/chatlog.py~:268</b><br/><pre> # TODO: add parser, currently simply iterates over the file +base-131- return iter(self._fd) +base:132:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:156</b><br/><pre> # TODO: write me +base-133- pass +base-134- +base-135-class Constrain(object): +base:136:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:540</b><br/><pre> 'Audio.SetDeviceName' : (QuotedString, Constrain()), # TODO: add check +base-137- 'Audio.SetChannelVolume GUI' : (FloatString, MinMax(0.0, 1.0)), # 0-100%, no ui +base-138- # microphon missing -> OS mixer +base-139- } +base:140:</pre></li><li><b>File: utilities/../src/moul/file/wdysini.py~:628</b><br/><pre> # TODO: microphon needs an extra handler. The mic slider changes the OS mixer. +base-141- +base-142-class GraphicsIni(ConfFile): +base-143- _filename = 'graphics.ini' +base:144:</pre></li><li><b>File: utilities/../src/moul/file/directory.py:58</b><br/><pre> # TODO: fnmatch +base-145- return len([name for name in os.listdir(path) +base-146- if os.path.isfile(os.path.join(path, name))]) +base-147- +base:148:</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:76</b><br/><pre> # XXX: dos format +base-149-base-77- return data.replace("\r\n", "\n") +base-150-base-78- +base-151-base-79-def encryptWDYS(instr, fout): +base:152:</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/whatdoyousee.py.svn-base:86</b><br/><pre> # XXX: dos format +base-153-base-87- instr = instr.replace("\n", "\r\n") +base-154-base-88- fout.seek(0) +base-155-base-89- fout.write(HEADER) +base:156:</pre></li><li><b>File: utilities/../src/moul/crypt/.svn/text-base/elf.py.svn-base:70</b><br/><pre> # XXX NotImplemented +base-157-base-71- raise NotImplementedError +base-158-base-72- +base-159-base-73-def decipher(crypt, size, key): +base:160:</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:76</b><br/><pre> # XXX: dos format +base-161- return data.replace("\r\n", "\n") +base-162- +base-163-def encryptWDYS(instr, fout): +base:164:</pre></li><li><b>File: utilities/../src/moul/crypt/whatdoyousee.py:86</b><br/><pre> # XXX: dos format +base-165- instr = instr.replace("\n", "\r\n") +base-166- fout.seek(0) +base-167- fout.write(HEADER) +base:168:</pre></li><li><b>File: utilities/../src/moul/crypt/elf.py:70</b><br/><pre> # XXX NotImplemented +base-169- raise NotImplementedError +base-170- +base-171-def decipher(crypt, size, key): +base:172:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/localization.py.svn-base:78</b><br/><pre> # TODO: other message box +base-173-base-79- self._journal_progressbar = SimpleProgressbar(self) +base-174-base-80- self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) +base-175-base-81- self._journal_progressbar.setProgressbar(0, 1, 0) +base:176:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:76</b><br/><pre> # TODO: checks +base-177-base-77- self.urudatadir.initializeFactories() +base-178-base-78- +base-179-base-79- # init handlers +base:180:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:152</b><br/><pre> # FIXME: signal doesn't do anything +base-181-base-153- self.emit(SIGNAL("close()")) +base-182-base-154- event.accept() +base-183-base-155- event.ignore() +base:184:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:189</b><br/><pre> # TODO: msg +base-185-base-190- return +base-186-base-191- +base-187-base-192- self.pb_kiimage_repair.setEnabled(False) +base:188:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:219</b><br/><pre> # TODO: msg +base-189-base-220- +base-190-base-221- # ************************************************************************ +base-191-base-222- # graphics settings +base:192:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit +base-193-base-238- +base-194-base-239- @signalLogDecorator(LOG) +base-195-base-240- def on_graphicsini_loaded(self): +base:196:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:297</b><br/><pre> # XXX: fixme +base-197-base-298- txt = videoModes.getVidModeHuman(idx) +base-198-base-299- self.lb_screenres.setText(QtCore.QString(txt)) +base-199-base-300- self._graphics_ini.screenres = idx +base:200:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit +base-201-base-388- +base-202-base-389- @signalLogDecorator(LOG) +base-203-base-390- def on_audioini_loaded(self): +base:204:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active +base-205-base-507- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) +base-206-base-508- timer.start() +base-207-base-509- +base:208:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:602</b><br/><pre> # TODO: thread safety! +base-209-base-603- self.servers = servers +base-210-base-604- if not self.isRunning(): +base-211-base-605- self.start() +base:212:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:608</b><br/><pre> # TODO: thread safety! +base-213-base-609- # emit a list of names first +base-214-base-610- for server in self.servers: +base-215-base-611- self.emit(SIGNAL("server(const QString&)"), server.name) +base:216:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/mainwindow.py.svn-base:644</b><br/><pre> # TODO check this +base-217-base-645- self._running = False +base-218-base-646- self.condition.wakeAll() +base-219-base-647- +base:220:</pre></li><li><b>File: utilities/../src/moul/qt/.svn/text-base/errorhandler.py.svn-base:46</b><br/><pre> # TODO: translation aware +base-221-base-47- LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) +base:222:base:48: return # XXX: remove +base-223-base-49- try: +base-224-base-50- title= QtGui.QApplication.translate("excepthook", +base-225-base-51- "An unhandled error has occured", +base:226:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:76</b><br/><pre> # TODO: checks +base-227- self.urudatadir.initializeFactories() +base-228- +base-229- # init handlers +base:230:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:152</b><br/><pre> # FIXME: signal doesn't do anything +base-231- self.emit(SIGNAL("close()")) +base-232- event.accept() +base-233- event.ignore() +base:234:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:189</b><br/><pre> # TODO: msg +base-235- return +base-236- +base-237- self.pb_kiimage_repair.setEnabled(False) +base:238:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:236</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit +base-239- +base-240- @signalLogDecorator(LOG) +base-241- def on_graphicsini_loaded(self): +base:242:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:296</b><br/><pre> # XXX: fixme +base-243- txt = videoModes.getVidModeHuman(idx) +base-244- self.lb_screenres.setText(QtCore.QString(txt)) +base-245- self._graphics_ini.screenres = idx +base:246:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:386</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit +base-247- +base-248- @signalLogDecorator(LOG) +base-249- def on_audioini_loaded(self): +base:250:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:505</b><br/><pre> # TODO: needs optimization? run only when timer tab is active +base-251- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) +base-252- timer.start() +base-253- +base:254:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:601</b><br/><pre> # TODO: thread safety! +base-255- self.servers = servers +base-256- if not self.isRunning(): +base-257- self.start() +base:258:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:607</b><br/><pre> # TODO: thread safety! +base-259- # emit a list of names first +base-260- for server in self.servers: +base-261- self.emit(SIGNAL("server(const QString&)"), server.name) +base:262:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py~:643</b><br/><pre> # TODO check this +base-263- self._running = False +base-264- self.condition.wakeAll() +base-265- +base:266:</pre></li><li><b>File: utilities/../src/moul/qt/localization.py:78</b><br/><pre> # TODO: other message box +base-267- self._journal_progressbar = SimpleProgressbar(self) +base-268- self._journal_progressbar.setWindowTitle(self.trUtf8("Loading journals")) +base-269- self._journal_progressbar.setProgressbar(0, 1, 0) +base:270:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:76</b><br/><pre> # TODO: checks +base-271- self.urudatadir.initializeFactories() +base-272- +base-273- # init handlers +base:274:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:152</b><br/><pre> # FIXME: signal doesn't do anything +base-275- self.emit(SIGNAL("close()")) +base-276- event.accept() +base-277- event.ignore() +base:278:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:189</b><br/><pre> # TODO: msg +base-279- return +base-280- +base-281- self.pb_kiimage_repair.setEnabled(False) +base:282:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:219</b><br/><pre> # TODO: msg +base-283- +base-284- # ************************************************************************ +base-285- # graphics settings +base:286:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:237</b><br/><pre> self.emit(SIGNAL("graphicsini_loaded()")) # XXX: hard coded emit +base-287- +base-288- @signalLogDecorator(LOG) +base-289- def on_graphicsini_loaded(self): +base:290:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:297</b><br/><pre> # XXX: fixme +base-291- txt = videoModes.getVidModeHuman(idx) +base-292- self.lb_screenres.setText(QtCore.QString(txt)) +base-293- self._graphics_ini.screenres = idx +base:294:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:387</b><br/><pre> self.emit(SIGNAL("audioini_loaded()")) # XXX: hard coded emit +base-295- +base-296- @signalLogDecorator(LOG) +base-297- def on_audioini_loaded(self): +base:298:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:506</b><br/><pre> # TODO: needs optimization? run only when timer tab is active +base-299- self.connect(timer, SIGNAL('timeout()'), self.on_timezone_timer_timeout) +base-300- timer.start() +base-301- +base:302:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:602</b><br/><pre> # TODO: thread safety! +base-303- self.servers = servers +base-304- if not self.isRunning(): +base-305- self.start() +base:306:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:608</b><br/><pre> # TODO: thread safety! +base-307- # emit a list of names first +base-308- for server in self.servers: +base-309- self.emit(SIGNAL("server(const QString&)"), server.name) +base:310:</pre></li><li><b>File: utilities/../src/moul/qt/mainwindow.py:644</b><br/><pre> # TODO check this +base-311- self._running = False +base-312- self.condition.wakeAll() +base-313- +base:314:</pre></li><li><b>File: utilities/../src/moul/qt/errorhandler.py:46</b><br/><pre> # TODO: translation aware +base-315- LOG.critical("UNHANDLED ERROR", exc_info=(typ, value, traceback)) +base-316- try: +base-317- title= QtGui.QApplication.translate("excepthook", +</pre></li><li><b>File: utilities/../doc/.svn/text-base/XXXreport.html.svn-base:319</b><br/><pre></pre></li><li><b>File: utilities/../src/moul/osdependent/__init__.py:116</b><br/><pre># XXX: what about cygwin, bsd and others? +base-320-_thismodule = sys.modules[__name__] +base-321-if __WIN32__: +base-322- from moul.osdependent import win32 as osdep_win32 +base:323:</pre></li><li><b>File: utilities/../src/moul/osdependent/.svn/text-base/__init__.py.svn-base:116</b><br/><pre># XXX: what about cygwin, bsd and others? +base-324-base-117-_thismodule = sys.modules[__name__] +base-325-base-118-if __WIN32__: +base-326-base-119- from moul.osdependent import win32 as osdep_win32 +base:327:</pre></li><li><b>File: utilities/../test.py:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are +base-328- # separated by a horizontal dash line. Only the first one of +base-329- # them is now colorized properly. +base-330- header = lines[0] +base:331:</pre></li><li><b>File: utilities/../test.py:603</b><br/><pre> # TODO: Scrape and colorize the traceback. +base-332- result.append(self.colorize('doctest_got', line)) +base-333- elif remaining[0] == 'Differences (ndiff with -expected +actual):': +base-334- result.append(self.colorize('doctest_title', remaining.pop(0))) # E. raised: +base:335:</pre></li><li><b>File: utilities/../test.py:623</b><br/><pre> # TODO: We only deal with the output from Zope 3's doctest module. +base-336- # A colorizer for the Python's doctest module would be nice too. +base-337- if doctest: +base-338- # If we have a doctest, we do not care about this header. All the +base:339:</pre></li><li><b>File: utilities/../test.py:690</b><br/><pre> # TODO these should be hookable +base-340- from zope.tales.tales import TALESTracebackSupplement +base-341- from zope.pagetemplate.pagetemplate \ +base-342- import PageTemplateTracebackSupplement +base:343:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:6</b><br/><pre># Todo: +base-344-base-7-# +base-345-base-8-# Make 'unbuffered' a per-target option +base-346-base-9- +base:347:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:357</b><br/><pre>## extra_path = ["."] # XXX +base-348-base-358- extra_path = [] +base-349-base-359- dlls, unfriendly_dlls, other_depends = \ +base-350-base-360- self.find_dependend_dlls(dlls, +base:351:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:403</b><br/><pre> # XXX all dlls are copied into the same directory - a flat name space. +base-352-base-404- # sooner or later that will give conflicts. +base-353-base-405- dst = os.path.join(self.lib_dir, os.path.basename(item.__file__)) +base-354-base-406- self.copy_file(src, dst, preserve_mode=0) +base:355:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:919</b><br/><pre> # XXX On Windows NT, the SYSTEM directory is also searched +base-356-base-920- exedir = os.path.dirname(sys.executable) +base-357-base-921- syspath = os.environ['PATH'] +base-358-base-922- loadpath = ';'.join([exedir, sysdir, windir, syspath]) +base:359:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:1329</b><br/><pre># XXX This list is NOT complete (it cannot be) +base-360-base-1330-# Note: ALL ENTRIES MUST BE IN LOWER CASE! +base-361-base-1331-EXCLUDED_DLLS = ( +base-362-base-1332- "advapi32.dll", +base:363:</pre></li><li><b>File: utilities/../contrib/.svn/text-base/build_exe.py.svn-base:1362</b><br/><pre># XXX Perhaps it would be better to assume dlls from the systemdir are system dlls, +base-364-base-1363-# and make some exceptions for known dlls, like msvcr71, pythonXY.dll, and so on? +base-365-base-1364-def isSystemDLL(pathname): +base-366-base-1365- if os.path.basename(pathname).lower() in ("msvcr71.dll", "msvcr71d.dll"): +base:367:</pre></li><li><b>File: utilities/../contrib/build_exe.py:6</b><br/><pre># Todo: +base-368-# +base-369-# Make 'unbuffered' a per-target option +base-370- +base:371:</pre></li><li><b>File: utilities/../contrib/build_exe.py:357</b><br/><pre>## extra_path = ["."] # XXX +base-372- extra_path = [] +base-373- dlls, unfriendly_dlls, other_depends = \ +base-374- self.find_dependend_dlls(dlls, +base:375:</pre></li><li><b>File: utilities/../contrib/build_exe.py:403</b><br/><pre> # XXX all dlls are copied into the same directory - a flat name space. +base-376- # sooner or later that will give conflicts. +base-377- dst = os.path.join(self.lib_dir, os.path.basename(item.__file__)) +base-378- self.copy_file(src, dst, preserve_mode=0) +base:379:</pre></li><li><b>File: utilities/../contrib/build_exe.py:919</b><br/><pre> # XXX On Windows NT, the SYSTEM directory is also searched +base-380- exedir = os.path.dirname(sys.executable) +base-381- syspath = os.environ['PATH'] +base-382- loadpath = ';'.join([exedir, sysdir, windir, syspath]) +base:383:</pre></li><li><b>File: utilities/../contrib/build_exe.py:1329</b><br/><pre># XXX This list is NOT complete (it cannot be) +base-384-# Note: ALL ENTRIES MUST BE IN LOWER CASE! +base-385-EXCLUDED_DLLS = ( +base-386- "advapi32.dll", +base:387:</pre></li><li><b>File: utilities/../contrib/build_exe.py:1362</b><br/><pre># XXX Perhaps it would be better to assume dlls from the systemdir are system dlls, +base-388-# and make some exceptions for known dlls, like msvcr71, pythonXY.dll, and so on? +base-389-def isSystemDLL(pathname): +base-390- if os.path.basename(pathname).lower() in ("msvcr71.dll", "msvcr71d.dll"): +base:391:</pre></li><li><b>File: utilities/../utilities/.svn/text-base/setup_win32.py.svn-base:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: +base-392-base-85- pexe['inno_templates'] = "template.iss" +base-393-base-86- pexe['app_name'] = 'pyMoul' +base-394-base-87- pexe['includes'].extend(findPyTz()) +base:395:</pre></li><li><b>File: utilities/../utilities/.svn/text-base/distutils_upx.py.svn-base:117</b><br/><pre> sys.exit(retcode) # XXX +base-396-base-118- +base-397-base-119- def _upxAvailable(self): +base-398-base-120- """Search for UPX in search path +base:399:</pre></li><li><b>File: utilities/../utilities/.svn/text-base/ez_setup.py.svn-base:92</b><br/><pre> # XXX could we install in a subprocess here? +base-400-base-93- print >>sys.stderr, ( +base-401-base-94- "The required version of setuptools (>=%s) is not available, and\n" +base-402-base-95- "can't be installed while this script is running. Please install\n" +base:403:</pre></li><li><b>File: utilities/../utilities/setup_win32.py:84</b><br/><pre> pexe['innosetup'] = os.environ.get('INNOSETUP') # TODO: +base-404- pexe['inno_templates'] = "template.iss" +base-405- pexe['app_name'] = 'pyMoul' +base-406- pexe['includes'].extend(findPyTz()) +base:407:</pre></li><li><b>File: utilities/../utilities/distutils_upx.py:117</b><br/><pre> sys.exit(retcode) # XXX +base-408- +base-409- def _upxAvailable(self): +base-410- """Search for UPX in search path </pre></li><li><b>File: utilities/../test.py:548</b><br/><pre> # XXX bug: doctest may report several failures in one test, they are # separated by a horizontal dash line. Only the first one of # them is now colorized properly. Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-02-05 00:33:55 UTC (rev 134) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-02-05 03:04:23 UTC (rev 135) @@ -1,8 +1,5 @@ <!DOCTYPE TS><TS> <context> - <name>@default</name> -</context> -<context> <name>IniFileContainer</name> <message> <source>Error opening graphics.ini</source> @@ -31,6 +28,10 @@ <source>Journals loaded.</source> <translation type="unfinished"></translation> </message> + <message> + <source>Journals not loaded.</source> + <translation type="unfinished"></translation... [truncated message content] |
From: <ti...@us...> - 2007-02-05 14:03:10
|
Revision: 139 http://pymoul.svn.sourceforge.net/pymoul/?rev=139&view=rev Author: tiran Date: 2007-02-05 06:03:09 -0800 (Mon, 05 Feb 2007) Log Message: ----------- Added make serverlist command Updated serverlist: removed bogus tests Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/server/ping.py pymoul/trunk/src/moul/server/serverlist.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-02-05 04:14:41 UTC (rev 138) +++ pymoul/trunk/Makefile.in 2007-02-05 14:03:09 UTC (rev 139) @@ -97,3 +97,6 @@ importchecker: $(PYTHON) utilities/importchecker.py ./src/moul/ +serverlist: + PYTHONPATH="src" $(PYTHON) src/moul/server/serverlist.py + Modified: pymoul/trunk/src/moul/server/ping.py =================================================================== --- pymoul/trunk/src/moul/server/ping.py 2007-02-05 04:14:41 UTC (rev 138) +++ pymoul/trunk/src/moul/server/ping.py 2007-02-05 14:03:09 UTC (rev 139) @@ -32,7 +32,7 @@ """A server object """ - def __init__(self, name, port, timeout=3.0): + def __init__(self, name, port=PORT, timeout=3.0): self._name = name self._port = int(port) self._timeout = float(timeout) Modified: pymoul/trunk/src/moul/server/serverlist.py =================================================================== --- pymoul/trunk/src/moul/server/serverlist.py 2007-02-05 04:14:41 UTC (rev 138) +++ pymoul/trunk/src/moul/server/serverlist.py 2007-02-05 14:03:09 UTC (rev 139) @@ -43,8 +43,6 @@ 'uruapp-cw15.ibs.aol.com', 'uruapp-cw16.ibs.aol.com', 'uruapp-cw17.ibs.aol.com', - 'bogus.test.example', # no DNS - 'www.urulive.com', # no PING ## The servers below are available via ICMP ping but have no running game ## server (2006-01-17) #'uruapp-cw18.ibs.aol.com', @@ -53,3 +51,24 @@ #'uruapp-cw21.ibs.aol.com', #'uruapp-cw22.ibs.aol.com', ] + +def _ping(): + """Search for new servers + """ + from moul.server.ping import Server + new = [] + for i in range(1, 25): + name = 'uruapp-cw%02i.ibs.aol.com' % i + srv = Server(name) + dns = srv.dns() + pp = srv.portping() + print name, dns, pp + if isinstance(dns, float) and isinstance(pp, float) and \ + name not in SERVER_LIST: + new.append(name) + print "\nNew servers found:\n" + for name in new: + print " '%s'," % name + +if __name__ == '__main__': + _ping() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-06 03:51:22
|
Revision: 144 http://pymoul.svn.sourceforge.net/pymoul/?rev=144&view=rev Author: tiran Date: 2007-02-05 19:51:21 -0800 (Mon, 05 Feb 2007) Log Message: ----------- Added translation resource added more messages to KI image and ini configurator Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/file/kiimage.py pymoul/trunk/src/moul/file/wdysini.py pymoul/trunk/src/moul/qt/i18n/pymoul_de.qm pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/moulqt.py pymoul/trunk/src/moul/qt/ui/mainwindow.py pymoul/trunk/src/moul/qt/ui/mainwindow.ui pymoul/trunk/src/moul/qt/utils.py pymoul/trunk/src/moul/qt/wdysini.py Added Paths: ----------- pymoul/trunk/src/moul/qt/i18n/__init__.py pymoul/trunk/src/moul/qt/i18n/translations.qrc pymoul/trunk/src/moul/qt/i18n/translations_rc.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/Makefile.in 2007-02-06 03:51:21 UTC (rev 144) @@ -84,7 +84,11 @@ for L in $(LANGS); do \ pylupdate4 `$(FINDQT)` -ts src/moul/qt/i18n/pymoul_$${L}.ts;\ lrelease src/moul/qt/i18n/pymoul_$${L}.ts; \ - done + done + rm src/moul/qt/i18n/translations_rc.py + # do not compress qm files so the translator can load it + pyrcc4 -no-compress -o ./src/moul/qt/i18n/translations_rc.py \ + ./src/moul/qt/i18n/translations.qrc hash: cd dist && $(FINDHASH) | xargs md5sum >md5.txt Modified: pymoul/trunk/src/moul/file/kiimage.py =================================================================== --- pymoul/trunk/src/moul/file/kiimage.py 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/file/kiimage.py 2007-02-06 03:51:21 UTC (rev 144) @@ -265,14 +265,17 @@ fixed = self.mkFixedName(root, name, self._destdir) self._found.append(ki) # XXX: move checks to copy method! - if os.path.isfile(fixed): + if not os.path.isfile(fixed): + self._tocheck.append((ki, fixed)) + continue + else: if fixedNewer(ki, fixed): LOG.debug("File %s exists but was changed." % name) self._tocheck.append((ki, fixed)) + continue else: LOG.debug("File %s exists and is fixed." % name) - else: - self._tocheck.append((ki, fixed)) + continue return self._tocheck def checkAndCopyFile(self, kiname, fixedname): Modified: pymoul/trunk/src/moul/file/wdysini.py =================================================================== --- pymoul/trunk/src/moul/file/wdysini.py 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/file/wdysini.py 2007-02-06 03:51:21 UTC (rev 144) @@ -370,15 +370,25 @@ dirname = os.path.dirname(self._fpath) if not os.path.isdir(dirname): LOG.info("Creating directory %s" % dirname) - os.mkdir(dirname) + os.makedirs(dirname) # Create a dummy file fd = open(self._fpath, 'w') fd.write("Created by pyMoul") fd.close() self._opened = True + self.clear() for key, value in self._defaults.items(): + self._order.append(key) self._filedata[key] = value - self.reset() + self._newdata[key] = value + self.write() + self.close() + + def close(self): + """Close file and clear data + """ + self._opened = False + self.clear() def write(self): """Write data to file @@ -453,8 +463,11 @@ self._filedata[newkey] = value break if not found: - raise ValueError(line) + raise ValueError("Unknown line %s" % line) + for key in self._options: + if key not in self._filedata: + raise ValueError("Key is missing in file %s" % key) self.reset() self._parserDoneHook() @@ -531,7 +544,7 @@ _options = { 'Audio.Initialize' : (BoolString, Constrain()), # true/false, no ui 'Audio.UseEAX' : (BoolString, Constrain()), # true/false - 'Audio.SetPriorityCutoff' : (int, Constrain()), # ??? + 'Audio.SetPriorityCutoff' : (int, MinMax(0, 100)), # ??? 'Audio.MuteAll' : (int, MinMax(0, 1)), # 0, 1 'Audio.SetChannelVolume SoundFX' : (FloatString, MinMax(0.0, 1.0)), # 0-100% 'Audio.SetChannelVolume BgndMusic' : (FloatString, MinMax(0.0, 1.0)), # 0-100% @@ -545,7 +558,7 @@ _defaults = { 'Audio.Initialize' : BoolString(True), 'Audio.UseEAX' : BoolString(False), - 'Audio.SetPriorityCutoff' : 6, + 'Audio.SetPriorityCutoff' : 80, 'Audio.MuteAll' : 0, # 0, 1 'Audio.SetChannelVolume SoundFX' : FloatString(1.0), 'Audio.SetChannelVolume BgndMusic' : FloatString(1.0), Added: pymoul/trunk/src/moul/qt/i18n/__init__.py =================================================================== --- pymoul/trunk/src/moul/qt/i18n/__init__.py (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/__init__.py 2007-02-06 03:51:21 UTC (rev 144) @@ -0,0 +1,25 @@ +# pyMoul - Python interface to Myst Online URU Live +# Copyright (C) 2007 Christian Heimes <christian (at) cheimes (dot) de> + +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., 59 +# Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +""" +moul.qt.i18n +""" +__author__ = "Christian Heimes" +__version__ = "$Id: __init__.py 108 2007-01-31 14:46:54Z tiran $" +__revision__ = "$Revision: 108 $" + Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_de.qm =================================================================== (Binary files differ) Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_de.ts 2007-02-06 03:51:21 UTC (rev 144) @@ -37,15 +37,15 @@ <name>MainWindow</name> <message> <source>Windowed</source> - <translation type="unfinished">Im Fenster</translation> + <translation>Im Fenster</translation> </message> <message> <source>Display Shadows</source> - <translation type="unfinished">Zeige Schatten</translation> + <translation>Zeige Schatten</translation> </message> <message> <source>Screen Resolution</source> - <translation type="unfinished">Auflösung</translation> + <translation>Auflösung</translation> </message> <message> <source>800x600 (4:3)</source> @@ -53,107 +53,107 @@ </message> <message> <source>Quality</source> - <translation type="unfinished">Qualität</translation> + <translation>Qualität</translation> </message> <message> <source>Texture Quality</source> - <translation type="unfinished">Texturequalität</translation> + <translation>Texturequalität</translation> </message> <message> <source>Low</source> - <translation type="unfinished">Niedrig</translation> + <translation>Niedrig</translation> </message> <message> <source>High</source> - <translation type="unfinished">Hoch</translation> + <translation>Hoch</translation> </message> <message> <source>Anti-Aliasing</source> - <translation type="unfinished">Anti Alias</translation> + <translation>Anti Alias</translation> </message> <message> <source>Graphics Quality</source> - <translation type="unfinished">Grafikqualität</translation> + <translation>Grafikqualität</translation> </message> <message> <source>Med.</source> - <translation type="unfinished">Med.</translation> + <translation>Med.</translation> </message> <message> <source>Ultra</source> - <translation type="unfinished">Ultra</translation> + <translation>Ultra</translation> </message> <message> <source>Shadow Quality</source> - <translation type="unfinished">Schattenqualität</translation> + <translation>Schattenqualität</translation> </message> <message> <source>Anisotropic-Filtering</source> - <translation type="unfinished">Anisotropischer Filter</translation> + <translation>Anisotropischer Filter</translation> </message> <message> <source>Graphics</source> - <translation type="unfinished">Grafik</translation> + <translation>Grafik</translation> </message> <message> <source>Level</source> - <translation type="unfinished">Level</translation> + <translation>Level</translation> </message> <message> <source>NPC Voices</source> - <translation type="unfinished">NSC Stimmen</translation> + <translation>NSC Stimmen</translation> </message> <message> <source>Sound FX</source> - <translation type="unfinished"></translation> + <translation></translation> </message> <message> <source>Ambience Sound</source> - <translation type="unfinished">Hintergrundgeräusche</translation> + <translation>Hintergrundgeräusche</translation> </message> <message> <source>Music</source> - <translation type="unfinished">Musik</translation> + <translation>Musik</translation> </message> <message> <source>Mute all</source> - <translation type="unfinished">Alles stumm</translation> + <translation>Alles stumm</translation> </message> <message> <source>Hardware</source> - <translation type="unfinished">Hardware</translation> + <translation>Hardware</translation> </message> <message> <source>Generic Software</source> - <translation type="unfinished"></translation> + <translation></translation> </message> <message> <source>Enable EAX</source> - <translation type="unfinished">Aktivier EAX</translation> + <translation>Aktivier EAX</translation> </message> <message> <source>Voice chat</source> - <translation type="unfinished">Voice Chat</translation> + <translation>Voice Chat</translation> </message> <message> <source>Enable Voice Chat</source> - <translation type="unfinished">Aktiviere Voice Chat</translation> + <translation>Aktiviere Voice Chat</translation> </message> <message> <source>Audio</source> - <translation type="unfinished">Audio</translation> + <translation>Audio</translation> </message> <message> <source>Time zones</source> - <translation type="unfinished">Zeitzonen</translation> + <translation>Zeitzonen</translation> </message> <message> <source>Cavern time:</source> - <translation type="unfinished">Höhlenzeit</translation> + <translation>Höhlenzeit:</translation> </message> <message> <source>Cyan time:</source> - <translation type="unfinished">Cyan Zeit</translation> + <translation>Cyan Zeit:</translation> </message> <message> <source>UTC -0</source> @@ -161,166 +161,151 @@ </message> <message> <source>Ping servers</source> - <translation type="unfinished">Server anpingen</translation> + <translation>Server anpingen</translation> </message> <message> <source>Ping</source> - <translation type="unfinished">Ping</translation> + <translation>Ping</translation> </message> <message> <source>Servers</source> - <translation type="unfinished">Server</translation> + <translation>Server</translation> </message> <message> <source>Age</source> - <translation type="unfinished">Zeitalter</translation> + <translation>Zeitalter</translation> </message> <message> <source>Element</source> - <translation type="unfinished">Element</translation> + <translation>Element</translation> </message> <message> <source>Language</source> - <translation type="unfinished">Sprache</translation> + <translation>Sprache</translation> </message> <message> <source>Set</source> - <translation type="unfinished">Set</translation> + <translation>Set</translation> </message> <message> <source>About</source> - <translation type="unfinished">Über</translation> + <translation>Über</translation> </message> <message> <source>MOUL is running</source> - <translation type="unfinished">MOUL läuft</translation> + <translation>MOUL läuft</translation> </message> <message> <source>MOUL</source> - <translation type="unfinished">MOUL</translation> + <translation>MOUL</translation> </message> <message> <source>MOUL is not running</source> - <translation type="unfinished">MOUL läuft nicht</translation> + <translation>MOUL läuft nicht</translation> </message> <message> <source>Chat and debug logs</source> - <translation type="unfinished">Chat- und Fehlerlogs</translation> + <translation>Chat- und Fehlerlogs</translation> </message> <message> <source>Archive chatlogs and zip log files</source> - <translation type="unfinished">Archiviere Chatlogs und packe Logdateien</translation> + <translation>Archiviere Chatlogs und packe Logdateien</translation> </message> <message> <source>Remove zipped logs</source> - <translation type="unfinished">Entferne gepackte Logs</translation> + <translation>Entferne gepackte Logs</translation> </message> <message> <source>Remove</source> - <translation type="unfinished">Entferne</translation> + <translation>Entferne</translation> </message> <message> <source>Archive</source> - <translation type="unfinished">Archiviere</translation> + <translation>Archiviere</translation> </message> <message> <source>Zip debug logs</source> - <translation type="unfinished">Packe Debuglogs</translation> + <translation>Packe Debuglogs</translation> </message> <message> <source>Delete debug logs</source> - <translation type="unfinished">Lösche Debuglogs</translation> + <translation>Lösche Debuglogs</translation> </message> <message> <source>KI Image repair</source> - <translation type="unfinished">Repariere KI Bilder</translation> + <translation>Repariere KI Bilder</translation> </message> <message> <source>Repair</source> - <translation type="unfinished">Repareiere</translation> + <translation>Repareiere</translation> </message> <message> <source>Fix KI and avatar images</source> - <translation type="unfinished">Repariert KI- und Avatarbilder</translation> + <translation>Repariert KI- und Avatarbilder</translation> </message> <message> <source>Tasks</source> - <translation type="unfinished">Aufgaben</translation> + <translation>Aufgaben</translation> </message> <message> <source>Other</source> - <translation type="unfinished">Anderes</translation> + <translation>Anderes</translation> </message> <message> <source>VSync</source> - <translation type="unfinished">VSync</translation> + <translation>VSync</translation> </message> <message> <source>pyMoul</source> - <translation type="unfinished">pyMoul</translation> + <translation>pyMoul</translation> </message> <message> <source>Settings</source> - <translation type="unfinished">Einstellungen</translation> + <translation>Einstellungen</translation> </message> <message> - <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Read chatlogs</source> - <translation type="unfinished">Lese Chatlogs</translation> + <translation>Lese Chatlogs</translation> </message> <message> <source>Chat logs</source> - <translation type="unfinished">Chatlogs</translation> + <translation>Chatlogs</translation> </message> <message> <source>Browse journals and notes</source> - <translation type="unfinished">Lese Journale und Nachrichten</translation> + <translation>Lese Journale und Nachrichten</translation> </message> <message> <source>Journals</source> - <translation type="unfinished">Journale</translation> + <translation>Journale</translation> </message> <message> <source>Browse</source> - <translation type="unfinished">Lese</translation> + <translation>Lese</translation> </message> <message> <source>About pyMoul</source> - <translation type="unfinished">Über pyMoul</translation> + <translation>Über pyMoul</translation> </message> <message> <source>License</source> - <translation type="unfinished">Lizenz</translation> + <translation>Lizenz</translation> </message> <message> <source>Load journals</source> - <translation type="unfinished">Lade Journale</translation> + <translation>Lade Journale</translation> </message> <message> <source>TextLabel</source> <translation type="unfinished"></translation> </message> <message> - <source>Tool for Myst Online : Uru Live - -(c) 2007 by Christian Heimes - -http://pymoul.sourceforge.net/</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Repairing KI images</source> - <translation type="unfinished">Repariere KI Bilder</translation> + <translation>Repariere KI Bilder</translation> </message> <message> <source>Sound priority</source> - <translation type="unfinished">Tonpriorität</translation> + <translation>Tonpriorität</translation> </message> <message> <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> @@ -331,16 +316,40 @@ </message> <message> <source>Not implemented</source> - <translation type="unfinished">Nicht implementiert</translation> + <translation>Nicht implementiert</translation> </message> <message> <source>Unsaved changes!</source> - <translation type="unfinished">Ungespeicherte Änderungen</translation> + <translation>Ungespeicherte Änderungen!</translation> </message> <message> <source>Do you want to save your changes?</source> - <translation type="unfinished">Wollen sie die Änderungen speichern?</translation> + <translation>Wollen sie die Änderungen speichern?</translation> </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source> +<center> +<h3>Tool for Myst Online : Uru Live</h3> + +<p>(c) 2007 Christian Heimes</p> + +<p><a href="http://pymoul.sourceforge.net">http://pymoul.sourceforge.net</a></p> +</center> + +<p align="justify">If you like the tool please consider to <a href="%1">donate</a> some money to sponsor my work. The tool is created in my free time as an open source project. You can sent money to my <a href="%2">PayPal account</a> using your PayPal account, credit card or bank account. You can also use the SourceForget.net <a href="%3">donate page</a>. Your money will be used to found my MOUL account and new hardware for my 4 years old computer.</p> + +<p>sincerely yours<br> +Tiran [KI: #00025784]</p> + </source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SimpleProgressbar</name> Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_es.ts 2007-02-06 03:51:21 UTC (rev 144) @@ -264,13 +264,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Read chatlogs</source> <translation type="unfinished"></translation> </message> @@ -307,14 +300,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Tool for Myst Online : Uru Live - -(c) 2007 by Christian Heimes - -http://pymoul.sourceforge.net/</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Repairing KI images</source> <translation type="unfinished"></translation> </message> @@ -341,6 +326,30 @@ <source>Do you want to save your changes?</source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source> +<center> +<h3>Tool for Myst Online : Uru Live</h3> + +<p>(c) 2007 Christian Heimes</p> + +<p><a href="http://pymoul.sourceforge.net">http://pymoul.sourceforge.net</a></p> +</center> + +<p align="justify">If you like the tool please consider to <a href="%1">donate</a> some money to sponsor my work. The tool is created in my free time as an open source project. You can sent money to my <a href="%2">PayPal account</a> using your PayPal account, credit card or bank account. You can also use the SourceForget.net <a href="%3">donate page</a>. Your money will be used to found my MOUL account and new hardware for my 4 years old computer.</p> + +<p>sincerely yours<br> +Tiran [KI: #00025784]</p> + </source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SimpleProgressbar</name> Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_fr.ts 2007-02-06 03:51:21 UTC (rev 144) @@ -264,13 +264,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Read chatlogs</source> <translation type="unfinished"></translation> </message> @@ -307,14 +300,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Tool for Myst Online : Uru Live - -(c) 2007 by Christian Heimes - -http://pymoul.sourceforge.net/</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Repairing KI images</source> <translation type="unfinished"></translation> </message> @@ -341,6 +326,30 @@ <source>Do you want to save your changes?</source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source> +<center> +<h3>Tool for Myst Online : Uru Live</h3> + +<p>(c) 2007 Christian Heimes</p> + +<p><a href="http://pymoul.sourceforge.net">http://pymoul.sourceforge.net</a></p> +</center> + +<p align="justify">If you like the tool please consider to <a href="%1">donate</a> some money to sponsor my work. The tool is created in my free time as an open source project. You can sent money to my <a href="%2">PayPal account</a> using your PayPal account, credit card or bank account. You can also use the SourceForget.net <a href="%3">donate page</a>. Your money will be used to found my MOUL account and new hardware for my 4 years old computer.</p> + +<p>sincerely yours<br> +Tiran [KI: #00025784]</p> + </source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SimpleProgressbar</name> Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_it.ts 2007-02-06 03:51:21 UTC (rev 144) @@ -264,13 +264,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Read chatlogs</source> <translation type="unfinished"></translation> </message> @@ -307,14 +300,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Tool for Myst Online : Uru Live - -(c) 2007 by Christian Heimes - -http://pymoul.sourceforge.net/</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Repairing KI images</source> <translation type="unfinished"></translation> </message> @@ -341,6 +326,30 @@ <source>Do you want to save your changes?</source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source> +<center> +<h3>Tool for Myst Online : Uru Live</h3> + +<p>(c) 2007 Christian Heimes</p> + +<p><a href="http://pymoul.sourceforge.net">http://pymoul.sourceforge.net</a></p> +</center> + +<p align="justify">If you like the tool please consider to <a href="%1">donate</a> some money to sponsor my work. The tool is created in my free time as an open source project. You can sent money to my <a href="%2">PayPal account</a> using your PayPal account, credit card or bank account. You can also use the SourceForget.net <a href="%3">donate page</a>. Your money will be used to found my MOUL account and new hardware for my 4 years old computer.</p> + +<p>sincerely yours<br> +Tiran [KI: #00025784]</p> + </source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SimpleProgressbar</name> Modified: pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts =================================================================== --- pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts 2007-02-05 16:48:00 UTC (rev 143) +++ pymoul/trunk/src/moul/qt/i18n/pymoul_nl.ts 2007-02-06 03:51:21 UTC (rev 144) @@ -264,13 +264,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Read chatlogs</source> <translation type="unfinished"></translation> </message> @@ -307,14 +300,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Tool for Myst Online : Uru Live - -(c) 2007 by Christian Heimes - -http://pymoul.sourceforge.net/</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Repairing KI images</source> <translation type="unfinished"></translation> </message> @@ -341,6 +326,30 @@ <source>Do you want to save your changes?</source> <translation type="unfinished"></translation> </message> + <message> + <source><html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></source> + <translation type="unfinished"></translation> + </message> + <message> + <source> +<center> +<h3>Tool for Myst Online : Uru Live</h3> + +<p>(c) 2007 Christian Heimes</p> + +<p><a href="http://pymoul.sourceforge.net">http://pymoul.sourceforge.net</a></p> +</center> + +<p align="justify">If you like the tool please consider to <a href="%1">donate</a> some money to sponsor my work. The tool is created in my free time as an open source project. You can sent money to my <a href="%2">PayPal account</a> using your PayPal account, credit card or bank account. You can also use the SourceForget.net <a href="%3">donate page</a>. Your money will be used to found my MOUL account and new hardware for my 4 years old computer.</p> + +<p>sincerely yours<br> +Tiran [KI: #00025784]</p> + </source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>SimpleProgressbar</name> Added: pymoul/trunk/src/moul/qt/i18n/translations.qrc =================================================================== --- pymoul/trunk/src/moul/qt/i18n/translations.qrc (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/translations.qrc 2007-02-06 03:51:21 UTC (rev 144) @@ -0,0 +1,10 @@ +<RCC> + <qresource prefix="/translations" > + <file>pymoul_de.qm</file> + <file>pymoul_es.qm</file> + <file>pymoul_fr.qm</file> + <file>pymoul_it.qm</file> + <file>pymoul_nl.qm</file> + </qresource> +</RCC> + Added: pymoul/trunk/src/moul/qt/i18n/translations_rc.py =================================================================== --- pymoul/trunk/src/moul/qt/i18n/translations_rc.py (rev 0) +++ pymoul/trunk/src/moul/qt/i18n/translations_rc.py 2007-02-06 03:51:21 UTC (rev 144) @@ -0,0 +1,414 @@ +# -*- coding: utf-8 -*- + +# Resource object code +# +# Created: Mo Feb 5 21:44:11 2007 +# by: The Resource Compiler for PyQt (Qt v4.2.0) +# +# WARNING! All changes made in this file will be lost! + +from PyQt4 import QtCore + +qt_resource_data = "\ +\x00\x00\x01\x51\ +\x3c\ +\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ +\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\ +\x00\x00\x01\x51\ +\x3c\ +\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ +\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\ +\x00\x00\x01\x51\ +\x3c\ +\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ +\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\ +\x00\x00\x01\x51\ +\x3c\ +\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ +\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\ +\x00\x00\x10\x19\ +\x3c\ +\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ +\x00\x00\x02\x70\x00\x00\x47\xd5\x00\x00\x00\x00\x00\x00\x53\x67\ +\x00\x00\x00\x1d\x00\x00\x59\xc4\x00\x00\x00\x36\x00\x04\xef\xd8\ +\x00\x00\x00\x47\x00\x05\x24\x9c\x00\x00\x00\x5a\x00\x05\x3b\x6e\ +\x00\x00\x00\x6d\x00\x05\x70\x47\x00\x00\x00\x80\x00\x47\x96\xc4\ +\x00\x00\x00\x93\x00\x48\xba\xff\x00\x00\x00\xa6\x00\x4b\x68\x54\ +\x00\x00\x00\xbb\x00\x52\xcc\xbc\x00\x00\x00\xda\x00\x54\xc9\xf3\ +\x00\x00\x00\xef\x00\x56\xae\xc2\x00\x00\x01\x04\x00\x5a\x8a\x23\ +\x00\x00\x01\x1d\x00\x5b\x0b\x25\x00\x00\x01\x38\x00\x5b\xb0\x43\ +\x00\x00\x01\x4d\x00\x5c\x3b\x81\x00\x00\x01\x62\x00\x64\x19\x77\ +\x00\x00\x01\x77\x00\x7e\x6c\x0a\x00\x00\x01\x96\x01\x93\x37\x13\ +\x00\x00\x01\xb5\x01\xab\x5c\xb3\x00\x00\x01\xfc\x02\x8f\x56\xc2\ +\x00\x00\x02\x27\x02\xe9\x8e\x3e\x00\x00\x02\x58\x02\xf9\xc5\xc5\ +\x00\x00\x02\x91\x03\x05\x6a\xdc\x00\x00\x02\xa8\x03\x92\xfa\x97\ +\x00\x00\x02\xc9\x03\x95\x76\xb3\x00\x00\x02\xfe\x04\x99\x6e\x95\ +\x00\x00\x03\x25\x04\xd7\xac\x54\x00\x00\x03\x38\x04\xe2\x4f\x1a\ +\x00\x00\x03\x6b\x05\x8c\x46\xc5\x00\x00\x03\x8c\x05\x8c\x68\x02\ +\x00\x00\x03\xa7\x05\xa0\x21\x53\x00\x00\x03\xc6\x05\xd0\xcd\x93\ +\x00\x00\x03\xeb\x05\xf8\x63\x97\x00\x00\x04\x0c\x06\x19\xf8\x33\ +\x00\x00\x04\x43\x06\x3e\x53\x23\x00\x00\x04\x76\x06\x80\x0f\x99\ +\x00\x00\x04\x9b\x06\x93\xd5\xd9\x00\x00\x04\xec\x06\xc9\x43\x23\ +\x00\x00\x05\x37\x06\xca\x7f\x51\x00\x00\x05\x52\x06\xcd\x5c\x79\ +\x00\x00\x05\x91\x07\x0d\x0d\x29\x00\x00\x05\xbc\x07\x7e\x46\xbc\ +\x00\x00\x05\xe5\x07\x86\xf4\xf3\x00\x00\x05\xfc\x07\xe0\x1a\x4f\ +\x00\x00\x06\x19\x08\x4e\xb2\xf5\x00\x00\x06\x6c\x08\x62\xc8\x91\ +\x00\x00\x06\x85\x08\x67\x7c\x03\x00\x00\x06\xec\x08\x6c\x74\x43\ +\x00\x00\x07\x07\x08\x86\xeb\x43\x00\x00\x07\x3e\x08\x89\xf0\x85\ +\x00\x00\x07\x55\x08\x8b\xdc\x65\x00\x00\x07\x74\x08\xb8\x30\xe9\ +\x00\x00\x07\x8f\x09\x23\x8d\x18\x00\x00\x07\xaa\x09\x73\x4b\x74\ +\x00\x00\x07\xcd\x09\xc9\xcc\xc3\x00\x00\x07\xec\x0a\x60\x8c\x6e\ +\x00\x00\x08\x03\x0a\xa2\x5f\x07\x00\x00\x08\x20\x0b\x4d\x0c\xe4\ +\x00\x00\x08\x3f\x0b\x5d\x62\x2e\x00\x00\x08\x72\x0b\xb1\x98\x63\ +\x00\x00\x08\xbb\x0c\x14\x88\xde\x00\x00\x08\xe4\x0c\x2c\x3c\x14\ +\x00\x00\x09\x11\x0c\x8b\x22\x33\x00\x00\x09\x2a\x0c\xa7\x63\x6c\ +\x00\x00\x09\x85\x0c\xb9\x85\xe3\x00\x00\x09\xa6\x0c\xbb\x01\x73\ +\x00\x00\x09\xcf\x0c\xd3\x7d\x01\x00\x00\x09\xf4\x0d\xca\xe4\xb3\ +\x00\x00\x0a\x51\x0e\x42\xf2\x69\x00\x00\x0a\x76\x0e\x4c\x4e\xf4\ +\x00\x00\x0a\x99\x0e\x5d\x7d\x69\x00\x00\x0a\xca\x0e\x6c\x4e\xf4\ +\x00\x00\x0a\xf1\x0e\x8c\xb2\xa3\x00\x00\x0b\x22\x0e\x9b\xcf\x67\ +\x00\x00\x0b\x53\x0f\x02\x2c\x83\x00\x00\x0b\x7e\x0f\x33\xb6\x5e\ +\x00\x00\x0b\xc3\x69\x00\x00\x0b\xfe\x03\x00\x00\x00\x12\x00\x5a\ +\x00\x65\x00\x69\x00\x74\x00\x61\x00\x6c\x00\x74\x00\x65\x00\x72\ +\x05\x00\x00\x47\xd5\x01\x03\x00\x00\x00\x0e\x00\x4e\x00\x69\x00\ +\x65\x00\x64\x00\x72\x00\x69\x00\x67\x05\x00\x00\x53\x67\x01\x03\ +\x00\x00\x00\x06\x00\x53\x00\x65\x00\x74\x05\x00\x00\x59\xc4\x01\ +\x03\x00\x00\x00\x08\x00\x48\x00\x6f\x00\x63\x00\x68\x05\x00\x04\ +\xef\xd8\x01\x03\x00\x00\x00\x08\x00\x4d\x00\x4f\x00\x55\x00\x4c\ +\x05\x00\x05\x24\x9c\x01\x03\x00\x00\x00\x08\x00\x4d\x00\x65\x00\ +\x64\x00\x2e\x05\x00\x05\x3b\x6e\x01\x03\x00\x00\x00\x08\x00\x50\ +\x00\x69\x00\x6e\x00\x67\x05\x00\x05\x70\x47\x01\x03\x00\x00\x00\ +\x08\x00\xdc\x00\x62\x00\x65\x00\x72\x05\x00\x47\x96\xc4\x01\x03\ +\x00\x00\x00\x0a\x00\x41\x00\x75\x00\x64\x00\x69\x00\x6f\x05\x00\ +\x48\xba\xff\x01\x03\x00\x00\x00\x14\x00\x49\x00\x6d\x00\x20\x00\ +\x46\x00\x65\x00\x6e\x00\x73\x00\x74\x00\x65\x00\x72\x05\x00\x4b\ +\x68\x54\x01\x03\x00\x00\x00\x0a\x00\x4c\x00\x65\x00\x76\x00\x65\ +\x00\x6c\x05\x00\x52\xcc\xbc\x01\x03\x00\x00\x00\x0a\x00\x4d\x00\ +\x75\x00\x73\x00\x69\x00\x6b\x05\x00\x54\xc9\xf3\x01\x03\x00\x00\ +\x00\x0e\x00\x41\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x65\x00\x73\ +\x05\x00\x56\xae\xc2\x01\x03\x00\x00\x00\x10\x00\x41\x00\x75\x00\ +\x66\x00\x67\x00\x61\x00\x62\x00\x65\x00\x6e\x05\x00\x5a\x8a\x23\ +\x01\x03\x00\x00\x00\x0a\x00\x54\x00\x69\x00\x74\x00\x65\x00\x6c\ +\x05\x00\x5b\x0b\x25\x01\x03\x00\x00\x00\x0a\x00\x56\x00\x53\x00\ +\x79\x00\x6e\x00\x63\x05\x00\x5b\xb0\x43\x01\x03\x00\x00\x00\x0a\ +\x00\x55\x00\x6c\x00\x74\x00\x72\x00\x61\x05\x00\x5c\x3b\x81\x01\ +\x03\x00\x00\x00\x14\x00\x4d\x00\x4f\x00\x55\x00\x4c\x00\x20\x00\ +\x6c\x00\xe4\x00\x75\x00\x66\x00\x74\x05\x00\x64\x19\x77\x01\x03\ +\x00\x00\x00\x14\x00\x43\x00\x79\x00\x61\x00\x6e\x00\x20\x00\x5a\ +\x00\x65\x00\x69\x00\x74\x00\x3a\x05\x00\x7e\x6c\x0a\x01\x03\x00\ +\x00\x00\x3c\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\x69\x00\ +\x65\x00\x72\x00\x74\x00\x20\x00\x4b\x00\x49\x00\x2d\x00\x20\x00\ +\x75\x00\x6e\x00\x64\x00\x20\x00\x41\x00\x76\x00\x61\x00\x74\x00\ +\x61\x00\x72\x00\x62\x00\x69\x00\x6c\x00\x64\x00\x65\x00\x72\x05\ +\x01\x93\x37\x13\x01\x03\x00\x00\x00\x20\x00\x4c\x00\xf6\x00\x73\ +\x00\x63\x00\x68\x00\x65\x00\x20\x00\x44\x00\x65\x00\x62\x00\x75\ +\x00\x67\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x01\xab\x5c\xb3\x01\ +\x03\x00\x00\x00\x26\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\ +\x69\x00\x65\x00\x72\x00\x65\x00\x20\x00\x4b\x00\x49\x00\x20\x00\ +\x42\x00\x69\x00\x6c\x00\x64\x00\x65\x00\x72\x05\x02\x8f\x56\xc2\ +\x01\x03\x00\x00\x00\x2e\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\ +\x00\x61\x00\x6c\x00\x65\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\ +\x00\x74\x00\x20\x00\x67\x00\x65\x00\x6c\x00\x61\x00\x64\x00\x65\ +\x00\x6e\x00\x2e\x05\x02\xe9\x8e\x3e\x01\x03\x00\x00\x00\x0c\x00\ +\x4c\x00\x69\x00\x7a\x00\x65\x00\x6e\x00\x7a\x05\x02\xf9\xc5\xc5\ +\x01\x03\x00\x00\x00\x16\x00\xdc\x00\x62\x00\x65\x00\x72\x00\x20\ +\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\x05\x03\x05\x6a\ +\xdc\x01\x03\x00\x00\x00\x2a\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\ +\x75\x00\x6c\x00\x20\x00\x51\x00\x54\x00\x20\x00\x6c\x00\xe4\x00\ +\x75\x00\x66\x00\x74\x00\x20\x00\x73\x00\x63\x00\x68\x00\x6f\x00\ +\x6e\x05\x03\x92\xfa\x97\x01\x03\x00\x00\x00\x1c\x00\x5a\x00\x65\ +\x00\x69\x00\x67\x00\x65\x00\x20\x00\x53\x00\x63\x00\x68\x00\x61\ +\x00\x74\x00\x74\x00\x65\x00\x6e\x05\x03\x95\x76\xb3\x01\x03\x00\ +\x00\x00\x08\x00\x4c\x00\x65\x00\x73\x00\x65\x05\x04\x99\x6e\x95\ +\x01\x03\x00\x00\x00\x28\x00\x48\x00\x69\x00\x6e\x00\x74\x00\x65\ +\x00\x72\x00\x67\x00\x72\x00\x75\x00\x6e\x00\x64\x00\x67\x00\x65\ +\x00\x72\x00\xe4\x00\x75\x00\x73\x00\x63\x00\x68\x00\x65\x05\x04\ +\xd7\xac\x54\x01\x03\x00\x00\x00\x16\x00\x48\x00\xf6\x00\x68\x00\ +\x6c\x00\x65\x00\x6e\x00\x7a\x00\x65\x00\x69\x00\x74\x00\x3a\x05\ +\x04\xe2\x4f\x1a\x01\x03\x00\x00\x00\x10\x00\x45\x00\x6e\x00\x74\ +\x00\x66\x00\x65\x00\x72\x00\x6e\x00\x65\x05\x05\x8c\x46\xc5\x01\ +\x03\x00\x00\x00\x14\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\ +\x65\x00\x69\x00\x65\x00\x72\x00\x65\x05\x05\x8c\x68\x02\x01\x03\ +\x00\x00\x00\x1a\x00\x4c\x00\x61\x00\x64\x00\x65\x00\x20\x00\x4a\ +\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x05\x05\ +\xa0\x21\x53\x01\x03\x00\x00\x00\x16\x00\x4e\x00\x53\x00\x43\x00\ +\x20\x00\x53\x00\x74\x00\x69\x00\x6d\x00\x6d\x00\x65\x00\x6e\x05\ +\x05\xd0\xcd\x93\x01\x03\x00\x00\x00\x2c\x00\x41\x00\x6e\x00\x69\ +\x00\x73\x00\x6f\x00\x74\x00\x72\x00\x6f\x00\x70\x00\x69\x00\x73\ +\x00\x63\x00\x68\x00\x65\x00\x72\x00\x20\x00\x46\x00\x69\x00\x6c\ +\x00\x74\x00\x65\x00\x72\x05\x05\xf8\x63\x97\x01\x03\x00\x00\x00\ +\x28\x00\x43\x00\x68\x00\x61\x00\x74\x00\x2d\x00\x20\x00\x75\x00\ +\x6e\x00\x64\x00\x20\x00\x46\x00\x65\x00\x68\x00\x6c\x00\x65\x00\ +\x72\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x06\x19\xf8\x33\x01\x03\ +\x00\x00\x00\x1a\x00\x4c\x00\x65\x00\x73\x00\x65\x00\x20\x00\x43\ +\x00\x68\x00\x61\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x06\ +\x3e\x53\x23\x01\x03\x00\x00\x00\x46\x00\x46\x00\x65\x00\x68\x00\ +\x6c\x00\x65\x00\x72\x00\x20\x00\x62\x00\x65\x00\x69\x00\x6d\x00\ +\x20\x00\xd6\x00\x66\x00\x66\x00\x6e\x00\x65\x00\x6e\x00\x20\x00\ +\x76\x00\x6f\x00\x6e\x00\x20\x00\x67\x00\x72\x00\x61\x00\x70\x00\ +\x68\x00\x69\x00\x63\x00\x73\x00\x2e\x00\x69\x00\x6e\x00\x69\x05\ +\x06\x80\x0f\x99\x01\x03\x00\x00\x00\x40\x00\x46\x00\x65\x00\x68\ +\x00\x6c\x00\x65\x00\x72\x00\x20\x00\x62\x00\x65\x00\x69\x00\x6d\ +\x00\x20\x00\xd6\x00\x66\x00\x66\x00\x6e\x00\x65\x00\x6e\x00\x20\ +\x00\x76\x00\x6f\x00\x6e\x00\x20\x00\x61\x00\x75\x00\x64\x00\x69\ +\x00\x6f\x00\x2e\x00\x69\x00\x6e\x00\x69\x05\x06\x93\xd5\xd9\x01\ +\x03\x00\x00\x00\x10\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\ +\x61\x00\x6c\x00\x65\x05\x06\xc9\x43\x23\x01\x03\x00\x00\x00\x34\ +\x00\x55\x00\x6e\x00\x67\x00\x65\x00\x73\x00\x70\x00\x65\x00\x69\ +\x00\x63\x00\x68\x00\x65\x00\x72\x00\x74\x00\x65\x00\x20\x00\xc4\ +\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x75\x00\x6e\x00\x67\x00\x65\ +\x00\x6e\x00\x21\x05\x06\xca\x7f\x51\x01\x03\x00\x00\x00\x20\x00\ +\x53\x00\x63\x00\x68\x00\x61\x00\x74\x00\x74\x00\x65\x00\x6e\x00\ +\x71\x00\x75\x00\x61\x00\x6c\x00\x69\x00\x74\x00\xe4\x00\x74\x05\ +\x06\xcd\x5c\x79\x01\x03\x00\x00\x00\x1e\x00\x54\x00\x65\x00\x78\ +\x00\x74\x00\x75\x00\x72\x00\x65\x00\x71\x00\x75\x00\x61\x00\x6c\ +\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x07\x0d\x0d\x29\x01\x03\x00\ +\x00\x00\x0c\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\x05\ +\x07\x7e\x46\xbc\x01\x03\x00\x00\x00\x12\x00\x5a\x00\x65\x00\x69\ +\x00\x74\x00\x7a\x00\x6f\x00\x6e\x00\x65\x00\x6e\x05\x07\x86\xf4\ +\xf3\x01\x03\x00\x00\x00\x48\x00\x57\x00\x6f\x00\x6c\x00\x6c\x00\ +\x65\x00\x6e\x00\x20\x00\x73\x00\x69\x00\x65\x00\x20\x00\x64\x00\ +\x69\x00\x65\x00\x20\x00\xc4\x00\x6e\x00\x64\x00\x65\x00\x72\x00\ +\x75\x00\x6e\x00\x67\x00\x65\x00\x6e\x00\x20\x00\x73\x00\x70\x00\ +\x65\x00\x69\x00\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x00\x3f\x05\ +\x07\xe0\x1a\x4f\x01\x03\x00\x00\x00\x0e\x00\x53\x00\x70\x00\x72\ +\x00\x61\x00\x63\x00\x68\x00\x65\x05\x08\x4e\xb2\xf5\x01\x03\x00\ +\x00\x00\x5c\x00\x44\x00\x69\x00\x65\x00\x73\x00\x65\x00\x73\x00\ +\x20\x00\x46\x00\x65\x00\x61\x00\x74\x00\x75\x00\x72\x00\x65\x00\ +\x20\x00\x77\x00\x75\x00\x72\x00\x64\x00\x65\x00\x20\x00\x6e\x00\ +\x6f\x00\x63\x00\x68\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\x00\ +\x74\x00\x20\x00\x69\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x6d\x00\ +\x65\x00\x6e\x00\x74\x00\x69\x00\x65\x00\x72\x00\x74\x00\x21\x05\ +\x08\x62\xc8\x91\x01\x03\x00\x00\x00\x10\x00\x43\x00\x68\x00\x61\ +\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x08\x67\x7c\x03\x01\ +\x03\x00\x00\x00\x2c\x00\x45\x00\x6e\x00\x74\x00\x66\x00\x65\x00\ +\x72\x00\x6e\x00\x65\x00\x20\x00\x67\x00\x65\x00\x70\x00\x61\x00\ +\x63\x00\x6b\x00\x74\x00\x65\x00\x20\x00\x4c\x00\x6f\x00\x67\x00\ +\x73\x05\x08\x6c\x74\x43\x01\x03\x00\x00\x00\x0c\x00\x47\x00\x72\ +\x00\x61\x00\x66\x00\x69\x00\x6b\x05\x08\x86\xeb\x43\x01\x03\x00\ +\x00\x00\x14\x00\x41\x00\x72\x00\x63\x00\x68\x00\x69\x00\x76\x00\ +\x69\x00\x65\x00\x72\x00\x65\x05\x08\x89\xf0\x85\x01\x03\x00\x00\ +\x00\x10\x00\x48\x00\x61\x00\x72\x00\x64\x00\x77\x00\x61\x00\x72\ +\x00\x65\x05\x08\x8b\xdc\x65\x01\x03\x00\x00\x00\x10\x00\x51\x00\ +\x75\x00\x61\x00\x6c\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x08\xb8\ +\x30\xe9\x01\x03\x00\x00\x00\x18\x00\x41\x00\x6b\x00\x74\x00\x69\ +\x00\x76\x00\x69\x00\x65\x00\x72\x00\x20\x00\x45\x00\x41\x00\x58\ +\x05\x09\x23\x8d\x18\x01\x03\x00\x00\x00\x14\x00\x56\x00\x6f\x00\ +\x69\x00\x63\x00\x65\x00\x20\x00\x43\x00\x68\x00\x61\x00\x74\x05\ +\x09\x73\x4b\x74\x01\x03\x00\x00\x00\x0c\x00\x53\x00\x65\x00\x72\ +\x00\x76\x00\x65\x00\x72\x05\x09\xc9\xcc\xc3\x01\x03\x00\x00\x00\ +\x12\x00\x41\x00\x75\x00\x66\x00\x6c\x00\xf6\x00\x73\x00\x75\x00\ +\x6e\x00\x67\x05\x0a\x60\x8c\x6e\x01\x03\x00\x00\x00\x14\x00\x41\ +\x00\x6e\x00\x74\x00\x69\x00\x20\x00\x41\x00\x6c\x00\x69\x00\x61\ +\x00\x73\x05\x0a\xa2\x5f\x07\x01\x03\x00\x00\x00\x28\x00\x41\x00\ +\x6b\x00\x74\x00\x69\x00\x76\x00\x69\x00\x65\x00\x72\x00\x65\x00\ +\x20\x00\x56\x00\x6f\x00\x69\x00\x63\x00\x65\x00\x20\x00\x43\x00\ +\x68\x00\x61\x00\x74\x05\x0b\x4d\x0c\xe4\x01\x03\x00\x00\x00\x3e\ +\x00\x46\x00\x65\x00\x68\x00\x6c\x00\x65\x00\x72\x00\x20\x00\x62\ +\x00\x65\x00\x69\x00\x6d\x00\x20\x00\x4c\x00\x61\x00\x64\x00\x65\ +\x00\x6e\x00\x20\x00\x64\x00\x65\x00\x72\x00\x20\x00\x4a\x00\x6f\ +\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x00\x2e\x05\x0b\ +\x5d\x62\x2e\x01\x03\x00\x00\x00\x1e\x00\x50\x00\x61\x00\x63\x00\ +\x6b\x00\x65\x00\x20\x00\x44\x00\x65\x00\x62\x00\x75\x00\x67\x00\ +\x6c\x00\x6f\x00\x67\x00\x73\x05\x0b\xb1\x98\x63\x01\x03\x00\x00\ +\x00\x22\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\ +\x00\x65\x00\x20\x00\x67\x00\x65\x00\x6c\x00\x61\x00\x64\x00\x65\ +\x00\x6e\x00\x2e\x05\x0c\x14\x88\xde\x01\x03\x00\x00\x00\x0e\x00\ +\x45\x00\x6c\x00\x65\x00\x6d\x00\x65\x00\x6e\x00\x74\x05\x0c\x2c\ +\x3c\x14\x01\x03\x00\x00\x00\x50\x00\x41\x00\x72\x00\x63\x00\x68\ +\x00\x69\x00\x76\x00\x69\x00\x65\x00\x72\x00\x65\x00\x20\x00\x43\ +\x00\x68\x00\x61\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x00\x20\ +\x00\x75\x00\x6e\x00\x64\x00\x20\x00\x70\x00\x61\x00\x63\x00\x6b\ +\x00\x65\x00\x20\x00\x4c\x00\x6f\x00\x67\x00\x64\x00\x61\x00\x74\ +\x00\x65\x00\x69\x00\x65\x00\x6e\x05\x0c\x8b\x22\x33\x01\x03\x00\ +\x00\x00\x16\x00\x41\x00\x6c\x00\x6c\x00\x65\x00\x73\x00\x20\x00\ +\x73\x00\x74\x00\x75\x00\x6d\x00\x6d\x05\x0c\xa7\x63\x6c\x01\x03\ +\x00\x00\x00\x1e\x00\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\ +\x00\x20\x00\x61\x00\x6e\x00\x70\x00\x69\x00\x6e\x00\x67\x00\x65\ +\x00\x6e\x05\x0c\xb9\x85\xe3\x01\x03\x00\x00\x00\x1a\x00\x45\x00\ +\x69\x00\x6e\x00\x73\x00\x74\x00\x65\x00\x6c\x00\x6c\x00\x75\x00\ +\x6e\x00\x67\x00\x65\x00\x6e\x05\x0c\xbb\x01\x73\x01\x03\x00\x00\ +\x00\x52\x00\x45\x00\x69\x00\x6e\x00\x65\x00\x20\x00\x49\x00\x6e\ +\x00\x73\x00\x74\x00\x61\x00\x6e\x00\x7a\x00\x20\x00\x76\x00\x6f\ +\x00\x6e\x00\x20\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\ +\x00\x20\x00\x51\x00\x54\x00\x20\x00\x6c\x00\xe4\x00\x75\x00\x66\ +\x00\x74\x00\x20\x00\x62\x00\x65\x00\x72\x00\x65\x00\x69\x00\x74\ +\x00\x73\x00\x21\x05\x0c\xd3\x7d\x01\x01\x03\x00\x00\x00\x1a\x00\ +\x4c\x00\x61\x00\x64\x00\x65\x00\x20\x00\x4a\x00\x6f\x00\x75\x00\ +\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x05\x0d\xca\xe4\xb3\x01\x03\ +\x00\x00\x00\x18\x00\x54\x00\x6f\x00\x6e\x00\x70\x00\x72\x00\x69\ +\x00\x6f\x00\x72\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x0e\x42\xf2\ +\x69\x01\x03\x00\x00\x00\x26\x00\x4e\x00\x69\x00\x63\x00\x68\x00\ +\x74\x00\x20\x00\x69\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x6d\x00\ +\x65\x00\x6e\x00\x74\x00\x69\x00\x65\x00\x72\x00\x74\x05\x0e\x4c\ +\x4e\xf4\x01\x03\x00\x00\x00\x1c\x00\x47\x00\x72\x00\x61\x00\x66\ +\x00\x69\x00\x6b\x00\x71\x00\x75\x00\x61\x00\x6c\x00\x69\x00\x74\ +\x00\xe4\x00\x74\x05\x0e\x5d\x7d\x69\x01\x03\x00\x00\x00\x26\x00\ +\x4e\x00\x69\x00\x63\x00\x68\x00\x74\x00\x20\x00\x69\x00\x6d\x00\ +\x70\x00\x6c\x00\x65\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x69\x00\ +\x65\x00\x72\x00\x74\x05\x0e\x6c\x4e\xf4\x01\x03\x00\x00\x00\x26\ +\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\x69\x00\x65\x00\x72\ +\x00\x65\x00\x20\x00\x4b\x00\x49\x00\x20\x00\x42\x00\x69\x00\x6c\ +\x00\x64\x00\x65\x00\x72\x05\x0e\x8c\xb2\xa3\x01\x03\x00\x00\x00\ +\x20\x00\x4d\x00\x4f\x00\x55\x00\x4c\x00\x20\x00\x6c\x00\xe4\x00\ +\x75\x00\x66\x00\x74\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\x00\ +\x74\x05\x0e\x9b\xcf\x67\x01\x03\x00\x00\x00\x3a\x00\x4c\x00\x65\ +\x00\x73\x00\x65\x00\x20\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\ +\x00\x61\x00\x6c\x00\x65\x00\x20\x00\x75\x00\x6e\x00\x64\x00\x20\ +\x00\x4e\x00\x61\x00\x63\x00\x68\x00\x72\x00\x69\x00\x63\x00\x68\ +\x00\x74\x00\x65\x00\x6e\x05\x0f\x02\x2c\x83\x01\x03\x00\x00\x00\ +\x30\x00\x4b\x00\x65\x00\x69\x00\x6e\x00\x65\x00\x20\x00\x4a\x00\ +\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x00\x20\x00\ +\x67\x00\x65\x00\x66\x00\x75\x00\x6e\x00\x64\x00\x65\x00\x6e\x00\ +\x2e\x05\x0f\x33\xb6\x5e\x01\x2f\x00\x00\x01\x8c\x00\x97\x00\x00\ +\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ +\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x53\ +\x69\x6d\x70\x6c\x65\x50\x72\x6f\x67\x72\x65\x73\x73\x62\x61\x72\ +\x00\x00\x03\x61\x70\x70\x00\x00\x15\x4c\x... [truncated message content] |
From: <ti...@us...> - 2007-02-06 15:15:33
|
Revision: 145 http://pymoul.svn.sourceforge.net/pymoul/?rev=145&view=rev Author: tiran Date: 2007-02-06 07:15:30 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Use pkg_resources for qm files py2exe support for name space packages some vars renamed to keep naming consistent Modified Paths: -------------- pymoul/trunk/Makefile.in pymoul/trunk/src/moul/__init__.py pymoul/trunk/src/moul/file/chatlog.py pymoul/trunk/src/moul/file/directory.py pymoul/trunk/src/moul/file/plasmalog.py pymoul/trunk/src/moul/qt/i18n/__init__.py pymoul/trunk/src/moul/qt/mainwindow.py pymoul/trunk/src/moul/qt/moulqt.py pymoul/trunk/src/moul/qt/utils.py Removed Paths: ------------- pymoul/trunk/src/moul/qt/i18n/translations.qrc pymoul/trunk/src/moul/qt/i18n/translations_rc.py Modified: pymoul/trunk/Makefile.in =================================================================== --- pymoul/trunk/Makefile.in 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/Makefile.in 2007-02-06 15:15:30 UTC (rev 145) @@ -85,10 +85,6 @@ pylupdate4 `$(FINDQT)` -ts src/moul/qt/i18n/pymoul_$${L}.ts;\ lrelease src/moul/qt/i18n/pymoul_$${L}.ts; \ done - rm src/moul/qt/i18n/translations_rc.py - # do not compress qm files so the translator can load it - pyrcc4 -no-compress -o ./src/moul/qt/i18n/translations_rc.py \ - ./src/moul/qt/i18n/translations.qrc hash: cd dist && $(FINDHASH) | xargs md5sum >md5.txt Modified: pymoul/trunk/src/moul/__init__.py =================================================================== --- pymoul/trunk/src/moul/__init__.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/__init__.py 2007-02-06 15:15:30 UTC (rev 145) @@ -6,3 +6,9 @@ from pkgutil import extend_path __path__ = extend_path(__path__, __name__) +# py2exe support for namespace packages +try: + import modulefinder +except ImportError: + for p in __path__: + modulefinder.AddPackagePath(__name__, p) Modified: pymoul/trunk/src/moul/file/chatlog.py =================================================================== --- pymoul/trunk/src/moul/file/chatlog.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/file/chatlog.py 2007-02-06 15:15:30 UTC (rev 145) @@ -87,27 +87,33 @@ _filename = "chatlog_%(sY)02i%(sM)02i%(sD)02i_%(ch)02i%(cm)02i_%(sh)02i%(sm)02i.txt" def __init__(self, srcdir, destdir): - self._path = srcdir - self._dest = destdir + self._srcdir = srcdir + self._destdir = destdir + LOG.debug("ChatlogMover: %s -> %s" % (srcdir, destdir)) + self.clear() + + def clear(self): + """ + """ self._logs = [] - LOG.debug("ChatlogMover: %s -> %s" % (srcdir, destdir)) - if not os.path.isdir(srcdir): - LOG.warning("%s is not a directory" % srcdir) - if not os.path.isdir(destdir): - LOG.info("Creating chatlog directory %s" % destdir) + if not os.path.isdir(self._srcdir): + LOG.warning("%s is not a directory" % self._srcdir) + if not os.path.isdir(self._destdir): + LOG.info("Creating chatlog directory %s" % self._destdir) os.mkdir(destdir) def findLogs(self): - """Find log files in self._path + """Find log files in self._srcdir Also calls and stores _findCreated(), modtime() and _makeFile() for the file. """ - for file in os.listdir(self._path): + self.clear() + for file in os.listdir(self._srcdir): if not fnmatch(file.lower(), self._pat): continue - fpath = os.path.join(self._path, file) + fpath = os.path.join(self._srcdir, file) if not os.path.isfile(fpath): continue LOG.debug("Found chatlog %s" % fpath) @@ -121,10 +127,11 @@ 'modtime' : mtime, 'created' : created, 'newname' : newname, - 'newpath' : os.path.join(self._dest, newname), + 'newpath' : os.path.join(self._destdirt, newname), } self._logs.append(details) + return self._logs def _findCreated(self, fpath): """Parse chatlog to find "started" date @@ -170,8 +177,8 @@ def moveChatlogs(self): """Move all chatlogs """ - for details in self._logs: - self.moveChatlog(details) + for name in iter(self): + pass def __len__(self): """len() suppor Modified: pymoul/trunk/src/moul/file/directory.py =================================================================== --- pymoul/trunk/src/moul/file/directory.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/file/directory.py 2007-02-06 15:15:30 UTC (rev 145) @@ -168,13 +168,13 @@ } _factories = { - 'logchat' : (ChatlogMover, ('logs', 'chatlogs')), - 'logzip' : (PlasmalogZipper, ('logs', 'zipped')), + 'logzipper' : (PlasmalogZipper, ('logs', 'zipped')), 'kiimages' : (KIImageFixer, ('kiimages', 'fixed')), 'avatars' : (KIImageFixer, ('avatars', 'fixed')), 'graphicsini' : (GraphicsIni, ('ini',)), 'audioini' : (AudioIni, ('ini',)), - 'chatlogs' : (ChatlogDirectoryView, ('chatlogs',)), + 'chatmover' : (ChatlogMover, ('logs', 'chatlogs')), + 'chatview' : (ChatlogDirectoryView, ('chatlogs',)), 'zipped' : (DirectoryCount, ('zipped',)), 'fixed' : (DirectoryCount, ('fixed',)), } Modified: pymoul/trunk/src/moul/file/plasmalog.py =================================================================== --- pymoul/trunk/src/moul/file/plasmalog.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/file/plasmalog.py 2007-02-06 15:15:30 UTC (rev 145) @@ -47,19 +47,22 @@ self._destdir = destdir self._doremove = True self._dozip = True + LOG.debug("PlasmalogZipper: %s -> %s" % (srcdir, destdir)) - LOG.debug("PlasmalogZipper: %s -> %s" % (srcdir, destdir)) + def clear(self): + """Clear state + """ self._zipped_dirs = {} # dirname -> zipfile self._not_removed = [] # files with full path - if not os.path.isdir(srcdir): + if not os.path.isdir(self._srcdir): LOG.warning("%s is not a directory" % srcdir) if not self.isPlasmaLogDir(): self._ispldir = False LOG.warning("%s is not a plasma log directory" % srcdir) else: self._ispldir = True - if not os.path.isdir(destdir): + if not os.path.isdir(self._destdir): LOG.info("Creating chatlog directory %s" % destdir) os.mkdir(destdir) @@ -91,6 +94,7 @@ This function also zips subdirectories. """ + self.clear() for root, dirs, files in os.walk(self._srcdir): stamp = self.isPlasmaLogDir(root) if not stamp: Modified: pymoul/trunk/src/moul/qt/i18n/__init__.py =================================================================== --- pymoul/trunk/src/moul/qt/i18n/__init__.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/i18n/__init__.py 2007-02-06 15:15:30 UTC (rev 145) @@ -23,3 +23,49 @@ __version__ = "$Id: __init__.py 108 2007-01-31 14:46:54Z tiran $" __revision__ = "$Revision: 108 $" +import pkg_resources +from PyQt4 import QtCore + +from moul.osdependent import __FROZEN__ +from moul.log import getLogger + + +LOG = getLogger('moul.qt.i18n') +LANGS = ('de', 'es', 'fr', 'it', 'nl') +TRANSLATIONS = {} + +# cannot use os.listdir here! + +for lang in LANGS: + name = "pymoul_%s" % lang + qm = pkg_resources.resource_string(__name__, "%s.qm" % name) + TRANSLATIONS[name] = qm + +def installTranslator(app, prefix="pymoul"): + """ + Installs a translator for the ap + """ + translator = QtCore.QTranslator(app) + locale = str(QtCore.QLocale.system().name()) + LOG.info("QTranslation using locale %s" % locale) + try: + lang, country = locale.split('_') + except: + lang, country = locale, '' + + longname = "%s_%s" % (prefix, locale) + shortname = "%s_%s" % (prefix, lang) + qm = None + if longname in TRANSLATIONS: + LOG.info("Loading translation %s" % longname) + qm = TRANSLATIONS[longname] + elif shortname in TRANSLATIONS: + LOG.info("Loading translation %s" % shortname) + qm = TRANSLATIONS[shortname] + + if qm is not None: + translator.load(qm, len(qm)) + app.installTranslator(translator) + else: + if shortname != 'en': + LOG.warning("No translation found!") Deleted: pymoul/trunk/src/moul/qt/i18n/translations.qrc =================================================================== --- pymoul/trunk/src/moul/qt/i18n/translations.qrc 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/i18n/translations.qrc 2007-02-06 15:15:30 UTC (rev 145) @@ -1,10 +0,0 @@ -<RCC> - <qresource prefix="/translations" > - <file>pymoul_de.qm</file> - <file>pymoul_es.qm</file> - <file>pymoul_fr.qm</file> - <file>pymoul_it.qm</file> - <file>pymoul_nl.qm</file> - </qresource> -</RCC> - Deleted: pymoul/trunk/src/moul/qt/i18n/translations_rc.py =================================================================== --- pymoul/trunk/src/moul/qt/i18n/translations_rc.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/i18n/translations_rc.py 2007-02-06 15:15:30 UTC (rev 145) @@ -1,414 +0,0 @@ -# -*- coding: utf-8 -*- - -# Resource object code -# -# Created: Mo Feb 5 21:44:11 2007 -# by: The Resource Compiler for PyQt (Qt v4.2.0) -# -# WARNING! All changes made in this file will be lost! - -from PyQt4 import QtCore - -qt_resource_data = "\ -\x00\x00\x01\x51\ -\x3c\ -\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ -\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\ -\x00\x00\x01\x51\ -\x3c\ -\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ -\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\ -\x00\x00\x01\x51\ -\x3c\ -\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ -\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\ -\x00\x00\x01\x51\ -\x3c\ -\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ -\x00\x00\x00\x00\x69\x00\x00\x00\x00\x2f\x00\x00\x01\x32\x00\x97\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\ -\x00\x00\x10\x19\ -\x3c\ -\xb8\x64\x18\xca\xef\x9c\x95\xcd\x21\x1c\xbf\x60\xa1\xbd\xdd\x42\ -\x00\x00\x02\x70\x00\x00\x47\xd5\x00\x00\x00\x00\x00\x00\x53\x67\ -\x00\x00\x00\x1d\x00\x00\x59\xc4\x00\x00\x00\x36\x00\x04\xef\xd8\ -\x00\x00\x00\x47\x00\x05\x24\x9c\x00\x00\x00\x5a\x00\x05\x3b\x6e\ -\x00\x00\x00\x6d\x00\x05\x70\x47\x00\x00\x00\x80\x00\x47\x96\xc4\ -\x00\x00\x00\x93\x00\x48\xba\xff\x00\x00\x00\xa6\x00\x4b\x68\x54\ -\x00\x00\x00\xbb\x00\x52\xcc\xbc\x00\x00\x00\xda\x00\x54\xc9\xf3\ -\x00\x00\x00\xef\x00\x56\xae\xc2\x00\x00\x01\x04\x00\x5a\x8a\x23\ -\x00\x00\x01\x1d\x00\x5b\x0b\x25\x00\x00\x01\x38\x00\x5b\xb0\x43\ -\x00\x00\x01\x4d\x00\x5c\x3b\x81\x00\x00\x01\x62\x00\x64\x19\x77\ -\x00\x00\x01\x77\x00\x7e\x6c\x0a\x00\x00\x01\x96\x01\x93\x37\x13\ -\x00\x00\x01\xb5\x01\xab\x5c\xb3\x00\x00\x01\xfc\x02\x8f\x56\xc2\ -\x00\x00\x02\x27\x02\xe9\x8e\x3e\x00\x00\x02\x58\x02\xf9\xc5\xc5\ -\x00\x00\x02\x91\x03\x05\x6a\xdc\x00\x00\x02\xa8\x03\x92\xfa\x97\ -\x00\x00\x02\xc9\x03\x95\x76\xb3\x00\x00\x02\xfe\x04\x99\x6e\x95\ -\x00\x00\x03\x25\x04\xd7\xac\x54\x00\x00\x03\x38\x04\xe2\x4f\x1a\ -\x00\x00\x03\x6b\x05\x8c\x46\xc5\x00\x00\x03\x8c\x05\x8c\x68\x02\ -\x00\x00\x03\xa7\x05\xa0\x21\x53\x00\x00\x03\xc6\x05\xd0\xcd\x93\ -\x00\x00\x03\xeb\x05\xf8\x63\x97\x00\x00\x04\x0c\x06\x19\xf8\x33\ -\x00\x00\x04\x43\x06\x3e\x53\x23\x00\x00\x04\x76\x06\x80\x0f\x99\ -\x00\x00\x04\x9b\x06\x93\xd5\xd9\x00\x00\x04\xec\x06\xc9\x43\x23\ -\x00\x00\x05\x37\x06\xca\x7f\x51\x00\x00\x05\x52\x06\xcd\x5c\x79\ -\x00\x00\x05\x91\x07\x0d\x0d\x29\x00\x00\x05\xbc\x07\x7e\x46\xbc\ -\x00\x00\x05\xe5\x07\x86\xf4\xf3\x00\x00\x05\xfc\x07\xe0\x1a\x4f\ -\x00\x00\x06\x19\x08\x4e\xb2\xf5\x00\x00\x06\x6c\x08\x62\xc8\x91\ -\x00\x00\x06\x85\x08\x67\x7c\x03\x00\x00\x06\xec\x08\x6c\x74\x43\ -\x00\x00\x07\x07\x08\x86\xeb\x43\x00\x00\x07\x3e\x08\x89\xf0\x85\ -\x00\x00\x07\x55\x08\x8b\xdc\x65\x00\x00\x07\x74\x08\xb8\x30\xe9\ -\x00\x00\x07\x8f\x09\x23\x8d\x18\x00\x00\x07\xaa\x09\x73\x4b\x74\ -\x00\x00\x07\xcd\x09\xc9\xcc\xc3\x00\x00\x07\xec\x0a\x60\x8c\x6e\ -\x00\x00\x08\x03\x0a\xa2\x5f\x07\x00\x00\x08\x20\x0b\x4d\x0c\xe4\ -\x00\x00\x08\x3f\x0b\x5d\x62\x2e\x00\x00\x08\x72\x0b\xb1\x98\x63\ -\x00\x00\x08\xbb\x0c\x14\x88\xde\x00\x00\x08\xe4\x0c\x2c\x3c\x14\ -\x00\x00\x09\x11\x0c\x8b\x22\x33\x00\x00\x09\x2a\x0c\xa7\x63\x6c\ -\x00\x00\x09\x85\x0c\xb9\x85\xe3\x00\x00\x09\xa6\x0c\xbb\x01\x73\ -\x00\x00\x09\xcf\x0c\xd3\x7d\x01\x00\x00\x09\xf4\x0d\xca\xe4\xb3\ -\x00\x00\x0a\x51\x0e\x42\xf2\x69\x00\x00\x0a\x76\x0e\x4c\x4e\xf4\ -\x00\x00\x0a\x99\x0e\x5d\x7d\x69\x00\x00\x0a\xca\x0e\x6c\x4e\xf4\ -\x00\x00\x0a\xf1\x0e\x8c\xb2\xa3\x00\x00\x0b\x22\x0e\x9b\xcf\x67\ -\x00\x00\x0b\x53\x0f\x02\x2c\x83\x00\x00\x0b\x7e\x0f\x33\xb6\x5e\ -\x00\x00\x0b\xc3\x69\x00\x00\x0b\xfe\x03\x00\x00\x00\x12\x00\x5a\ -\x00\x65\x00\x69\x00\x74\x00\x61\x00\x6c\x00\x74\x00\x65\x00\x72\ -\x05\x00\x00\x47\xd5\x01\x03\x00\x00\x00\x0e\x00\x4e\x00\x69\x00\ -\x65\x00\x64\x00\x72\x00\x69\x00\x67\x05\x00\x00\x53\x67\x01\x03\ -\x00\x00\x00\x06\x00\x53\x00\x65\x00\x74\x05\x00\x00\x59\xc4\x01\ -\x03\x00\x00\x00\x08\x00\x48\x00\x6f\x00\x63\x00\x68\x05\x00\x04\ -\xef\xd8\x01\x03\x00\x00\x00\x08\x00\x4d\x00\x4f\x00\x55\x00\x4c\ -\x05\x00\x05\x24\x9c\x01\x03\x00\x00\x00\x08\x00\x4d\x00\x65\x00\ -\x64\x00\x2e\x05\x00\x05\x3b\x6e\x01\x03\x00\x00\x00\x08\x00\x50\ -\x00\x69\x00\x6e\x00\x67\x05\x00\x05\x70\x47\x01\x03\x00\x00\x00\ -\x08\x00\xdc\x00\x62\x00\x65\x00\x72\x05\x00\x47\x96\xc4\x01\x03\ -\x00\x00\x00\x0a\x00\x41\x00\x75\x00\x64\x00\x69\x00\x6f\x05\x00\ -\x48\xba\xff\x01\x03\x00\x00\x00\x14\x00\x49\x00\x6d\x00\x20\x00\ -\x46\x00\x65\x00\x6e\x00\x73\x00\x74\x00\x65\x00\x72\x05\x00\x4b\ -\x68\x54\x01\x03\x00\x00\x00\x0a\x00\x4c\x00\x65\x00\x76\x00\x65\ -\x00\x6c\x05\x00\x52\xcc\xbc\x01\x03\x00\x00\x00\x0a\x00\x4d\x00\ -\x75\x00\x73\x00\x69\x00\x6b\x05\x00\x54\xc9\xf3\x01\x03\x00\x00\ -\x00\x0e\x00\x41\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x65\x00\x73\ -\x05\x00\x56\xae\xc2\x01\x03\x00\x00\x00\x10\x00\x41\x00\x75\x00\ -\x66\x00\x67\x00\x61\x00\x62\x00\x65\x00\x6e\x05\x00\x5a\x8a\x23\ -\x01\x03\x00\x00\x00\x0a\x00\x54\x00\x69\x00\x74\x00\x65\x00\x6c\ -\x05\x00\x5b\x0b\x25\x01\x03\x00\x00\x00\x0a\x00\x56\x00\x53\x00\ -\x79\x00\x6e\x00\x63\x05\x00\x5b\xb0\x43\x01\x03\x00\x00\x00\x0a\ -\x00\x55\x00\x6c\x00\x74\x00\x72\x00\x61\x05\x00\x5c\x3b\x81\x01\ -\x03\x00\x00\x00\x14\x00\x4d\x00\x4f\x00\x55\x00\x4c\x00\x20\x00\ -\x6c\x00\xe4\x00\x75\x00\x66\x00\x74\x05\x00\x64\x19\x77\x01\x03\ -\x00\x00\x00\x14\x00\x43\x00\x79\x00\x61\x00\x6e\x00\x20\x00\x5a\ -\x00\x65\x00\x69\x00\x74\x00\x3a\x05\x00\x7e\x6c\x0a\x01\x03\x00\ -\x00\x00\x3c\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\x69\x00\ -\x65\x00\x72\x00\x74\x00\x20\x00\x4b\x00\x49\x00\x2d\x00\x20\x00\ -\x75\x00\x6e\x00\x64\x00\x20\x00\x41\x00\x76\x00\x61\x00\x74\x00\ -\x61\x00\x72\x00\x62\x00\x69\x00\x6c\x00\x64\x00\x65\x00\x72\x05\ -\x01\x93\x37\x13\x01\x03\x00\x00\x00\x20\x00\x4c\x00\xf6\x00\x73\ -\x00\x63\x00\x68\x00\x65\x00\x20\x00\x44\x00\x65\x00\x62\x00\x75\ -\x00\x67\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x01\xab\x5c\xb3\x01\ -\x03\x00\x00\x00\x26\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\ -\x69\x00\x65\x00\x72\x00\x65\x00\x20\x00\x4b\x00\x49\x00\x20\x00\ -\x42\x00\x69\x00\x6c\x00\x64\x00\x65\x00\x72\x05\x02\x8f\x56\xc2\ -\x01\x03\x00\x00\x00\x2e\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\ -\x00\x61\x00\x6c\x00\x65\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\ -\x00\x74\x00\x20\x00\x67\x00\x65\x00\x6c\x00\x61\x00\x64\x00\x65\ -\x00\x6e\x00\x2e\x05\x02\xe9\x8e\x3e\x01\x03\x00\x00\x00\x0c\x00\ -\x4c\x00\x69\x00\x7a\x00\x65\x00\x6e\x00\x7a\x05\x02\xf9\xc5\xc5\ -\x01\x03\x00\x00\x00\x16\x00\xdc\x00\x62\x00\x65\x00\x72\x00\x20\ -\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\x05\x03\x05\x6a\ -\xdc\x01\x03\x00\x00\x00\x2a\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\ -\x75\x00\x6c\x00\x20\x00\x51\x00\x54\x00\x20\x00\x6c\x00\xe4\x00\ -\x75\x00\x66\x00\x74\x00\x20\x00\x73\x00\x63\x00\x68\x00\x6f\x00\ -\x6e\x05\x03\x92\xfa\x97\x01\x03\x00\x00\x00\x1c\x00\x5a\x00\x65\ -\x00\x69\x00\x67\x00\x65\x00\x20\x00\x53\x00\x63\x00\x68\x00\x61\ -\x00\x74\x00\x74\x00\x65\x00\x6e\x05\x03\x95\x76\xb3\x01\x03\x00\ -\x00\x00\x08\x00\x4c\x00\x65\x00\x73\x00\x65\x05\x04\x99\x6e\x95\ -\x01\x03\x00\x00\x00\x28\x00\x48\x00\x69\x00\x6e\x00\x74\x00\x65\ -\x00\x72\x00\x67\x00\x72\x00\x75\x00\x6e\x00\x64\x00\x67\x00\x65\ -\x00\x72\x00\xe4\x00\x75\x00\x73\x00\x63\x00\x68\x00\x65\x05\x04\ -\xd7\xac\x54\x01\x03\x00\x00\x00\x16\x00\x48\x00\xf6\x00\x68\x00\ -\x6c\x00\x65\x00\x6e\x00\x7a\x00\x65\x00\x69\x00\x74\x00\x3a\x05\ -\x04\xe2\x4f\x1a\x01\x03\x00\x00\x00\x10\x00\x45\x00\x6e\x00\x74\ -\x00\x66\x00\x65\x00\x72\x00\x6e\x00\x65\x05\x05\x8c\x46\xc5\x01\ -\x03\x00\x00\x00\x14\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\ -\x65\x00\x69\x00\x65\x00\x72\x00\x65\x05\x05\x8c\x68\x02\x01\x03\ -\x00\x00\x00\x1a\x00\x4c\x00\x61\x00\x64\x00\x65\x00\x20\x00\x4a\ -\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x05\x05\ -\xa0\x21\x53\x01\x03\x00\x00\x00\x16\x00\x4e\x00\x53\x00\x43\x00\ -\x20\x00\x53\x00\x74\x00\x69\x00\x6d\x00\x6d\x00\x65\x00\x6e\x05\ -\x05\xd0\xcd\x93\x01\x03\x00\x00\x00\x2c\x00\x41\x00\x6e\x00\x69\ -\x00\x73\x00\x6f\x00\x74\x00\x72\x00\x6f\x00\x70\x00\x69\x00\x73\ -\x00\x63\x00\x68\x00\x65\x00\x72\x00\x20\x00\x46\x00\x69\x00\x6c\ -\x00\x74\x00\x65\x00\x72\x05\x05\xf8\x63\x97\x01\x03\x00\x00\x00\ -\x28\x00\x43\x00\x68\x00\x61\x00\x74\x00\x2d\x00\x20\x00\x75\x00\ -\x6e\x00\x64\x00\x20\x00\x46\x00\x65\x00\x68\x00\x6c\x00\x65\x00\ -\x72\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x06\x19\xf8\x33\x01\x03\ -\x00\x00\x00\x1a\x00\x4c\x00\x65\x00\x73\x00\x65\x00\x20\x00\x43\ -\x00\x68\x00\x61\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x06\ -\x3e\x53\x23\x01\x03\x00\x00\x00\x46\x00\x46\x00\x65\x00\x68\x00\ -\x6c\x00\x65\x00\x72\x00\x20\x00\x62\x00\x65\x00\x69\x00\x6d\x00\ -\x20\x00\xd6\x00\x66\x00\x66\x00\x6e\x00\x65\x00\x6e\x00\x20\x00\ -\x76\x00\x6f\x00\x6e\x00\x20\x00\x67\x00\x72\x00\x61\x00\x70\x00\ -\x68\x00\x69\x00\x63\x00\x73\x00\x2e\x00\x69\x00\x6e\x00\x69\x05\ -\x06\x80\x0f\x99\x01\x03\x00\x00\x00\x40\x00\x46\x00\x65\x00\x68\ -\x00\x6c\x00\x65\x00\x72\x00\x20\x00\x62\x00\x65\x00\x69\x00\x6d\ -\x00\x20\x00\xd6\x00\x66\x00\x66\x00\x6e\x00\x65\x00\x6e\x00\x20\ -\x00\x76\x00\x6f\x00\x6e\x00\x20\x00\x61\x00\x75\x00\x64\x00\x69\ -\x00\x6f\x00\x2e\x00\x69\x00\x6e\x00\x69\x05\x06\x93\xd5\xd9\x01\ -\x03\x00\x00\x00\x10\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\ -\x61\x00\x6c\x00\x65\x05\x06\xc9\x43\x23\x01\x03\x00\x00\x00\x34\ -\x00\x55\x00\x6e\x00\x67\x00\x65\x00\x73\x00\x70\x00\x65\x00\x69\ -\x00\x63\x00\x68\x00\x65\x00\x72\x00\x74\x00\x65\x00\x20\x00\xc4\ -\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x75\x00\x6e\x00\x67\x00\x65\ -\x00\x6e\x00\x21\x05\x06\xca\x7f\x51\x01\x03\x00\x00\x00\x20\x00\ -\x53\x00\x63\x00\x68\x00\x61\x00\x74\x00\x74\x00\x65\x00\x6e\x00\ -\x71\x00\x75\x00\x61\x00\x6c\x00\x69\x00\x74\x00\xe4\x00\x74\x05\ -\x06\xcd\x5c\x79\x01\x03\x00\x00\x00\x1e\x00\x54\x00\x65\x00\x78\ -\x00\x74\x00\x75\x00\x72\x00\x65\x00\x71\x00\x75\x00\x61\x00\x6c\ -\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x07\x0d\x0d\x29\x01\x03\x00\ -\x00\x00\x0c\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\x05\ -\x07\x7e\x46\xbc\x01\x03\x00\x00\x00\x12\x00\x5a\x00\x65\x00\x69\ -\x00\x74\x00\x7a\x00\x6f\x00\x6e\x00\x65\x00\x6e\x05\x07\x86\xf4\ -\xf3\x01\x03\x00\x00\x00\x48\x00\x57\x00\x6f\x00\x6c\x00\x6c\x00\ -\x65\x00\x6e\x00\x20\x00\x73\x00\x69\x00\x65\x00\x20\x00\x64\x00\ -\x69\x00\x65\x00\x20\x00\xc4\x00\x6e\x00\x64\x00\x65\x00\x72\x00\ -\x75\x00\x6e\x00\x67\x00\x65\x00\x6e\x00\x20\x00\x73\x00\x70\x00\ -\x65\x00\x69\x00\x63\x00\x68\x00\x65\x00\x72\x00\x6e\x00\x3f\x05\ -\x07\xe0\x1a\x4f\x01\x03\x00\x00\x00\x0e\x00\x53\x00\x70\x00\x72\ -\x00\x61\x00\x63\x00\x68\x00\x65\x05\x08\x4e\xb2\xf5\x01\x03\x00\ -\x00\x00\x5c\x00\x44\x00\x69\x00\x65\x00\x73\x00\x65\x00\x73\x00\ -\x20\x00\x46\x00\x65\x00\x61\x00\x74\x00\x75\x00\x72\x00\x65\x00\ -\x20\x00\x77\x00\x75\x00\x72\x00\x64\x00\x65\x00\x20\x00\x6e\x00\ -\x6f\x00\x63\x00\x68\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\x00\ -\x74\x00\x20\x00\x69\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x6d\x00\ -\x65\x00\x6e\x00\x74\x00\x69\x00\x65\x00\x72\x00\x74\x00\x21\x05\ -\x08\x62\xc8\x91\x01\x03\x00\x00\x00\x10\x00\x43\x00\x68\x00\x61\ -\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x05\x08\x67\x7c\x03\x01\ -\x03\x00\x00\x00\x2c\x00\x45\x00\x6e\x00\x74\x00\x66\x00\x65\x00\ -\x72\x00\x6e\x00\x65\x00\x20\x00\x67\x00\x65\x00\x70\x00\x61\x00\ -\x63\x00\x6b\x00\x74\x00\x65\x00\x20\x00\x4c\x00\x6f\x00\x67\x00\ -\x73\x05\x08\x6c\x74\x43\x01\x03\x00\x00\x00\x0c\x00\x47\x00\x72\ -\x00\x61\x00\x66\x00\x69\x00\x6b\x05\x08\x86\xeb\x43\x01\x03\x00\ -\x00\x00\x14\x00\x41\x00\x72\x00\x63\x00\x68\x00\x69\x00\x76\x00\ -\x69\x00\x65\x00\x72\x00\x65\x05\x08\x89\xf0\x85\x01\x03\x00\x00\ -\x00\x10\x00\x48\x00\x61\x00\x72\x00\x64\x00\x77\x00\x61\x00\x72\ -\x00\x65\x05\x08\x8b\xdc\x65\x01\x03\x00\x00\x00\x10\x00\x51\x00\ -\x75\x00\x61\x00\x6c\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x08\xb8\ -\x30\xe9\x01\x03\x00\x00\x00\x18\x00\x41\x00\x6b\x00\x74\x00\x69\ -\x00\x76\x00\x69\x00\x65\x00\x72\x00\x20\x00\x45\x00\x41\x00\x58\ -\x05\x09\x23\x8d\x18\x01\x03\x00\x00\x00\x14\x00\x56\x00\x6f\x00\ -\x69\x00\x63\x00\x65\x00\x20\x00\x43\x00\x68\x00\x61\x00\x74\x05\ -\x09\x73\x4b\x74\x01\x03\x00\x00\x00\x0c\x00\x53\x00\x65\x00\x72\ -\x00\x76\x00\x65\x00\x72\x05\x09\xc9\xcc\xc3\x01\x03\x00\x00\x00\ -\x12\x00\x41\x00\x75\x00\x66\x00\x6c\x00\xf6\x00\x73\x00\x75\x00\ -\x6e\x00\x67\x05\x0a\x60\x8c\x6e\x01\x03\x00\x00\x00\x14\x00\x41\ -\x00\x6e\x00\x74\x00\x69\x00\x20\x00\x41\x00\x6c\x00\x69\x00\x61\ -\x00\x73\x05\x0a\xa2\x5f\x07\x01\x03\x00\x00\x00\x28\x00\x41\x00\ -\x6b\x00\x74\x00\x69\x00\x76\x00\x69\x00\x65\x00\x72\x00\x65\x00\ -\x20\x00\x56\x00\x6f\x00\x69\x00\x63\x00\x65\x00\x20\x00\x43\x00\ -\x68\x00\x61\x00\x74\x05\x0b\x4d\x0c\xe4\x01\x03\x00\x00\x00\x3e\ -\x00\x46\x00\x65\x00\x68\x00\x6c\x00\x65\x00\x72\x00\x20\x00\x62\ -\x00\x65\x00\x69\x00\x6d\x00\x20\x00\x4c\x00\x61\x00\x64\x00\x65\ -\x00\x6e\x00\x20\x00\x64\x00\x65\x00\x72\x00\x20\x00\x4a\x00\x6f\ -\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x00\x2e\x05\x0b\ -\x5d\x62\x2e\x01\x03\x00\x00\x00\x1e\x00\x50\x00\x61\x00\x63\x00\ -\x6b\x00\x65\x00\x20\x00\x44\x00\x65\x00\x62\x00\x75\x00\x67\x00\ -\x6c\x00\x6f\x00\x67\x00\x73\x05\x0b\xb1\x98\x63\x01\x03\x00\x00\ -\x00\x22\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\ -\x00\x65\x00\x20\x00\x67\x00\x65\x00\x6c\x00\x61\x00\x64\x00\x65\ -\x00\x6e\x00\x2e\x05\x0c\x14\x88\xde\x01\x03\x00\x00\x00\x0e\x00\ -\x45\x00\x6c\x00\x65\x00\x6d\x00\x65\x00\x6e\x00\x74\x05\x0c\x2c\ -\x3c\x14\x01\x03\x00\x00\x00\x50\x00\x41\x00\x72\x00\x63\x00\x68\ -\x00\x69\x00\x76\x00\x69\x00\x65\x00\x72\x00\x65\x00\x20\x00\x43\ -\x00\x68\x00\x61\x00\x74\x00\x6c\x00\x6f\x00\x67\x00\x73\x00\x20\ -\x00\x75\x00\x6e\x00\x64\x00\x20\x00\x70\x00\x61\x00\x63\x00\x6b\ -\x00\x65\x00\x20\x00\x4c\x00\x6f\x00\x67\x00\x64\x00\x61\x00\x74\ -\x00\x65\x00\x69\x00\x65\x00\x6e\x05\x0c\x8b\x22\x33\x01\x03\x00\ -\x00\x00\x16\x00\x41\x00\x6c\x00\x6c\x00\x65\x00\x73\x00\x20\x00\ -\x73\x00\x74\x00\x75\x00\x6d\x00\x6d\x05\x0c\xa7\x63\x6c\x01\x03\ -\x00\x00\x00\x1e\x00\x53\x00\x65\x00\x72\x00\x76\x00\x65\x00\x72\ -\x00\x20\x00\x61\x00\x6e\x00\x70\x00\x69\x00\x6e\x00\x67\x00\x65\ -\x00\x6e\x05\x0c\xb9\x85\xe3\x01\x03\x00\x00\x00\x1a\x00\x45\x00\ -\x69\x00\x6e\x00\x73\x00\x74\x00\x65\x00\x6c\x00\x6c\x00\x75\x00\ -\x6e\x00\x67\x00\x65\x00\x6e\x05\x0c\xbb\x01\x73\x01\x03\x00\x00\ -\x00\x52\x00\x45\x00\x69\x00\x6e\x00\x65\x00\x20\x00\x49\x00\x6e\ -\x00\x73\x00\x74\x00\x61\x00\x6e\x00\x7a\x00\x20\x00\x76\x00\x6f\ -\x00\x6e\x00\x20\x00\x70\x00\x79\x00\x4d\x00\x6f\x00\x75\x00\x6c\ -\x00\x20\x00\x51\x00\x54\x00\x20\x00\x6c\x00\xe4\x00\x75\x00\x66\ -\x00\x74\x00\x20\x00\x62\x00\x65\x00\x72\x00\x65\x00\x69\x00\x74\ -\x00\x73\x00\x21\x05\x0c\xd3\x7d\x01\x01\x03\x00\x00\x00\x1a\x00\ -\x4c\x00\x61\x00\x64\x00\x65\x00\x20\x00\x4a\x00\x6f\x00\x75\x00\ -\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x05\x0d\xca\xe4\xb3\x01\x03\ -\x00\x00\x00\x18\x00\x54\x00\x6f\x00\x6e\x00\x70\x00\x72\x00\x69\ -\x00\x6f\x00\x72\x00\x69\x00\x74\x00\xe4\x00\x74\x05\x0e\x42\xf2\ -\x69\x01\x03\x00\x00\x00\x26\x00\x4e\x00\x69\x00\x63\x00\x68\x00\ -\x74\x00\x20\x00\x69\x00\x6d\x00\x70\x00\x6c\x00\x65\x00\x6d\x00\ -\x65\x00\x6e\x00\x74\x00\x69\x00\x65\x00\x72\x00\x74\x05\x0e\x4c\ -\x4e\xf4\x01\x03\x00\x00\x00\x1c\x00\x47\x00\x72\x00\x61\x00\x66\ -\x00\x69\x00\x6b\x00\x71\x00\x75\x00\x61\x00\x6c\x00\x69\x00\x74\ -\x00\xe4\x00\x74\x05\x0e\x5d\x7d\x69\x01\x03\x00\x00\x00\x26\x00\ -\x4e\x00\x69\x00\x63\x00\x68\x00\x74\x00\x20\x00\x69\x00\x6d\x00\ -\x70\x00\x6c\x00\x65\x00\x6d\x00\x65\x00\x6e\x00\x74\x00\x69\x00\ -\x65\x00\x72\x00\x74\x05\x0e\x6c\x4e\xf4\x01\x03\x00\x00\x00\x26\ -\x00\x52\x00\x65\x00\x70\x00\x61\x00\x72\x00\x69\x00\x65\x00\x72\ -\x00\x65\x00\x20\x00\x4b\x00\x49\x00\x20\x00\x42\x00\x69\x00\x6c\ -\x00\x64\x00\x65\x00\x72\x05\x0e\x8c\xb2\xa3\x01\x03\x00\x00\x00\ -\x20\x00\x4d\x00\x4f\x00\x55\x00\x4c\x00\x20\x00\x6c\x00\xe4\x00\ -\x75\x00\x66\x00\x74\x00\x20\x00\x6e\x00\x69\x00\x63\x00\x68\x00\ -\x74\x05\x0e\x9b\xcf\x67\x01\x03\x00\x00\x00\x3a\x00\x4c\x00\x65\ -\x00\x73\x00\x65\x00\x20\x00\x4a\x00\x6f\x00\x75\x00\x72\x00\x6e\ -\x00\x61\x00\x6c\x00\x65\x00\x20\x00\x75\x00\x6e\x00\x64\x00\x20\ -\x00\x4e\x00\x61\x00\x63\x00\x68\x00\x72\x00\x69\x00\x63\x00\x68\ -\x00\x74\x00\x65\x00\x6e\x05\x0f\x02\x2c\x83\x01\x03\x00\x00\x00\ -\x30\x00\x4b\x00\x65\x00\x69\x00\x6e\x00\x65\x00\x20\x00\x4a\x00\ -\x6f\x00\x75\x00\x72\x00\x6e\x00\x61\x00\x6c\x00\x65\x00\x20\x00\ -\x67\x00\x65\x00\x66\x00\x75\x00\x6e\x00\x64\x00\x65\x00\x6e\x00\ -\x2e\x05\x0f\x33\xb6\x5e\x01\x2f\x00\x00\x01\x8c\x00\x97\x00\x00\ -\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x23\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x29\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\ -\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x53\ -\x69\x6d\x70\x6c\x65\x50\x72\x6f\x67\x72\x65\x73\x73\x62\x61\x72\ -\x00\x00\x03\x61\x70\x70\x00\x00\x15\x4c\x6f\x63\x61\x6c\x69\x7a\ -\x61\x74\x69\x6f\x6e\x43\x6f\x6e\x74\x61\x69\x6e\x65\x72\x00\x00\ -\x10\x49\x6e\x69\x46\x69\x6c\x65\x43\x6f\x6e\x74\x61\x69\x6e\x65\ -\x72\x00\x0a\x4d\x61\x69\x6e\x57\x69\x6e\x64\x6f\x77\x00\x07\x63\ -\x6f\x6e\x74\x65\x78\x74\x00\x00\ -" - -qt_resource_name = "\ -\x00\x0c\ -\x0d\xfc\x11\x13\ -\x00\x74\ -\x00\x72\x00\x61\x00\x6e\x00\x73\x00\x6c\x00\x61\x00\x74\x00\x69\x00\x6f\x00\x6e\x00\x73\ -\x00\x0c\ -\x01\x64\x78\xdd\ -\x00\x70\ -\x00\x79\x00\x6d\x00\x6f\x00\x75\x00\x6c\x00\x5f\x00\x6e\x00\x6c\x00\x2e\x00\x71\x00\x6d\ -\x00\x0c\ -\x01\x5c\xe8\xdd\ -\x00\x70\ -\x00\x79\x00\x6d\x00\x6f\x00\x75\x00\x6c\x00\x5f\x00\x65\x00\x73\x00\x2e\x00\x71\x00\x6d\ -\x00\x0c\ -\x01\x5d\xd8\xdd\ -\x00\x70\ -\x00\x79\x00\x6d\x00\x6f\x00\x75\x00\x6c\x00\x5f\x00\x66\x00\x72\x00\x2e\x00\x71\x00\x6d\ -\x00\x0c\ -\x01\x60\xf8\xdd\ -\x00\x70\ -\x00\x79\x00\x6d\x00\x6f\x00\x75\x00\x6c\x00\x5f\x00\x69\x00\x74\x00\x2e\x00\x71\x00\x6d\ -\x00\x0c\ -\x01\x5b\x08\xdd\ -\x00\x70\ -\x00\x79\x00\x6d\x00\x6f\x00\x75\x00\x6c\x00\x5f\x00\x64\x00\x65\x00\x2e\x00\x71\x00\x6d\ -" - -qt_resource_struct = "\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x05\x00\x00\x00\x02\ -\x00\x00\x00\x96\x00\x00\x00\x00\x00\x01\x00\x00\x05\x54\ -\x00\x00\x00\x3c\x00\x00\x00\x00\x00\x01\x00\x00\x01\x55\ -\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x02\xaa\ -\x00\x00\x00\x78\x00\x00\x00\x00\x00\x01\x00\x00\x03\xff\ -\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ -" - -def qInitResources(): - QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) - -def qCleanupResources(): - QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) - -qInitResources() Modified: pymoul/trunk/src/moul/qt/mainwindow.py =================================================================== --- pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/mainwindow.py 2007-02-06 15:15:30 UTC (rev 145) @@ -287,8 +287,24 @@ def on_pb_log_archive_clicked(self): """ """ - mb = qtutils.notImplementedMB(self) - mb.exec_() + chatmover = self.urupersonaldir.chatmover + logzipper = self.urupersonaldir.logzipper + if chatmover.findLogs(): + chatmover.moveChatlogs() + mb = qtutils.infoMB(self, + self.trUtf8("Chatlog archive"), + self.trUtf8("%1 chatlog(s) were moved to the archive.").arg( + len(chatmover)) + ) + mb.exec_() + else: + mb = qtutils.infoMB(self, + self.trUtf8("Chatlog archive"), + self.trUtf8("No chatlog(s) to archive") + ) + mb.exec_() + #mb = qtutils.notImplementedMB(self) + #mb.exec_() @pyqtSignature("") def on_pb_log_remove_clicked(self): @@ -311,7 +327,8 @@ # ************************************************************************ # about tab def _about_init(self): - self.tb_license.setPlainText(metadata.LICENSE) + self.tb_license.setHtml('<pre style="font-size:7pt;">' + + metadata.LICENSE + '</pre>') # ************************************************************************ # time zones Modified: pymoul/trunk/src/moul/qt/moulqt.py =================================================================== --- pymoul/trunk/src/moul/qt/moulqt.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/moulqt.py 2007-02-06 15:15:30 UTC (rev 145) @@ -36,7 +36,7 @@ from moul.qt.errorhandler import removeQtExceptHook from moul.qt.errorhandler import setupQtExceptHook from moul.qt.mainwindow import MainWindow -from moul.qt.utils import installTranslator +from moul.qt.i18n import installTranslator LOG = getLogger('moul.qt') @@ -68,7 +68,6 @@ createLogfile() setupQtExceptHook() - installTranslator(app) LOG.info("Invoking PyMoul QT MainWindow") Modified: pymoul/trunk/src/moul/qt/utils.py =================================================================== --- pymoul/trunk/src/moul/qt/utils.py 2007-02-06 03:51:21 UTC (rev 144) +++ pymoul/trunk/src/moul/qt/utils.py 2007-02-06 15:15:30 UTC (rev 145) @@ -38,8 +38,6 @@ from moul.osdependent import __FROZEN__ from moul.log import getLogger -import moul.qt.i18n.translations_rc - LOG = getLogger('moul.qt.utils') _marker=object() @@ -321,36 +319,3 @@ if text is None: text = context.trUtf8("Sorry, this feature is not implemented yet!") return infoMB(context, title, text) - -def installTranslator(app, prefix="pymoul"): - """ - Installs a translator for the ap - """ - return # XXX: doesn't work - translator = QtCore.QTranslator(app) - directory = QtCore.QDir(":/translations") - locale = str(QtCore.QLocale.system().name()) - LOG.info("QTranslation using locale %s" % locale) - try: - lang, country = locale.split('_') - except: - lang, country = locale, '' - longname = "%s_%s.qm" % (prefix, locale) - shortname = "%s_%s.qm" % (prefix, lang) - match = None - for qfinfo in directory.entryInfoList(): - fname = str(qfinfo.fileName()) - if fname == longname: - match = qfinfo.absoluteFilePath() - LOG.info("Loading translation file %s" % fname) - break - if fname == shortname: - match = qfinfo.absoluteFilePath() - LOG.info("Loading translation file %s" % fname) - break - if match is None: - LOG.info("No translation file found!") - return False - qfile = QtCore.QFile(match) - translator.load(qfile.read(qfile.size()), qfile.size()) - app.installTranslator(translator) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ti...@us...> - 2007-02-06 16:53:38
|
Revision: 148 http://pymoul.svn.sourceforge.net/pymoul/?rev=148&view=rev Author: tiran Date: 2007-02-06 08:53:36 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Do not remove build dir Fixed some typos in i18n code Modified Paths: -------------- pymoul/trunk/build.bat pymoul/trunk/installer.bat pymoul/trunk/setup.py pymoul/trunk/src/moul/qt/i18n/__init__.py Modified: pymoul/trunk/build.bat =================================================================== --- pymoul/trunk/build.bat 2007-02-06 16:48:27 UTC (rev 147) +++ pymoul/trunk/build.bat 2007-02-06 16:53:36 UTC (rev 148) @@ -1,5 +1,4 @@ @echo off -rd /S /Q build cls set PYTHONPATH=src python setup.py py2exe Modified: pymoul/trunk/installer.bat =================================================================== --- pymoul/trunk/installer.bat 2007-02-06 16:48:27 UTC (rev 147) +++ pymoul/trunk/installer.bat 2007-02-06 16:53:36 UTC (rev 148) @@ -1,5 +1,4 @@ @echo off -rd /S /Q build cls set PYTHONPATH=src set INNOSETUP=yes Modified: pymoul/trunk/setup.py =================================================================== --- pymoul/trunk/setup.py 2007-02-06 16:48:27 UTC (rev 147) +++ pymoul/trunk/setup.py 2007-02-06 16:53:36 UTC (rev 148) @@ -60,7 +60,7 @@ install_requires = ["pytz>=2006p",], data_files = [ ('docs', list(glob('*.txt'))), - ('i18', list(glob('src/moul/qt/i18n/pymoul_*.*'))), + ('i18n', list(glob('src/moul/qt/i18n/pymoul_*.qm'))), ], package_dir = {'' : 'src'}, packages = find_packages('src', exclude="moul.qt"), Modified: pymoul/trunk/src/moul/qt/i18n/__init__.py =================================================================== --- pymoul/trunk/src/moul/qt/i18n/__init__.py 2007-02-06 16:48:27 UTC (rev 147) +++ pymoul/trunk/src/moul/qt/i18n/__init__.py 2007-02-06 16:53:36 UTC (rev 148) @@ -56,12 +56,11 @@ @rtype: str or None """ if __FROZEN__: - basedir = os.path.dirname(sys.prefix) - qm = os.path.join(basedir, 'i18n', '%s.qm') + qm = os.path.join(sys.prefix, 'i18n', '%s.qm' % name) if os.path.isfile(qm): return open(qm, 'rb').read() else: - return None + LOG.debug("QM file not found: %s" % qm) else: return TRANSLATIONS.get(name, None) @@ -92,5 +91,6 @@ LOG.info("Loading translation %s" % longname) if qm is not None: + #LOG.debug("len(qm) %i" % len(qm)) translator.load(qm, len(qm)) app.installTranslator(translator) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |