Python论坛  - 讨论区

标题:[python-chinese] [啄木鸟社区]2005年2月19日周例会

2005年02月18日 星期五 14:20

limodou limodou at gmail.com
Fri Feb 18 14:20:16 HKT 2005

啄木鸟社区[http://wiki.woodpecker.org.cn/]周例会在开过几次之后,由于大家都很忙一直就没有再继续。随着ZoomQuiet的不懈努力,加上本人的一点点支持,终于计划在本周六再次举行。主要的目的我想应该是大家相互之间的交流,特别是今后有关社区建设、项目开展等的一起想法的讨论,我想应该是对于社区今后的发展会有帮助。

关于周例会的详情参见 http://wiki.woodpecker.org.cn/moin.cgi/WoodpeckerClass/2005-02-19

我们希望本次例会可以开好,更希望有更多关心啄木鸟社区的成长和关于Python的朋友参加。

时间大概定于周六晚上七点钟,语音交流主要可能通过skype(因此需要申请ID号,已经申请到的已由ZoomQuiet写在了上面的链接中),同时UC会作为语音转播的工具。因此大家最好也开着UC,因为skype同时最多允许5个人同时发言。

如果有什么变化将在 Python.cn 中进行通知。

-- 
I like python! 
My Blog: http://www.donews.net/limodou
New Maillist: http://groups-beta.google.com/group/python-cn

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

2005年02月18日 星期五 14:24

aidiseng aidiseng100 at 163.com
Fri Feb 18 14:24:46 HKT 2005

limodou,您好!

	thanks  以后多多帮助!

======= 2005-02-12 15:23:00 您在来信中写道:=======

>you are right. If you have any question, just send an email to this
>email list.
>
>韩非 wrote:
>> python-chinese,您好!
>>           
>>   大家好 ,我头一次用这个呀 不明白  这个不和新闻组一样 也和BBS不一样
>> 它就是靠收发EMAIL来解决问题吗?
>>        谢谢
>> 	
>> 
>>         致
>> 礼!
>>  				
>> 
>>         韩非
>>         aidiseng100 at 163.com
>>           2005-02-11
>> 
>> 
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> 
>
>-- 
>I love python!
>My Blog: http://www.donews.net/limodou
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        aidiseng
        aidiseng100 at 163.com
          2005-02-18






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

2005年02月18日 星期五 14:25

aidiseng aidiseng100 at 163.com
Fri Feb 18 14:25:18 HKT 2005

limodou,您好!

	下雨  ?
你是哪的呀 我这下雪呀 哈

======= 2005-02-12 15:04:00 您在来信中写道:=======

>python已经提供了这样的标准库,ConfigParser可以参考。
>
>SeSe wrote:
>> 大年初一下雨,灭的出去,就用Python写了这么个东西,
>> 其实我需要的是C++的ini parser库,libini看起来不
>> 爽,所以自己用Python写了一个,然后用C++来调用,
>> 因此里面有些函数很奇怪,比如数据类型转换。。那是
>> 给C++ code用的,Python自己不用。C++代码稍后贴
>> 
>> Licenced under BSD Licence,嗯嗯,新年rp ++
>> 
>> 大家新年好!
>> 
>> 
>> 
>> # Copyright (c) 2005 Huacheng Ke <sese at 263.net>
>> # All rights reserved.
>> 
>> # Redistribution and use in source and binary forms, with or without
>> # modification, are permitted provided that the following conditions
>> # are met:
>> # 1. Redistributions of source code must retain the above copyright
>> # notice, this list of conditions and the following disclaimer.
>> # 2. Redistributions in binary form must reproduce the above copyright
>> # notice, this list of conditions and the following disclaimer in the
>> # documentation and/or other materials provided with the distribution.
>> # 3. The name of the author may not be used to endorse or promote products
>> # derived from this software without specific prior written permission.
>> #
>> # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
>> # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>> # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
>> # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
>> # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
>> # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
>> # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
>> # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
>> # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
>> # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
>> 
>> import string
>> import re
>> import types
>> 
>> INI_BOOL = 1
>> INI_INTEGER = 2
>> INI_DOUBLE = 3
>> INI_STRING = 4
>> 
>> INI_EXIST = 0
>> INI_NO_SECTION = 1
>> INI_NO_KEY = 2
>> 
>> class INI_File:
>> def __init__(self):
>> self.__buffer = {}
>> 
>> def test_exist(self, section, key = ''):
>> if not self.__buffer.has_key(section):
>> return INI_NO_SECTION
>> elif key == '':
>> return INI_EXIST
>> elif self.__buffer[section].has_key(key):
>> return INI_EXIST
>> else:
>> return INI_NO_KEY
>> 
>> def get_type(self, str):
>> str = str.strip()
>> assert(self.count_element(str) == 1)
>> try:
>> string.atoi(str)
>> except ValueError:
>> try:
>> string.atof(str)
>> except ValueError:
>> return INI_STRING
>> return INI_DOUBLE
>> int_value = string.atoi(str)
>> if int_value == 1 or int_value == 0:
>> return INI_BOOL
>> else:
>> return INI_INTEGER
>> 
>> def count_element(self, str):
>> str = str.strip()
>> segments = string.split(str, ',')
>> return len(segments)
>> 
>> def get_sub_string(self, str, index):
>> str = str.strip()
>> assert(self.count_element(str) > 1)
>> segments = string.split(str, ',')
>> assert(index < len(segments))
>> return segments[index]
>> 
>> def to_int(self, str):
>> assert(self.get_type(str) <= INI_INTEGER)
>> return string.atoi(str)
>> 
>> def to_bool(self, str):
>> assert(self.get_type(str) == INI_BOOL)
>> return string.atoi(str)
>> 
>> def to_double(self, str):
>> assert(self.get_type(str) <= INI_DOUBLE)
>> return string.atof(str)
>> 
>> def retrieve_string(self, section, key):
>> assert(self.test_exist(section, key) == INI_EXIST)
>> return self.__buffer[section][key]
>> 
>> def start_section(self, section):
>> # section == '' indicates the global section
>> self.__buffer[section] = {}
>> 
>> def insert_item(self, section, key, value):
>> self.__buffer[section][key] = value
>> def clear(self):
>> self.__buffer = {}
>> def print_buffer(self):
>> print self.__buffer
>> 
>> class INI_Reader:
>> def __init__(self):
>> self.verbose = False
>> def toggle_verbose(self, val):
>> self.verbose = val
>> def read(self, filename):
>> try:
>> f = open(filename)
>> lines = f.readlines()
>> lines = [line.rstrip('\n') for line in lines]
>> lines = [line.strip() for line in lines]
>> f.close()
>> except IOError:
>> lines = []
>> return None
>> print "PyINI: Parsing INI file : " + filename
>> result = INI_File()
>> section_pattern = re.compile('\[\w*\]')
>> section = ''
>> result.start_section('')
>> for line in lines:
>> if line == '':
>> continue
>> match_result = section_pattern.match(line)
>> if match_result:
>> # this line is a section tag
>> section = match_result.group(0).strip('\[\]')
>> result.start_section(section)
>> else:
>> segments = string.split(line, ';')
>> line = segments[0].strip()
>> if line != '':
>> segments = string.split(line, "=")
>> segments = [ segment.strip() for segment in segments]
>> if len(segments) == 2:
>> key = segments[0]
>> value = segments[1]
>> if self.verbose:
>> print " [" + section + "] : <" + key + '> = <' + value + '>'
>> result.insert_item(section, key, value)
>> else:
>> print "PyINI: Invalid line - " + segments[0]
>> print "Powered by PyINI, http://pyini.sourceforge.net/"
>> return result
>> 
>> if __name__ == "__main__":
>> reader = INI_Reader()
>> result = reader.read("1.ini")
>> result.print_buffer()
>> print result.test_exist('MAIN','e')
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>>
>>> 
>>>
>> 
>> 
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> 
>
>-- 
>I love python!
>My Blog: http://www.donews.net/limodou
>_______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        aidiseng
        aidiseng100 at 163.com
          2005-02-18






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

2005年02月19日 星期六 18:07

Qiangning Hong hongqn at gmail.com
Sat Feb 19 18:07:54 HKT 2005

没有麦克风,没有UC...
我还是等着下录音吧...  :(


On Fri, 18 Feb 2005 14:20:16 +0800, limodou <limodou at gmail.com> wrote:
> 啄木鸟社区[http://wiki.woodpecker.org.cn/]周例会在开过几次之后,由于大家都很忙一直就没有再继续。随着ZoomQuiet的不懈努力,加上本人的一点点支持,终于计划在本周六再次举行。主要的目的我想应该是大家相互之间的交流,特别是今后有关社区建设、项目开展等的一起想法的讨论,我想应该是对于社区今后的发展会有帮助。
> 
> 关于周例会的详情参见 http://wiki.woodpecker.org.cn/moin.cgi/WoodpeckerClass/2005-02-19
> 
> 我们希望本次例会可以开好,更希望有更多关心啄木鸟社区的成长和关于Python的朋友参加。
> 
> 时间大概定于周六晚上七点钟,语音交流主要可能通过skype(因此需要申请ID号,已经申请到的已由ZoomQuiet写在了上面的链接中),同时UC会作为语音转播的工具。因此大家最好也开着UC,因为skype同时最多允许5个人同时发言。
> 
> 如果有什么变化将在 Python.cn 中进行通知。
> 
> --
> I like python!
> My Blog: http://www.donews.net/limodou
> New Maillist: http://groups-beta.google.com/group/python-cn
> 
> _______________________________________________
> python-chinese list
> python-chinese at lists.python.cn
> http://python.cn/mailman/listinfo/python-chinese
> 
> 
> 


-- 
Excellent FOSS (Free/Open Source Software):

Get Firefox!
http://www.spreadfirefox.com/?q=affiliates&id=67907&t=1

Reclaim Your Inbox!
http://www.spreadfirefox.com/?q=affiliates&id=67907&t=183

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号