Python论坛  - 讨论区

标题:[python-chinese] 关于fcntl文件锁,想和大家讨论一下

2006年11月23日 星期四 11:06

=?GB2312?B?u8bBiA==?= huangchonggnu在gmail.com
星期四 十一月 23 11:06:34 HKT 2006

1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿

2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿

3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/90a41587/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 11:45

limodou limodou在gmail.com
星期四 十一月 23 11:45:14 HKT 2006

On 11/23/06, »ÆÁˆ <huangchonggnu在gmail.com> wrote:
> 1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿
>
> 2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿
>
> 3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
>
>
ÅÅËüËøÓ¦¸ÃÊDZðÈ˲»ÄܶÁÒ²²»ÄÜд¡£¶ø¹²ÏíËøÊDZðÈË¿ÉÒÔ¶Á£¬²»ÄÜд¡£Èç¹û·ÇËüËø¼ÓÉϺó£¬ÁíÒ»¸ö½ø³ÌÓ¦¸ÃÊǵȴý°É¡£ÖÁÓÚÓÐûÓг¬Ê±ÎÒûÓÐ̫עÒâ¡£

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 11:48

bird devdoer devdoer在gmail.com
星期四 十一月 23 11:48:48 HKT 2006

1.Õâ¸öÊÇÓÉÄã×Ô¼º¾ö¶¨µÄ¡£Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËøµÄ»°£¬¼´Ê¹Óнø³Ì¼ÓÁËÅÅËûËø£¬ÆäËû½ø³ÌÈÔÈ»ÊÇ¿ÉÒÔдµÄ¡£
2.Äã¸ù¾ÝÄãµÄÐèҪѡÔñºÏÊʵÄËø¡£Ã»ÓÐÏÞ¶¨Ò»¶¨ÓÃʲôËø£¬µ«ÊÇÈç¹û²»Âú×ãºÏÊʵÄÔ¼¶¨£¬ÄÇô¿ÉÄܳöÏÖ´íÎó¡£
3.Óë1Ò»Ñù£¬
Èç¹ûÊÇÇ¿ÖÆÐÔËø£¬ÊDz»ÄܶÁÈ¡µÄ£¬Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËø£¬Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨£¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£
ÎÒµÄÀí½â£¬»¶Ó­ÌÖÂÛ

ÔÚ06-11-23£¬»ÆÁˆ <huangchonggnu at gmail.com> дµÀ£º
>
> 1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿
>
>
> 2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿
>
> 3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese at lists.python.cn
> Subscribe: send subscribe to python-chinese-request at lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request at lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
devdoer
devdoer at gmail.com
http://project.mytianwang.cn/cgi-bin/blog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/4a4707b0/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 12:44

=?GB2312?B?u8bBiA==?= huangchonggnu在gmail.com
星期四 十一月 23 12:44:27 HKT 2006

Ç¿ÖÆÐÔËøÖ¸µÄÊÇÄÄЩËøÄØ£¬ÓоßÌåµÄÓ÷¨Õ¹Ê¾Ò»ÏÂÂð

ÔÚ06-11-23£¬bird devdoer <devdoer在gmail.com> дµÀ£º
>
> 1.Õâ¸öÊÇÓÉÄã×Ô¼º¾ö¶¨µÄ¡£Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËøµÄ»°£¬¼´Ê¹Óнø³Ì¼ÓÁËÅÅËûËø£¬ÆäËû½ø³ÌÈÔÈ»ÊÇ¿ÉÒÔдµÄ¡£
> 2.Äã¸ù¾ÝÄãµÄÐèҪѡÔñºÏÊʵÄËø¡£Ã»ÓÐÏÞ¶¨Ò»¶¨ÓÃʲôËø£¬µ«ÊÇÈç¹û²»Âú×ãºÏÊʵÄÔ¼¶¨£¬ÄÇô¿ÉÄܳöÏÖ´íÎó¡£
> 3.Óë1Ò»Ñù£¬
> Èç¹ûÊÇÇ¿ÖÆÐÔËø£¬ÊDz»ÄܶÁÈ¡µÄ£¬Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËø£¬Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨£¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£
> ÎÒµÄÀí½â£¬»¶Ó­ÌÖÂÛ
>
> ÔÚ06-11-23£¬»ÆÁˆ <huangchonggnu在gmail.com> дµÀ£º
> >
> > 1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿
> >
> > 2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿
> >
> >
> > 3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
>
> --
> devdoer
> devdoer在gmail.com
> http://project.mytianwang.cn/cgi-bin/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to   python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/6ad1c5c9/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 12:53

=?GB2312?B?u8bBiA==?= huangchonggnu在gmail.com
星期四 十一月 23 12:53:29 HKT 2006

