Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
Bingo! Richard On Thu, Dec 23, 2010 at 11:37 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Ok, everything seems to be in languages.py... > > I didn't noticed at first read that the code I was seeking for was there... > > I will see if I get what I want... [?] > > Richard > > > On Th

Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
Ok, everything seems to be in languages.py... I didn't noticed at first read that the code I was seeking for was there... I will see if I get what I want... [?] Richard On Thu, Dec 23, 2010 at 11:31 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Find it! > > My only remaning proble

Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
Find it! My only remaning problem is the # coding: utf8 at the top of translation file... I don't see how dal.py manage it... I could made a readline and remove it in a other instance of the open file or something like that, but should have a simpler way to manage it. Richard On Thu, Dec 23, 201

Re: [web2py] Re: translation dict name

2010-12-23 Thread ron_m
web2py uses portalocker.py look under gluon. There are many examples of use such as locking the session file in globals.py

Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
Ok, I think I found what you do : >From the DAL.py Version 1.88.2 tfile = open(self._dbt, 'w') portalocker.lock(tfile, portalocker.LOCK_EX) cPickle.dump(sql_fields, tfile) portalocker.unlock(tfile) tfile.close()

Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
There is also this lib : http://pypi.python.org/pypi/lockfile/ http://www.mail-archive.com/spambayes-dev@python.org/msg00727.html Richard On Thu, Dec 23, 2010 at 10:13 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Hello Massimo, > > I have one more question about the process of

Re: [web2py] Re: translation dict name

2010-12-23 Thread Richard Vézina
Hello Massimo, I have one more question about the process of pickle the translation file... Do you lock file with "flock"? Or just open the file and close it after the pickling and applying transformation to the dict is enough to lock the file during the process? Is this code correct to not havin