2004年04月02日 星期五 09:30
我下面的程序,并沒有達到我想要的效果,我想把“C:\\del”連目錄DEL一起刪除,包括DEL下面所有的目錄和文件(各種類型),請教各位大哥要如何才能實現?TKS! # -*- coding: utf-8 -*- # "強制删除文件和目录" import os def rmdir_re(dir): for name in os.listdir(dir): full_name = os.path.join(dir, name) print full_name if not os.access(full_name, os.W_OK): os.chmod(full_name, 0600) if os.path.isdir(full_name): rmdir_re(full_name) else: os.remove(full_name) os.rmdir(dir) if __name__== "__main__" : d="c:\\del" rmdir_re(d) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040402/af758360/attachment.html
2004年04月02日 星期五 09:48
你是指Java写的包?请看一看jython.bat(windows下)里面的CLASS_PATH是如何设置的。 ------- Explicit is better than implicit ... -----Original Message----- From: jason [mailto:jianxin_yang at 126.com] Sent: 2004年4月1日 10:23 To: python-chinese at lists.python.cn Subject: [python-chinese] 请问如何让jython找到自己写的程序包? 各位, 请问如何让jython找到自己写的程序包? 设了CLASS_PATH不行,把jar文件放到jython的/lib目录也不行 -- jason <jianxin_yang at 126.com>
2004年04月02日 星期五 09:56
ÄãÊÇÒªÁ·Ï°±à³Ì£¬»¹ÊÇÑ°ÕÒ½â¾ö·½°¸? Èç¹ûÊǺóÕßÍƼöʹÓÃshutilÖеÄrmtree :) ------- Explicit is better than implicit ... -----Original Message----- From: ÍôÖ¾¥\(cn\) [mailto:paul_wang at lmcn.com] Sent: 2004Äê4ÔÂ2ÈÕ 9:30 To: python-chinese at lists.python.cn Subject: [python-chinese] DEL FILE ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! # -*- coding: utf-8 -*- # "ÖÆɾ³ýÎļþºÍĿ¼" import os def rmdir_re(dir): for name in os.listdir(dir): full_name = os.path.join(dir, name) print full_name if not os.access(full_name, os.W_OK): os.chmod(full_name, 0600) if os.path.isdir(full_name): rmdir_re(full_name) else: os.remove(full_name) os.rmdir(dir) if __name__== "__main__" : d="c:\\del" rmdir_re(d) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040402/b4588a74/attachment.htm
2004年04月02日 星期五 10:10
Hello ÍôÖ¾¥cn, Ç°ºóÈý·â£¬ÔÚ϶¼ÊÕµ½ÁË£¡ µÃµÈÓÐʱ¼äÀ´´¦ÀíÄÄ£¡ Ö»ÄÜÏÈÌáʾ¶þµã: 1. os.rmdir ÓÐûÓÐÓÐ -R µÝ¹éÊôÐÔ£¿ 2. µÝ¹éÊôÐÔÔÚ win32 ÏÂÓÐÓ÷ñ£¿ 3. ¿ÉÒÔʹÓÃÉú³É´¦ÀíÃüÁîÁбíµÄ·½Ê½À´Ò»´ÎÐÔ̽²â³öËùÓÐϼ¶Ä¿Â¼ºó£¬Ò»Ò»É¾³ý£¿ ... === [ 9:30 ; 04-04-02 ] you wrote: ? ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! ? # -*- coding: utf-8 -*- ? # "ÖÆɾ³ýÎļþºÍĿ¼" ? import os ? def rmdir_re(dir): ? for name in os.listdir(dir): ? full_name = os.path.join(dir, name) ? print full_name ? if not os.access(full_name, os.W_OK): ? os.chmod(full_name, 0600) ? if os.path.isdir(full_name): ? rmdir_re(full_name) ? else: ? os.remove(full_name) ? os.rmdir(dir) ? if __name__== "__main__" : ? d="c:\\del" ? rmdir_re(d) === === === === === === === === === === -- Best regards, Zoom.Quiet /=======================================\ ]Time is unimportant, only life important![ \=======================================/
2004年04月02日 星期五 10:19
Zoom.QuietÐÖ: ÄãºÃ£¬¦²»Æð£¬ÊÇÎÒÌ«Ðļ±ÁË£¬ÎÒÒÔÇ°°l½o<python-chinese at lists.python.cn>µÄ rºò¶¼þÔÙ÷Ò»·Ý½oÎÒ£¬ß@´ÎÎÒ°lÈý´ÎÒ»üc·´ªÒ²]ÓУ¬ÎÒÒÔé³öÁËʲôî}£¬ËùÒÔþ ßB°l!ÕæÊǦ²»Æð! ÖxÖxÄã³érég£¬½oÎÒ½â´ðî}! ----- Original Message ----- From: "Zoom.Quiet" <zoomq at infopro.cn> To: "ÍôÖ¾¥cn" <paul_wang at lmcn.com> Cc: <python-chinese at lists.python.cn> Sent: Friday, April 02, 2004 10:10 AM Subject: Re: [python-chinese] DEL FILE > Hello ÍôÖ¾¥cn, > > Ç°ºóÈý·â£¬ÔÚ϶¼ÊÕµ½ÁË£¡ > µÃµÈÓÐʱ¼äÀ´´¦ÀíÄÄ£¡ > > Ö»ÄÜÏÈÌáʾ¶þµã: > > 1. os.rmdir ÓÐûÓÐÓÐ -R µÝ¹éÊôÐÔ£¿ > 2. µÝ¹éÊôÐÔÔÚ win32 ÏÂÓÐÓ÷ñ£¿ > 3. ¿ÉÒÔʹÓÃÉú³É´¦ÀíÃüÁîÁбíµÄ·½Ê½À´Ò»´ÎÐÔ̽²â³öËùÓÐϼ¶Ä¿Â¼ºó£¬Ò»Ò»É¾³ý£¿ > ... > > === [ 9:30 ; 04-04-02 ] you wrote: > > ? ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh ³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! > ? # -*- coding: utf-8 -*- > ? # "ÖÆɾ³ýÎļþºÍĿ¼" > > ? import os > ? def rmdir_re(dir): > ? for name in os.listdir(dir): > ? full_name = os.path.join(dir, name) > ? print full_name > ? if not os.access(full_name, os.W_OK): > ? os.chmod(full_name, 0600) > ? if os.path.isdir(full_name): > ? rmdir_re(full_name) > ? else: > ? os.remove(full_name) > ? os.rmdir(dir) > ? if __name__== "__main__" : > ? d="c:\\del" > ? rmdir_re(d) > > > === === === === === === === === === === > > -- > Best regards, > Zoom.Quiet > > /=======================================\ > ]Time is unimportant, only life important![ > \=======================================/ >
2004年04月02日 星期五 11:56
>=D3=D0=D2=BB=82=80=BA=DC=D6=D8=D2=AA=B5=C4=86=96=EE}=A3=AC=D7=C9=D4=83=D2= =BB=CF=C2=B4=F3=BC=D2=A3=AC=CE=D2=ACF=D4=DA=8C=A6PYTHON=B5=C4=BB=F9=B5A=C1= =CB=BD=E2=C1=CB=A3=AC >=D2=AA=C8=E7=BA=CE=CC=E1=B8=DF=C4=D8=A3=AC=CA=C7=8F=C4=B8=F7=82=80=C4=A3= =89K=8CW=C6=F0 =BA=C7=BA=C7=A3=AC=CE=D2=BD=A8=D2=E9=D7=EE=BA=C3=B2=BB=D2=AA=B0=B4=D5=D5=D4= =DA=D1=A7=D0=A3=D1=A7=CF=B0=BD=CC=BF=C6=CA=E9=B5=C4=B7=BD=CA=BD=A1=A3=D7=D4= =BC=BA=D5=D2=D2=BB=D0=A9=CF=EE=C4=BF=C0=B4=D7=F6=D2=AA=BA=C3=B5=C3=B6=E0=A1= =A3 >=C2=EF!(=CE=D2=8C=A6=C4=C7=D0=A9=C4=A3=89K=B2=BB=CA=EC)=A3=AC=D5=88=DF^=81= =ED=C8=CB=D6=B8=FCc=D2=BB=CF=C2=D0=A1=B5=DC!
2004年04月02日 星期五 11:58
MessageÎÒÊÇÏë¾ÁһϾ³Ì£¬Ïë¬Fß@Ä¿µÄµ«ÓÖ²»ÊǺÜÁ˽⣬²»ÖªÔÔõô½âQ£¿ ÎÒ¦SHUTIL²»Á˽⣬²»ÖªÒªÔõô¬F£¿ ÓÐÒ»ºÜÖØÒªµÄî}£¬×ÉÔһϴó¼Ò£¬ÎÒ¬FÔÚ¦PYTHONµÄ»ùµAÁ˽âÁË£¬ÒªÈçºÎÌá¸ßÄØ£¬ÊÇĸ÷Ä£KWÆðÂï!(ÎÒ¦ÄÇЩģK²»Êì)£¬Õß^íÈËÖ¸ücÒ»ÏÂСµÜ! TKS! ----- Original Message ----- From: Jacob Fan To: python-chinese at lists.python.cn Sent: Friday, April 02, 2004 9:56 AM Subject: RE: [python-chinese] DEL FILE ÄãÊÇÒªÁ·Ï°±à³Ì£¬»¹ÊÇÑ°ÕÒ½â¾ö·½°¸? Èç¹ûÊǺóÕßÍƼöʹÓÃshutilÖеÄrmtree :) ------- Explicit is better than implicit ... -----Original Message----- From: ÍôÖ¾¥\(cn\) [mailto:paul_wang at lmcn.com] Sent: 2004Äê4ÔÂ2ÈÕ 9:30 To: python-chinese at lists.python.cn Subject: [python-chinese] DEL FILE ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! # -*- coding: utf-8 -*- # "ÖÆɾ³ýÎļþºÍĿ¼" import os def rmdir_re(dir): for name in os.listdir(dir): full_name = os.path.join(dir, name) print full_name if not os.access(full_name, os.W_OK): os.chmod(full_name, 0600) if os.path.isdir(full_name): rmdir_re(full_name) else: os.remove(full_name) os.rmdir(dir) if __name__== "__main__" : d="c:\\del" rmdir_re(d) ------------------------------------------------------------------------------ _______________________________________________ python-chinese list python-chinese at lists.python.cn http://python.cn/mailman/listinfo/python-chinese -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040402/3ed27993/attachment.html
2004年04月02日 星期五 12:52
¶ÔÓÚÄ£¿é£¬Ö»ÐèÒªÖªµÀ³£ÓõÄһЩģ¿éÓÐдʲô¹¦ÄÜ£¬¾Í¿ÉÒÔÁË£¬µ½ÓõÄʱºòÔÙϸ¿´¡£ ×Ô¼ºÔÚƽʱÐèÒªµÄʱºò×Ô¼º±àһЩС½Å±¾£¬Èç¹ûÓÐʱ¼ä¾Í×Ô¼º×ö¸ö´óÒ»µãµÄ¹¤³Ì¡£ Python²»ÐèҪѧ£¬Ö»ÒªÄã°ÑËüÓÃÔÚƽʱµÄµçÄÔʹÓÃÖУ¬×ÔÈ»¾Í¿ÉÒÔ¸ãµÃºÜºÃ¡£Æ©ÈçÎÒÇ° Á½Ìì×Ô¼º±àÁËÒ»¸öС½Å±¾£¬ÓÃÀ´ÏÂÔص±ÌìCCTVµÄ½ÚÄ¿Ô¤¸æ£¬ÏÖÔÚ¾ÍÓò»×ŵǽµ½CCTVÍø Õ¾ÁË£¬:-)¡£Ñ§Python±¾Éí¾ÍÊÇΪÁË·½±ãÎÒÃDzÙ×÷µçÄÔÂï¡£ >From: ÍôÖ¾¥\(cn\) <paul_wang at lmcn.com> >Reply-To: python-chinese at lists.python.cn >To: <python-chinese at lists.python.cn> >Subject: Re: [python-chinese] DEL FILE >Date: Fri, 2 Apr 2004 11:58:23 +0800 > >MessageÎÒÊÇÏë¾ÁһϾ³Ì£¬Ïë¬Fß@Ä¿µÄµ«ÓÖ²»ÊǺÜÁ˽⣬²»ÖªÔÔõô½âQ£¿ >ÎÒ¦SHUTIL²»Á˽⣬²»ÖªÒªÔõô¬F£¿ > >ÓÐÒ»ºÜÖØÒªµÄî}£¬×ÉÔһϴó¼Ò£¬ÎÒ¬FÔÚ¦PYTHONµÄ»ùµAÁ˽âÁË£¬ÒªÈçºÎÌá¸ßÄØ £¬ÊÇĸ÷Ä£KWÆðÂï!(ÎÒ¦ÄÇЩģK²»Êì)£¬Õß^íÈËÖ¸ücÒ»ÏÂСµÜ! >TKS! > ----- Original Message ----- > From: Jacob Fan > To: python-chinese at lists.python.cn > Sent: Friday, April 02, 2004 9:56 AM > Subject: RE: [python-chinese] DEL FILE > > > ÄãÊÇÒªÁ·Ï°±à³Ì£¬»¹ÊÇÑ°ÕÒ½â¾ö·½°¸? Èç¹ûÊǺóÕßÍƼöʹÓÃshutilÖеÄrmtree :) > > > ------- > Explicit is better than implicit ... > > -----Original Message----- > From: ÍôÖ¾¥\(cn\) [mailto:paul_wang at lmcn.com] > Sent: 2004Äê4ÔÂ2ÈÕ 9:30 > To: python-chinese at lists.python.cn > Subject: [python-chinese] DEL FILE > > > ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh ³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! > # -*- coding: utf-8 -*- > # "ÖÆɾ³ýÎļþºÍĿ¼" > > import os > def rmdir_re(dir): > for name in os.listdir(dir): > full_name = os.path.join(dir, name) > print full_name > if not os.access(full_name, os.W_OK): > os.chmod(full_name, 0600) > if os.path.isdir(full_name): > rmdir_re(full_name) > else: > os.remove(full_name) > os.rmdir(dir) > if __name__== "__main__" : > d="c:\\del" > rmdir_re(d) > > >------------------------------------------------------------------------------ > > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese >_______________________________________________ >python-chinese list >python-chinese at lists.python.cn >http://python.cn/mailman/listinfo/python-chinese
2004年04月02日 星期五 13:10
Hello ÍôÖ¾¥cn, ¹þ¹þ¹þ£¡Ì«Ðļ±ÁË£¡ Python ºÍÆäËüÁ÷ÐеĿª·¢ÓïÑÔÒ»Ñù£¬ÔÚ¿ìËÙÔö³¤×Å£¬ËýµÄÄ£¿éҲͬÑù¸ßËÙ½ø»¯×Å£¬Ïë´ÓÄ£¿éµÄÓ¦ÓÃÀ´Ñ§Ï°Python ÊDZ¾Ä©µ¹ÖÃÁËÊÇÒ²ºõ£¿£¡ Òª¿ìËÙÕÆÎÕÒ»ÃÅÓïÑԵľ«»ª£¬Ó¦¸Ã Think into it... ¾ÍÊÇ˵ҪÁ½âÓïÑԵĹØ×¢ÖÐÐÄ£¬ÓÅÃÀÖ®´¦£¬½«Ë¼Ïëת»»µ½Python µÄƵµÀÀ´£¬ ¶ø²»ÒªÏëÈ«ÃæÐԵļÇסPython µÄÈ«²¿ÄÚÈÝ... àÀàÀàÀ,¿ÖžÍÊÇPython µÄÔʼµÞÔìÕß,ҲûÓа취¼ÇÇå³þ Python ÏÖÔÚËùÓеÄÓ¦Ó÷½Ê½,Ä£¿é.... Èç¹ûÄãÓÐ C++ »òÊÇJava µÄ¾Ñé,ÄÇδ,ѧϰPython ÊǸö·Ç³£Óä¿ìµÄ¾Àú, Èç¹û,ûÓÐÈκαà³Ì¾Ñé, Python µÄѧϰ,ʹÓÃ,Ò²½«ÊǸöÇáËɵÄÂÃÐÐ!àÀàÀàÀ! Python ½ÌѧÎļþ ÖÜÒëÀÖ µÄ Python 2.0°æ±¾ http://www.chinesepython.org/pythonfoundry/harrypydoc/html/tut.html ÊǷdz£easy µÄ¿ªÊ¼; Limodou µÄ ÉîÈëPython http://pyrecord.freezope.org/diveintopython/toc/index.html ÊÇÉî¶È°®ÉÏPython µÄ¿ªÊ¼! òþÉߵı¦¶´ - ChinesePython Wiki http://www.chinesepython.org/cgi_bin/moingb.cgi/_f2_fe_c9_df_b5_c4_b1_a6_b6_b4 ÊÇÖÐÎĵÄPython ×ÊÁÏÖÐÐÄ! ¿É°®µÄ Python ϵÁÐ http://www-900.ibm.com/developerWorks/cn/linux/theme/special/index.shtml#python ÔòÊÇ Python ·á¸»¶à²ÊµÄÊÀ½çµÄË÷Òý! Ö»Òª¿´µÄ¶® Python ½Å±¾,ÄÇδ,ÄãÒѾѧ»áÁËPython! Ö®ºó,¾ÍÊÇÔËÓÃËý,½â¾öʵ¼ÊÎÊÌâÁË! ¼Çס,ËùÓеÄÎÊÌâ,ÒѾ¿ÉÄÜÓÐÈËÓöµ½¹ý,²¢ÇÒ½â¾öÁË!ÎÒÃÇËùÒª×÷µÄ,½ö½öÊÇÑ¡ÔñÒ»ÖÖ×îÇáËÉ,Ç¡µ±µÄ·½Ê½À´¸Õ¸ÕºÃ½â¾öÎÒÃǾßÌåµÄÎÊÌâ! ¸ßÊÖ,µÍÊÖ,¶ÔÓÚÎÊÌâ´¦ÀíµÄЧ¹û¶¼ÊÇÒ»ÑùµÄ--- ½â¾öÁË! ²»¹ýÊǽá¹û²»Í¬, Á¼ºÃµÄ¿ª·¢Ï°¹ß,רҵµÄ Python ËØÑø,¿ÉÒÔʹÄãµÄ¿ª·¢,³ÉΪÄãµÄÄÜÁ¦µÄÒ»²¿·Ö! ÿһ´ÎÎÊÌâµÄ½â¾ö,Òâζ×Å×Ô¸ö¶ùµÄ´úÂë¿âÓÖÎȶ¨µÄÔö³¤ÁËһЩ¿ÉÒԸ߶ȸ´ÓõÄÄ£¿é, Òâζ×Å ½â¾öÎÊÌâµÄ˼·ÓÖ±»ÑéÖ¤ÁËÒ»´Î,»òÊÇ·¢Ã÷ÁËÒ»¸öеÄ;¾¶, ÓÖ»òÊÇ ·¶Ê½µÄÓ¦ÓÃ,×Ô¸ö¶ùÓÖÊìÁ·ÁËÒ»ÖÖ; ÓÖ·¢ÏÖÁËÒ»¸öеĸ¨Öú¹¤¾ß.... ×ÜÖ®,²»»áÊǵ¥µ÷µÄÓÖ½â¾öÁËÒ»¸öÎÊÌâ¶øÒÑ! ¶ÔÓÚ Python ѧϰ²»ÊÇÖØÒªµÄ,ÖØÒªµÄÊÇʵսӦÓÃ! Python ·¢Ã÷µÄÄ¿µÄ,¾ÍÊÇ¿ìËٵĽâ¾öÎÊÌâ,ʹÓà easy µÄ·½Ê½! "¦SHUTIL²»Á˽â" Ò»°ãÀ´½²¶¼ÊÇ ³ÂÒ§½ð Èý°å¸«: 1: ÏÂÔØ,½¨Á¢»·¾³; 2: ¿´Îĵµ, Á˽â»ù±¾¹¦ÄÜ; 3: ¿´Ó¦ÓÃÀý×Ó,´Ó http://aspn.activestate.com/ASPN/Cookbook/ Ö®Àà²éµ½ÀàËƵÄÒѾ½â¾öµÄÀàËÆÎÊÌâµÄ´úÂë,ѧϰ¾ßÌåµÄʹÓà ×ã¹» Fixed Ò»ÇÐÒÉÎÊÁËÊÇÒ²ºõÊÇÒ²ºõ!!! === [ 11:58 ; 04-04-02 ] you wrote: ? MessageÎÒÊÇÏë¾ÁһϾ³Ì£¬Ïë¬Fß@Ä¿µÄµ«ÓÖ²»ÊǺÜÁ˽⣬²»ÖªÔÔõô½âQ£¿ ? ÎÒ¦SHUTIL²»Á˽⣬²»ÖªÒªÔõô¬F£¿ ? ÓÐÒ»ºÜÖØÒªµÄî}£¬×ÉÔһϴó¼Ò£¬ÎÒ¬FÔÚ¦PYTHONµÄ»ùµAÁ˽âÁË£¬ÒªÈçºÎÌá¸ßÄØ£¬ÊÇĸ÷Ä£KWÆðÂï!(ÎÒ¦ÄÇЩģK²»Êì)£¬Õß^íÈËÖ¸ücÒ»ÏÂСµÜ! ? TKS! ? ----- Original Message ----- ? From: Jacob Fan ? To: python-chinese at lists.python.cn ? Sent: Friday, April 02, 2004 9:56 AM ? Subject: RE: [python-chinese] DEL FILE ? ÄãÊÇÒªÁ·Ï°±à³Ì£¬»¹ÊÇÑ°ÕÒ½â¾ö·½°¸? ? Èç¹ûÊǺóÕßÍƼöʹÓÃshutilÖеÄrmtree :) ? ------- ? Explicit is better than implicit ... ? -----Original Message----- ? From: ÍôÖ¾¥\(cn\) [mailto:paul_wang at lmcn.com] ? Sent: 2004Äê4ÔÂ2ÈÕ 9:30 ? To: python-chinese at lists.python.cn ? Subject: [python-chinese] DEL FILE ? ? ÎÒÏÂÃæµÄ³ÌÐò£¬²¢]ÓÐß_µ½ÎÒÏëÒªµÄЧ¹û£¬ÎÒÏë°Ñ¡°C:\\del¡±ßBÄ¿äDELÒ»Æðh³ý£¬°üÀ¨DELÏÂÃæËùÓеÄÄ¿äºÍÎļþ(¸÷·NîÐÍ)£¬Õ½Ì¸÷λ´ó¸çÒªÈçºÎ²ÅÄܬF£¿TKS! ? # -*- coding: utf-8 -*- ? # "ÖÆɾ³ýÎļþºÍĿ¼" ? import os ? def rmdir_re(dir): ? for name in os.listdir(dir): ? full_name = os.path.join(dir, name) ? print full_name ? if not os.access(full_name, os.W_OK): ? os.chmod(full_name, 0600) ? if os.path.isdir(full_name): ? rmdir_re(full_name) ? else: ? os.remove(full_name) ? os.rmdir(dir) ? if __name__== "__main__" : ? d="c:\\del" ? rmdir_re(d) ? ------------------------------------------------------------------------------ ? _______________________________________________ ? python-chinese list ? python-chinese at lists.python.cn ? http://python.cn/mailman/listinfo/python-chinese === === === === === === === === === === -- Best regards, Zoom.Quiet /=======================================\ ]Time is unimportant, only life important![ \=======================================/
2004年04月02日 星期五 13:38
变量名应该是CLASSPATH吧, 试一下看看. Jacob Fan <jacob at exoweb.net> wrote: 你是指Java写的包?请看一看jython.bat(windows下)里面的CLASS_PATH是如何设置的。 ------- Explicit is better than implicit ... -----Original Message----- From: jason [mailto:jianxin_yang at 126.com] Sent: 2004年4月1日 10:23 To: python-chinese at lists.python.cn Subject: [python-chinese] 请问如何让jython找到自己写的程序包? 各位, 请问如何让jython找到自己写的程序包? 设了CLASS_PATH不行,把jar文件放到jython的/lib目录也不行 -- jason _______________________________________________ python-chinese list python-chinese at lists.python.cn http://python.cn/mailman/listinfo/python-chinese --------------------------------- Do You Yahoo!? 完全免费的雅虎电邮,马上注册获赠额外60兆网络存储空间 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040402/48259e83/attachment.htm
Zeuux © 2024
京ICP备05028076号