ÄãµÄ»Ø´ð£¬ÎÒÕâÑùÀí½â£¬Èç¹ûÓù²ÏíËø±£Ö¤Îļþͬ²½²Ù×÷Ò»Ö£¬
µ±½ø³ÌAдÎļþʱ£º
  fd = open(filename, 'w')
  fcntl.flock(fd, LOCK_SH)
  .....
½ø³ÌBËæºó½øÈ룬ֻÊǶÁÎļþ£º
   fd = open(filename, 'r')
   fcntl.flock(fd, LOCK_SH)
   .....
¾Í¿ÉÒÔ¶Áµ½ÄÚÈÝÁË£¬µ«ÈôҪдÎļþ¾ÍÒªµÈ´ý

µ«Èç¹û¸ÄÓÃÅÅËüËø¾ÍÁ¬¶ÁÎļþÒ²²»ÐÐÁË

ÔÚ06-11-23£¬limodou <limodou在gmail.com> дµÀ£º
>
> On 11/23/06, »ÆÁˆ <huangchonggnu在gmail.com> wrote:
> > 1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿
> >
> >
> 2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿
> >
> > 3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
> >
> >
> ÅÅËüËøÓ¦¸ÃÊDZðÈ˲»ÄܶÁÒ²²»ÄÜд¡£¶ø¹²ÏíËøÊDZðÈË¿ÉÒÔ¶Á£¬²»ÄÜд¡£Èç¹û·ÇËüËø¼ÓÉϺó£¬ÁíÒ»¸ö½ø³ÌÓ¦¸ÃÊǵȴý°É¡£ÖÁÓÚÓÐûÓг¬Ê±ÎÒûÓÐ̫עÒâ¡£
>
> --
> I like python!
> UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
> My Blog: http://www.donews.net/limodou
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/51bd94dc/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 12:55

limodou limodou在gmail.com
星期四 十一月 23 12:55:18 HKT 2006

On 11/23/06, »ÆÁˆ <huangchonggnu在gmail.com> wrote:
> ÄãµÄ»Ø´ð£¬ÎÒÕâÑùÀí½â£¬Èç¹ûÓù²ÏíËø±£Ö¤Îļþͬ²½²Ù×÷Ò»Ö£¬
> µ±½ø³ÌAдÎļþʱ£º
>   fd = open(filename, 'w')
>   fcntl.flock(fd, LOCK_SH)
>   .....
> ½ø³ÌBËæºó½øÈ룬ֻÊǶÁÎļþ£º
>    fd = open(filename, 'r')
>    fcntl.flock(fd, LOCK_SH)
>    .....
> ¾Í¿ÉÒÔ¶Áµ½ÄÚÈÝÁË£¬µ«ÈôҪдÎļþ¾ÍÒªµÈ´ý
>
> µ«Èç¹û¸ÄÓÃÅÅËüËø¾ÍÁ¬¶ÁÎļþÒ²²»ÐÐÁË
>
ÎÒÊÇÕâÑùÀí½âµÄ¡£

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 13:09

=?GB2312?B?u8bBiA==?= huangchonggnu在gmail.com
星期四 十一月 23 13:09:26 HKT 2006

"Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨£¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£"quote

µ±½ø³ÌAдÎļþʱ, ×ñÑ­¿ªÎļþ£¬¼ÓËø£¬²Ù×÷¶Áд£¬½âËø£¬¹Ø±ÕÎļþµÄ²½Öè
fd = open(filename, 'w')
fcntl.flock(fd, LOCK_SH) .....
½ø³ÌBËæºó½øÈ룬ֻÊǶÁÎļþ, ûÓÐ×ñÑ­ÒÔÉϲ½Ö裺
fd = open(filename, 'r')
.....
fd.close()
B¿ÉÒÔ¶Á,ÊÇÕâÑùÂð?


