Python-Script zum Aufspüren häufiger Tippfehler

Felix Schweighofer felix.schweighofer at googlemail.com
Tue Dec 28 19:43:43 CET 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[Felix Schweighofer – 2010-12-28 11:08]
> [Frederik Schwarzer ? 2010-12-27 20:34]
>> Moin,
> 
>> das end=' ' im print-Statement geht hier nicht.
> 
>>     from __future__ import print_function
>> könnte helfen.
> 
>> MfG
> 
> 
> Mit Python 3 funktioniert das.
> Sorry, ich hätte das gleich mit nem älteren Python ausprobieren sollen.
> 
> Danke für den Hinweis.

Anbei eine verbesserte Version unter GPL3, die einige zusätzliche Tests
enthält; Danke an Frederik.
Tests/Checks werden jetzt in einer separaten Datei
("check_collection.py") definiert.

Installation: i18n_check.py in einen beliebigen Ordner kopieren,
__init__.py, checks.py und check_collection.py in einen Unterordner
namens i18n

Falls kein Python3 vorhanden ist, einfach Zeile 47 in i18n_check.py
durch folgendes ersetzen (inklusive Leerzeichen am Zeilenanfang):
        print '{0}{1}:'.format(color_file_name, file_name),
(Das Komma am Zeilenende ist korrekt)

Grüße,
Felix
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0aL9kACgkQYnmexcjIJ0XI/ACgig75KYWXSJ64b3AdPvTuwxty
R5UAoJf7M0tXhLCDNsxsiF8UClXdU6JG
=8Dsm
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: i18n_check.py
Type: text/x-python
Size: 4069 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-i18n-de/attachments/20101228/83626426/attachment-0004.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checks.py
Type: text/x-python
Size: 2265 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-i18n-de/attachments/20101228/83626426/attachment-0005.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_collection.py
Type: text/x-python
Size: 1461 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-i18n-de/attachments/20101228/83626426/attachment-0006.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: __init__.py
Type: text/x-python
Size: 0 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-i18n-de/attachments/20101228/83626426/attachment-0007.py 


More information about the kde-i18n-de mailing list