On Sat, Jun 20, 2009 at 06:34:10PM +0200, Giovanni Bajo wrote:
> 
> On sab, 2009-06-20 at 02:27 -0700, sandro dentella wrote:
> > Hi,
> > 
> >   using the --onedir option I managed to get to the point that the
> >   application starts, recognizes the locale setting of the os it is
> > running
> >   on, uses locale .po of my application to translate messages, but
> > when I
> >   use babel to format numbers, it complains that it does not know the
> > locale
> >   it_IT.
> 
> I'm not sure I understand the problem. Can you provide me with a
> reproduction recipe?

Here a 2 line example: 

   san...@bluff:/misc/src/svn/pyinstaller-hg$ cat  babex/ex1.py 

   from babel import numbers
   print numbers.format_decimal(123.4)

babel needs to access the locale system to know how to format numbers
It finds it on my machine:

   san...@bluff:/misc/src/svn/pyinstaller-hg$ python babex/ex1.py
   123,4

But not on the generated one:

   san...@bluff:/misc/src/svn/pyinstaller-hg$ Makespec.py -o babex babex/ex1.py
   wrote babex/ex1.spec
   now run Build.py to build the executable
   san...@bluff:/misc/src/svn/pyinstaller-hg$ Build.py babex/ex1.spec 
   checking Analysis
   building Analysis because outAnalysis0.toc non existent
   running Analysis outAnalysis0.toc
   Analyzing: ./support/_mountzlib.py
   Analyzing: ./support/useUnicode.py
   Analyzing: babex/ex1.py
   Warnings written to babex/warnex1.txt
   checking PYZ
   rebuilding outPYZ1.toc because outPYZ1.pyz is missing
   building PYZ outPYZ1.toc
   checking PKG
   rebuilding outPKG3.toc because outPKG3.pkg is missing
   building PKG outPKG3.pkg
   checking EXE
   rebuilding outEXE2.toc because ex1 missing
   building EXE from outEXE2.toc
   Appending archive to EXE babex/build/pyi.linux2/ex1/ex1
   checking COLLECT
   building because outCOLLECT4.toc missing or bad
   building COLLECT outCOLLECT4.toc
   san...@bluff:/misc/src/svn/pyinstaller-hg$ babex/dist/ex1/ex1 
   Traceback (most recent call last):
     File "<string>", line 2, in <module>
     File "babex/build/pyi.linux2/ex1/outPYZ1.pyz/babel.numbers", line 156, in 
format_decimal
     File "babex/build/pyi.linux2/ex1/outPYZ1.pyz/babel.core", line 210, in 
parse
     File "babex/build/pyi.linux2/ex1/outPYZ1.pyz/babel.core", line 136, in 
__init__
   babel.core.UnknownLocaleError: unknown locale 'it_IT'


sandro
*:-)


-- 
Sandro Dentella  *:-)
http://sqlkit.argolinux.org        SQLkit home page - PyGTK/python/sqlalchemy

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/PyInstaller?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to