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
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
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
web2py uses portalocker.py look under gluon. There are many examples of use
such as locking the session file in globals.py
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()
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
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
7 matches
Mail list logo