2006年09月12日 星期二 15:06
§+a¢zr³+)jØg{ij»@tÌ-«miÈfz{pjË®æÛyÕ.m§ÿéÊØhÉÿ¦*^®f¢úr¶'r§zÇ¿jÛZrÛ?ÛM:ÓÝvÿ®u§øoöµ§!éíÙ¥
2006年09月12日 星期二 16:30
各位帮帮忙,谢谢了 ----- Original Message ----- From: chenwei To: python-chinese at lists.python.cn Sent: Tuesday, September 12, 2006 3:06 PM Subject: [python-chinese] python环境的问题 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 我用sys.path可以临时添加,但是重启解释器就失效了。。。 ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20060912/e5a67a14/attachment.html
2006年09月12日 星期二 16:37
ENVIRONMENT VARIABLES PYTHONHOME Change the location of the standard Python libraries. By default, the libraries are searched in ${prefix}/lib/pythonand ${exec_prefix}/lib/python , where ${prefix} and ${exec_prefix} are installation-dependent directories, both defaulting to /usr/local. When $PYTHONHOME is set to a single directory, its value replaces both ${prefix} and ${exec_prefix}. To specify different values for these, set $PYTHONHOME to ${pre- fix}:${exec_prefix}. PYTHONPATH Augments the default search path for module files. The format is the same as the shell's $PATH: one or more directory path- names separated by colons. Non-existent directories are silently ignored. The default search path is installation dependent, but generally begins with ${prefix}/lib/python (see PYTHONHOME above). The default search path is always appended to $PYTHONPATH. If a script argument is given, the directory containing the script is inserted in the path in front fix}:${exec_prefix}. PYTHONPATH Augments the default search path for module files. The format is the same as the shell's $PATH: one or more directory path- names separated by colons. Non-existent directories are silently ignored. The default search path is installation dependent, but generally begins with ${prefix}/lib/python (see PYTHONHOME above). The default search path is always appended to $PYTHONPATH. If a script argument is given, the directory containing the script is inserted in the path in front of $PYTHONPATH. The search path can be manipulated from within a Python program as the variable sys.path . PYTHONSTARTUP If this is the name of a readable file, the Python commands in that file are executed before the first prompt is displayed in interactive mode. The file is executed in the same name space where interactive commands are executed so that objects defined or imported in it can be used without qualification in the interactive session. You can also change the prompts sys.ps1 and sys.ps2 in this file. PYTHONY2K Set this to a non-empty string to cause the time module to require dates specified as strings to include 4-digit years, otherwise 2-digit years are converted based on rules described in the time module documentation. PYTHONOPTIMIZE If this is set to a non-empty string it is equivalent to speci- fying the -O option. If set to an integer, it is equivalent to specifying -O multiple times. PYTHONDEBUG If this is set to a non-empty string it is equivalent to speci- fying the -d option. If set to an integer, it is equivalent to specifying -d multiple times. PYTHONINSPECT If this is set to a non-empty string it is equivalent to speci- fying the -i option. PYTHONUNBUFFERED If this is set to a non-empty string it is equivalent to speci- fying the -u option. PYTHONVERBOSE If this is set to a non-empty string it is equivalent to speci- fying the -v option. If set to an integer, it is equivalent to specifying -v multiple times. > 各位帮帮忙,谢谢了 > ----- Original Message ----- > From: chenwei > To: python-chinese在lists.python.cn > Sent: Tuesday, September 12, 2006 3:06 PM > Subject: [python-chinese] python环境的问题 > > > 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 > > 我用sys.path可以临时添加,但是重启解释器就失效了。。。 > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > 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 -- zerocp <zero在rsslife.net>
2006年09月12日 星期二 16:46
大家好; 我想匹配一个字符串,比如“TEST(323233)”,想提取括号中的数值,正则表 达式写为 re.compile(r'\b\([0-9][0-9][0-9][0-9][0-9][0-9]\),但是没办法匹 配,而使用RegexBuilder这个软件时就没有问题,请问我哪个地方错了,多谢了。
2006年09月12日 星期二 17:03
On 9/12/06, 邓作霖 <pse-dengzl在pegasus.tj.cn> wrote: > 大家好; > > 我想匹配一个字符串,比如"TEST(323233)",想提取括号中的数值,正则表 > 达式写为 re.compile(r'\b\([0-9][0-9][0-9][0-9][0-9][0-9]\),但是没办法匹 > 配,而使用RegexBuilder这个软件时就没有问题,请问我哪个地方错了,多谢了。 r'\d+' -- I like python! My Blog: http://www.donews.net/limodou UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad UliPad Maillist: http://groups.google.com/group/ulipad
2006年09月12日 星期二 17:08
re.match(r'\D+(\d+)', "TEST(323233)").group(1) -- zerocp <zero在rsslife.net>
2006年09月12日 星期二 17:11
On 9/12/06, zerocp <zero在rsslife.net> wrote: > re.match(r'\D+(\d+)', "TEST(323233)").group(1) 用search()就简单了。 >>> import re >>> re.search(r'\d+', 'TEST(323233)').group() '323233' -- I like python! My Blog: http://www.donews.net/limodou UliPad Site: http://wiki.woodpecker.org.cn/moin/UliPad UliPad Maillist: http://groups.google.com/group/ulipad
2006年09月12日 星期二 17:26
export PYTHONPATH="your path" 在06-9-12,chenwei <chenwei在sobey.com> 写道: > > 各位帮帮忙,谢谢了 > ----- Original Message ----- > *From:* chenwei <chenwei在sobey.com> > *To:* python-chinese在lists.python.cn > *Sent:* Tuesday, September 12, 2006 3:06 PM > *Subject:* [python-chinese] python环境的问题 > > 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 > > 我用sys.path可以临时添加,但是重启解释器就失效了。。。 > > ------------------------------ > _______________________________________________ > 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 > > _______________________________________________ > 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 > -- Best Regards, Jetrix Chan ---- jetrixc在gmail.com -------------- 下一部分 -------------- 一个HTML附件被移除... URL: http://python.cn/pipermail/python-chinese/attachments/20060912/91e97612/attachment.htm
2006年09月12日 星期二 17:31
忘了说,我用的pythonwin ----- Original Message ----- From: chenwei To: python-chinese at lists.python.cn Sent: Tuesday, September 12, 2006 4:30 PM Subject: Re: [python-chinese] python环境的问题 各位帮帮忙,谢谢了 ----- Original Message ----- From: chenwei To: python-chinese at lists.python.cn Sent: Tuesday, September 12, 2006 3:06 PM Subject: [python-chinese] python环境的问题 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 我用sys.path可以临时添加,但是重启解释器就失效了。。。 ---------------------------------------------------------------------------- _______________________________________________ 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 ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20060912/67f3a918/attachment.html
2006年09月12日 星期二 18:14
谢谢回答。 不过export在python解释器里面报未定义 ----- Original Message ----- From: jetrix chan To: python-chinese at lists.python.cn Sent: Tuesday, September 12, 2006 5:26 PM Subject: Re: [python-chinese] python环境的问题 export PYTHONPATH="your path" 在06-9-12,chenwei <chenwei at sobey.com> 写道: 各位帮帮忙,谢谢了 ----- Original Message ----- From: chenwei To: python-chinese at lists.python.cn Sent: Tuesday, September 12, 2006 3:06 PM Subject: [python-chinese] python环境的问题 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 我用sys.path可以临时添加,但是重启解释器就失效了。。。 ---------------------------------------------------------------------------- _______________________________________________ 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 _______________________________________________ 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 -- Best Regards, Jetrix Chan ---- jetrixc at gmail.com ------------------------------------------------------------------------------ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://python.cn/pipermail/python-chinese/attachments/20060912/b0210fdf/attachment.html
2006年09月12日 星期二 18:36
> 谢谢回答。 > 不过export在python解释器里面报未定义 1. export 是 bash/sh 的一个内置命令,不是python的builtins 2. windows下环境变量不会设? 3. 给你贴了一份完整的 python 用得到的 environment variables,你没有看? btw: 英文不好看不懂不是理由 > ----- Original Message ----- > From: jetrix chan > To: python-chinese在lists.python.cn > Sent: Tuesday, September 12, 2006 5:26 PM > Subject: Re: [python-chinese] python环境的问题 > > > export PYTHONPATH="your path" > > > 在06-9-12,chenwei <chenwei在sobey.com> 写道: > 各位帮帮忙,谢谢了 > ----- Original Message ----- > From: chenwei > To: python-chinese在lists.python.cn > Sent: Tuesday, September 12, 2006 3:06 PM > Subject: [python-chinese] python环境的问题 > > > 请问python的环境路径应该怎么设置?指明需要包含的py库的位置。 > > 我用sys.path可以临时添加,但是重启解释器就失效了。。。 > > > ---------------------------------------------------------------------------- > _______________________________________________ > 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 > > > _______________________________________________ > 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 > > > > > -- > Best Regards, > Jetrix Chan > ---- > jetrixc在gmail.com > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > 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 -- zerocp <zero在rsslife.net>
2006年09月13日 星期三 09:01
我明白了,非常感谢大家。 limodou wrote: > On 9/12/06, zerocp <zero at rsslife.net> wrote: > >> re.match(r'\D+(\d+)', "TEST(323233)").group(1) >> > > 用search()就简单了。 > > >>> import re > >>> re.search(r'\d+', 'TEST(323233)').group() > '323233' > >
Zeuux © 2025
京ICP备05028076号