| Revision 828,
1.0 KB
checked in by lele@…, 8 years ago
(diff) |
|
Activate the user's locale on LC_CTYPE
This should fix encoding troubles, on machines where site policy does
not enforce that by default.
|
| Line | |
|---|
| 1 | #!/usr/bin/env python |
|---|
| 2 | # -*- mode: python; coding: utf-8 -*- |
|---|
| 3 | # :Progetto: vcpx -- Frontend |
|---|
| 4 | # :Creato: lun 03 mag 2004 01:39:00 CEST |
|---|
| 5 | # :Autore: Lele Gaifax <lele@nautilus.homeip.net> |
|---|
| 6 | # :Licenza: GNU General Public License |
|---|
| 7 | # |
|---|
| 8 | |
|---|
| 9 | """ |
|---|
| 10 | Keep a tree in sync with its "upstream" repository of a (possibly) |
|---|
| 11 | different format. |
|---|
| 12 | |
|---|
| 13 | For more documentation, see the README file from the distribution. |
|---|
| 14 | """ |
|---|
| 15 | |
|---|
| 16 | __docformat__ = 'reStructuredText' |
|---|
| 17 | |
|---|
| 18 | if __name__ == '__main__': |
|---|
| 19 | import sys |
|---|
| 20 | import locale |
|---|
| 21 | |
|---|
| 22 | locale.setlocale(locale.LC_CTYPE, '') |
|---|
| 23 | if len(sys.argv)>1 and sys.argv[1] == 'test': |
|---|
| 24 | del sys.argv[1] |
|---|
| 25 | from unittest import main |
|---|
| 26 | main(module='vcpx.tests', argv=sys.argv) |
|---|
| 27 | else: |
|---|
| 28 | from vcpx import * |
|---|
| 29 | |
|---|
| 30 | if len(sys.argv) == 1: |
|---|
| 31 | sys.argv.append('--help') |
|---|
| 32 | |
|---|
| 33 | try: |
|---|
| 34 | main() |
|---|
| 35 | except TailorExceptions, exc: |
|---|
| 36 | print "%s: %s" % (exc.__doc__, exc) |
|---|
| 37 | except UnicodeEncodeError, exc: |
|---|
| 38 | print exc |
|---|
| 39 | print "You may want to specify a suitable charset using --encoding" |
|---|
Note: See
TracBrowser
for help on using the repository browser.