Revision 140,
410 bytes
checked in by marcus, 13 years ago
(diff) |
- locale issue clearified (hopefully)
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Rev Id Date
|
Line | |
---|
1 | # -*- coding: utf-8 -*- |
---|
2 | |
---|
3 | import ctypes as C |
---|
4 | import os |
---|
5 | import locale |
---|
6 | |
---|
7 | lib = C.CDLL(os.path.join(".", "sscanflib.so"), mode=C.RTLD_GLOBAL) |
---|
8 | |
---|
9 | print locale.getlocale() |
---|
10 | |
---|
11 | import gtk |
---|
12 | del gtk |
---|
13 | |
---|
14 | print locale.getlocale() |
---|
15 | lib.test() |
---|
16 | |
---|
17 | # if not set, the test function will fail (if your locale settings say, that |
---|
18 | # number fractions are not separated by a dot (e.g. comma) |
---|
19 | locale.setlocale(locale.LC_NUMERIC, "C") |
---|
20 | |
---|
21 | lib.test() |
---|
Note: See
TracBrowser
for help on using the repository browser.