py6是什么货币

Oh, that's an interesting beast.
I've spent considerable time of getting that right, there are three main issues that differs from locale to locale:


py6是什么货币

文章插图
- currency symbol and direction
- thousand separator
- decimal point
I've written my own rather extensive implementation of this which is part of the kiwi python framework, check out the LGPL:ed source here:
The code is slightly Linux/Glibc specific, but shouldn't be too difficult to adopt to windows or other unixes.
Once you have that installed you can do the following:
【py6是什么货币】Which will then give you:
or
Depending on the currently selected locale.
The main point this post has over the other is that it will work with older versions of python. locale.currency was introduced in python 2.5.