source: SHX/trunk/sandbox/sscanf.py @ 140

Revision 140, 410 bytes checked in by marcus, 11 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
3import ctypes as C
4import os
5import locale
6
7lib = C.CDLL(os.path.join(".", "sscanflib.so"), mode=C.RTLD_GLOBAL)
8
9print locale.getlocale()
10
11import gtk
12del gtk
13
14print locale.getlocale()
15lib.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)
19locale.setlocale(locale.LC_NUMERIC, "C")
20
21lib.test()
Note: See TracBrowser for help on using the repository browser.