ÔÚ06-11-23£¬bird devdoer <devdoer在gmail.com> дµÀ£º
>
> 1.Õâ¸öÊÇÓÉÄã×Ô¼º¾ö¶¨µÄ¡£Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËøµÄ»°£¬¼´Ê¹Óнø³Ì¼ÓÁËÅÅËûËø£¬ÆäËû½ø³ÌÈÔÈ»ÊÇ¿ÉÒÔдµÄ¡£
> 2.Äã¸ù¾ÝÄãµÄÐèҪѡÔñºÏÊʵÄËø¡£Ã»ÓÐÏÞ¶¨Ò»¶¨ÓÃʲôËø£¬µ«ÊÇÈç¹û²»Âú×ãºÏÊʵÄÔ¼¶¨£¬ÄÇô¿ÉÄܳöÏÖ´íÎó¡£
> 3.Óë1Ò»Ñù£¬
> Èç¹ûÊÇÇ¿ÖÆÐÔËø£¬ÊDz»ÄܶÁÈ¡µÄ£¬Èç¹ûÊÇ·ÇÇ¿ÖÆÐÔËø£¬Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨£¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£
> ÎÒµÄÀí½â£¬»¶Ó­ÌÖÂÛ
>
> ÔÚ06-11-23£¬»ÆÁˆ <huangchonggnu在gmail.com> дµÀ£º
> >
> > 1£¬ ÎÒÃÇÔÚ¶ÔÎļþ½øÐÐ'w'²Ù×÷ʱ£¬Îª·ÀÖ¹½ø³Ì¼ä³åÍ»£¬ÊÇ·ñÖ»ÄÜÓÃÅÅËüËøLOCK_EX£¿
> >
> > 2£¬Èç¹ûµÚÒ»¸öÎÊÌâµÄ»Ø´ðÊǿ϶¨µÄ£¬LOCK_SHÖ»ÄÜÓÃÔÚ¶ÁÎļþʱÁË£¿µ±¶ÔÎļþ½øÐÐ'r'²Ù×÷£¬ÓÐLOCK_SHµÄ½ø³Ì¾ÍÓжÁȨÏÞ£¬Ã»ÓÐLOCK_SHµÄ½ø³Ì¾ÍûÓжÁȨÏÞ£¬ÊÇÕâÑùÂð£¿
> >
> >
> > 3£¬ µ±½ø³ÌA¶ÔÎļþ½øÐÐд²Ù×÷ʱʹÓÃLOCK_EX£¬Í¬Ê±½ø³ÌB¶ÔÎļþ½øÐжÁ²Ù×÷£¬ÊÇ·ñÄܶÁµ½ÄÚÈÝÄØ£¿
> >
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chinese在lists.python.cn
> > Subscribe: send subscribe to python-chinese-request在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> >
>
>
>
> --
> devdoer
> devdoer在gmail.com
> http://project.mytianwang.cn/cgi-bin/blog
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/d849aa99/attachment-0001.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 13:11

limodou limodou在gmail.com
星期四 十一月 23 13:11:51 HKT 2006

On 11/23/06, »ÆÁˆ <huangchonggnu在gmail.com> wrote:
> "Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨
> £¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£"quote
>
> µ±½ø³ÌAдÎļþʱ, ×ñÑ­¿ªÎļþ£¬¼ÓËø£¬²Ù×÷¶Áд£¬½âËø£¬¹Ø±ÕÎļþµÄ²½Öè
> fd = open(filename, 'w')
> fcntl.flock(fd, LOCK_SH) .....
> ½ø³ÌBËæºó½øÈ룬ֻÊǶÁÎļþ, ûÓÐ×ñÑ­ ÒÔÉϲ½Ö裺
> fd = open(filename, 'r')
> .....
> fd.close()
> B¿ÉÒÔ¶Á,ÊÇÕâÑùÂð?
>
ÊDz»ÊÇÕâÑù£¬ÎÒ½¨ÒéÄã×öһϲâÊԾͿÉÒÔÁË¡£

-- 
I like python!
UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
My Blog: http://www.donews.net/limodou

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2006年11月23日 星期四 16:20

=?GB2312?B?u8bBiA==?= huangchonggnu在gmail.com
星期四 十一月 23 16:20:45 HKT 2006

¿ÉÒÔ¶Á£¬Õâʱºò¶ÁµÄ¿ÉÄÜÊDz»ÍêÕûµÄÎļþÄÚÈÝ¡£

ÔÚ06-11-23£¬limodou <limodou在gmail.com> дµÀ£º
>
> On 11/23/06, »ÆÁˆ <huangchonggnu在gmail.com> wrote:
> > "Èç¹û½ø³ÌBûÓнøÐÐËø²âÊÔ£¬Ò²¾ÍÊÇ˵Ëü²»×ñÊØЭ×÷½ø³Ì¼äµÄÔ¼¶¨
> > £¬ÊÇ¿ÉÒÔ¶ÁµÄ£¬µ«ÊÇ¿ÉÄÜ»á³öÏÖÂß¼­ÉϵIJ»Ò»ÖÂÐÔ¡£"quote
> >
> > µ±½ø³ÌAдÎļþʱ, ×ñÑ­¿ªÎļþ£¬¼ÓËø£¬²Ù×÷¶Áд£¬½âËø£¬¹Ø±ÕÎļþµÄ²½Öè
> > fd = open(filename, 'w')
> > fcntl.flock(fd, LOCK_SH) .....
> > ½ø³ÌBËæºó½øÈ룬ֻÊǶÁÎļþ, ûÓÐ×ñÑ­ ÒÔÉϲ½Ö裺
> > fd = open(filename, 'r')
> > .....
> > fd.close()
> > B¿ÉÒÔ¶Á,ÊÇÕâÑùÂð?
> >
> ÊDz»ÊÇÕâÑù£¬ÎÒ½¨ÒéÄã×öһϲâÊԾͿÉÒÔÁË¡£
>
> --
> I like python!
> UliPad <>: http://wiki.woodpecker.org.cn/moin/UliPad
> My Blog: http://www.donews.net/limodou
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20061123/93a8c7fe/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号