Python论坛  - 讨论区

标题:[python-chinese] [CPyUG:35548] Re: 这段备份脚本为何运行错误?

2007年11月24日 星期六 23:35

Pattern Liu liufengsjtu在gmail.com
星期六 十一月 24 23:35:00 HKT 2007

¶àл£¬ÏÂÔØʲôÈí¼þ°²×°ÄØ£¿winzip£¿£¿ÊDz»ÊÇ°²×°Á˾ͿÉÒÔÁË£¬ÎÒÔÚwindowsϵͳϵġ£


ÔÚ07-11-24£¬DDGG <python在rtgame.com> дµÀ£º
>
> Õâ¶Î½Å±¾ÐèÒªzip.exe£¬ÒòΪËüÖ»Êǵ÷ÓÃÕâ¸öÈí¼þÀ´¶ÔÎļþ½øÐÐѹËõ¡£
>
> On 11ÔÂ24ÈÕ, ÏÂÎç11ʱ02·Ö, "Pattern Liu" <liufengs...在gmail.com> wrote:
> > ÔËÐнá¹ûÊÇ£ºBackup FAILED
> > ÓÖÔÚdosÃüÁîÐÐÊÔÊÔ£¬Ìáʾ˵ zip²»ÊÇÄÚ²¿»òÍⲿÃüÁîÒ²²»ÊÇ¿ÉÖ´ÐгÌÐò»òÕßÅú´¦ÀíÎļþ¡£¡£ÕâÊÇΪʲô£¿
> >
> > ´úÂëÈçÏ£º
> > #!/usr/bin/python
> > #Filename:backup_ver1.py
> > import os
> > import time
> > source=['C:\\Storm','D:\\Report']
> > target_dir='D:\\backup'
> > target=target_dir+time.strftime('%Y%m%d%H%M%S')+'.zip'
> > zip_command="zip -qr '%s' %s" %(target,' '.join(source))
> > if os.system(zip_command)==0:
> >     print 'Successful backup to',target
> > else:
> >     print 'Backup FAILED'
> >
> > _______________________________________________
> > python-chinese
> > Post: send python-chin...在lists.python.cn
> > Subscribe: send subscribe to python-chinese-requ...在lists.python.cn
> > Unsubscribe: send unsubscribe to  python-chinese-requ...在lists.python.cn
> > Detail Info:http://python.cn/mailman/listinfo/python-chinese
> --~--~---------~--~----~------------~-------~--~----~
> '''ÓʼþÀ´×ÔGroups "python-cn"--China Py User Group
> ÏêÇé: http://groups-beta.google.com/group/python-cn
> ·¢ÑÔ: python-cn在googlegroups.com
> Í˶©: python-cn-unsubscribe在googlegroups.com
> ά»ù: http://wiki.woodpecker.org.cn/moin/CPUG
> Öé½­ÊÂÎñ: http://groups.google.com/group/zpug
> ¶«ÄÏÊÂÎñ: http://groups.google.com/group/cpug-eastchina
> ±±¾©ÊÂÎñ: http://groups.google.com/group/bpug
> ÖйúÊÂÎñ: http://groups.google.com/group/CPUG
> ͬÖÊÁбí: http://python.cn/mailman/listinfo/python-chinese
> '''
> -~----------~----~----~----~------~----~------~--~---
>
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071124/49b7f8f3/attachment.htm 

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

2007年11月24日 星期六 23:55

篱笆 nameliba在gmail.com
星期六 十一月 24 23:55:47 HKT 2007

Èç¹ûϵͳûÓÐÉèÖû·¾³±äÁ¿..ÒªÖ¸¶¨³ÌÐò·¾¶²ÅÐÐ.

ÔÚ07-11-24£¬Pattern Liu <liufengsjtu在gmail.com> дµÀ£º
>
> ¶àл£¬ÏÂÔØʲôÈí¼þ°²×°ÄØ£¿winzip£¿£¿ÊDz»ÊÇ°²×°Á˾ͿÉÒÔÁË £¬ÎÒÔÚwindowsϵͳϵġ£
>
>
> ÔÚ07-11-24£¬DDGG <python在rtgame.com> дµÀ£º
> >
> > Õâ¶Î½Å±¾ÐèÒªzip.exe£¬ÒòΪËüÖ»Êǵ÷ÓÃÕâ¸öÈí¼þÀ´¶ÔÎļþ½øÐÐѹËõ¡£
> >
> > On 11ÔÂ24ÈÕ, ÏÂÎç11ʱ02·Ö, "Pattern Liu" < liufengs...在gmail.com> wrote:
> > > ÔËÐнá¹ûÊÇ£ºBackup FAILED
> > > ÓÖÔÚdosÃüÁîÐÐÊÔÊÔ£¬Ìáʾ˵ zip²»ÊÇÄÚ²¿»òÍⲿÃüÁîÒ²²»ÊÇ¿ÉÖ´ÐгÌÐò»òÕßÅú´¦ÀíÎļþ¡£¡£ÕâÊÇΪʲô£¿
> > >
> > > ´úÂëÈçÏ£º
> > > #!/usr/bin/python
> > > #Filename:backup_ver1.py
> > > import os
> > > import time
> > > source=['C:\\Storm','D:\\Report']
> > > target_dir='D:\\backup'
> > > target=target_dir+time.strftime('%Y%m%d%H%M%S')+'.zip'
> > > zip_command="zip -qr '%s' %s" %(target,' '.join(source))
> > > if os.system(zip_command)==0:
> > >     print 'Successful backup to',target
> > > else:
> > >     print 'Backup FAILED'
> > >
> > > _______________________________________________
> > > python-chinese
> > > Post: send python-chin...在lists.python.cn
> > > Subscribe: send subscribe to python-chinese-requ...在lists.python.cn
> > > Unsubscribe: send unsubscribe to
> > python-chinese-requ...在lists.python.cn
> > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > --~--~---------~--~----~------------~-------~--~----~
> > '''ÓʼþÀ´×ÔGroups "python-cn"--China Py User Group
> > ÏêÇé: http://groups-beta.google.com/group/python-cn
> > ·¢ÑÔ: python-cn在googlegroups.com
> > Í˶©: python-cn-unsubscribe在googlegroups.com
> > ά»ù: http://wiki.woodpecker.org.cn/moin/CPUG
> > Öé½­ÊÂÎñ: http://groups.google.com/group/zpug
> > ¶«ÄÏÊÂÎñ: http://groups.google.com/group/cpug-eastchina
> > ±±¾©ÊÂÎñ: http://groups.google.com/group/bpug
> > ÖйúÊÂÎñ: http://groups.google.com/group/CPUG
> > ͬÖÊÁбí: 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
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071124/09531d6c/attachment.html 

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

2007年11月25日 星期日 11:21

QiJie Shen sqj.python在gmail.com
星期日 十一月 25 11:21:23 HKT 2007

winÖÐÈç¹û×°ÁËwinrarµÄ»°¿ÉÒÔ½«zipÄǾä¸ÄΪ£º

zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' % (target, '
'.join(source))

E:\\Program Files\\WinRAR\\winrar Ϊ±¾µØµÄwinrar·¾¶£¬ Èç¹û×°ÁËwinzipµÄÒ²ÊÇÀàËÆ´¦Àí

ÔÚ07-11-24£¬Àé°Ê <nameliba在gmail.com> дµÀ£º
>
> Èç¹ûϵͳûÓÐÉèÖû·¾³±äÁ¿..ÒªÖ¸¶¨³ÌÐò·¾¶²ÅÐÐ.
>
> ÔÚ07-11-24£¬Pattern Liu <liufengsjtu在gmail.com> дµÀ£º
> >
> > ¶àл£¬ÏÂÔØʲôÈí¼þ°²×°ÄØ£¿winzip£¿£¿ÊDz»ÊÇ°²×°Á˾ͿÉÒÔÁË £¬ÎÒÔÚwindowsϵͳϵġ£
> >
> >
> > ÔÚ07-11-24£¬DDGG <python在rtgame.com> дµÀ£º
> > >
> > > Õâ¶Î½Å±¾ÐèÒªzip.exe£¬ÒòΪËüÖ»Êǵ÷ÓÃÕâ¸öÈí¼þÀ´¶ÔÎļþ½øÐÐѹËõ¡£
> > >
> > > On 11ÔÂ24ÈÕ, ÏÂÎç11ʱ02·Ö, "Pattern Liu" < liufengs...在gmail.com > wrote:
> > > > ÔËÐнá¹ûÊÇ£ºBackup FAILED
> > > > ÓÖÔÚdosÃüÁîÐÐÊÔÊÔ£¬Ìáʾ˵ zip²»ÊÇÄÚ²¿»òÍⲿÃüÁîÒ²²»ÊÇ¿ÉÖ´ÐгÌÐò»òÕßÅú´¦ÀíÎļþ¡£¡£ÕâÊÇΪʲô£¿
> > > >
> > > > ´úÂëÈçÏ£º
> > > > #!/usr/bin/python
> > > > #Filename:backup_ver1.py
> > > > import os
> > > > import time
> > > > source=['C:\\Storm','D:\\Report']
> > > > target_dir='D:\\backup'
> > > > target=target_dir+time.strftime('%Y%m%d%H%M%S')+'.zip'
> > > > zip_command="zip -qr '%s' %s" %(target,' '.join(source))
> > > > if os.system(zip_command)==0:
> > > >     print 'Successful backup to',target
> > > > else:
> > > >     print 'Backup FAILED'
> > > >
> > > > _______________________________________________
> > > > python-chinese
> > > > Post: send python-chin...在lists.python.cn
> > > > Subscribe: send subscribe to python-chinese-requ...在lists.python.cn
> > > > Unsubscribe: send unsubscribe to  python-chinese-requ...在lists.python.cn
> > > > Detail Info: http://python.cn/mailman/listinfo/python-chinese
> > > --~--~---------~--~----~------------~-------~--~----~
> > > '''ÓʼþÀ´×ÔGroups "python-cn"--China Py User Group
> > > ÏêÇé: http://groups-beta.google.com/group/python-cn
> > > ·¢ÑÔ: python-cn在googlegroups.com
> > > Í˶©: python-cn-unsubscribe在googlegroups.com
> > > ά»ù: http://wiki.woodpecker.org.cn/moin/CPUG
> > > Öé½­ÊÂÎñ: http://groups.google.com/group/zpug
> > > ¶«ÄÏÊÂÎñ: http://groups.google.com/group/cpug-eastchina
> > > ±±¾©ÊÂÎñ: http://groups.google.com/group/bpug
> > > ÖйúÊÂÎñ: http://groups.google.com/group/CPUG
> > > ͬÖÊÁбí: 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
> >
>
>
> _______________________________________________
> 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/20071125/0c0ac74c/attachment.html 

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

2007年11月25日 星期日 12:41

Andelf andelf在gmail.com
星期日 十一月 25 12:41:38 HKT 2007

On 11/25/07, QiJie Shen <sqj.python at gmail.com> wrote:
>
> win中如果装了winrar的话可以将zip那句改为:
>
> zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' % (target, '
> '.join(source))
>
> E:\\Program Files\\WinRAR\\winrar 为本地的winrar路径, 如果装了winzip的也是类似处理
>
>

建议在简明教程里添加 zip.exe 的下载, 这个例子不知道卡住多少人.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20071125/62011937/attachment.html 

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

2007年11月25日 星期日 13:30

fdcn fdcn64在gmail.com
星期日 十一月 25 13:30:54 HKT 2007

无语

On 11/25/07, Andelf <andelf在gmail.com> wrote:
>
>
>
> On 11/25/07, QiJie Shen <sqj.python在gmail.com> wrote:
> >
> > win中如果装了winrar的话可以将zip那句改为:
> >
> > zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' % (target, '
> > '.join(source))
> >
> > E:\\Program Files\\WinRAR\\winrar 为本地的winrar路径, 如果装了winzip的也是类似处理
> >
> >
>
> 建议在简明教程里添加 zip.exe 的下载, 这个例子不知道卡住多少人.
>
>
>
> _______________________________________________
> 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/20071125/03ac8f32/attachment.htm 

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

2007年11月25日 星期日 17:25

FireBird ygonic在gmail.com
星期日 十一月 25 17:25:55 HKT 2007

winrarÓаæȨµÄ£¬python×Ô¶¯Ìṩһ¸özipѹËõµÄ¹¤¾ß£¨Ïê¼ûzipfile£©¡£

ÔÚ07-11-25£¬Andelf <andelf在gmail.com> дµÀ£º
>
>
>
> On 11/25/07, QiJie Shen <sqj.python在gmail.com> wrote:
> >
> > winÖÐÈç¹û×°ÁËwinrarµÄ»°¿ÉÒÔ½«zipÄǾä¸ÄΪ£º
> >
> > zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' % (target, '
> > '.join(source))
> >
> > E:\\Program Files\\WinRAR\\winrar Ϊ±¾µØµÄwinrar·¾¶£¬ Èç¹û×°ÁËwinzipµÄÒ²ÊÇÀàËÆ´¦Àí
> >
> >
>
> ½¨ÒéÔÚ¼òÃ÷½Ì³ÌÀïÌí¼Ó zip.exe µÄÏÂÔØ, Õâ¸öÀý×Ó²»ÖªµÀ¿¨×¡¶àÉÙÈË.
>
>
>
> _______________________________________________
> 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/20071125/eb14c0aa/attachment.htm 

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

2007年11月25日 星期日 19:33

Zoom.Quiet zoom.quiet在gmail.com
星期日 十一月 25 19:33:01 HKT 2007

On Nov 25, 2007 5:25 PM, FireBird <ygonic在gmail.com> wrote:
> winrar有版权的,python自动提供一个zip压缩的工具(详见zipfile)。
>
还有超級猛的 7-zip !

>
> 在07-11-25,Andelf <andelf在gmail.com> 写道:
> >
> >
> >
> >
> >
> >
> > On 11/25/07, QiJie Shen <sqj.python在gmail.com > wrote:
> > >
> > > win中如果装了winrar的话可以将zip那句改为:
> > >
> > > zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' % (target, '
> '.join(source))
> > >
> > > E:\\Program Files\\WinRAR\\winrar 为本地的winrar路径, 如果装了winzip的也是类似处理
> > >
> >
> >
> > 建议在简明教程里添加 zip.exe 的下载, 这个例子不知道卡住多少人.
> >
> >
> > _______________________________________________
> > 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
>



-- 
'''Time is unimportant, only life important!
过程改进乃是开始催生可促生靠谱的人的组织!
'''http://zoomquiet.org
博 @ http://blog.zoomquiet.org/pyblosxom/
维 @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
豆 @ http://www.douban.com/people/zoomq/
看 @ http://zoomq.haokanbu.com/
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
You can get the truely Freedom 4 software.

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

2007年11月25日 星期日 20:04

篱笆 nameliba在gmail.com
星期日 十一月 25 20:04:52 HKT 2007

»ù±¾µÄϵͳÏà¹ØµÄÖªµÀ.Óë½Ì²ÄÎ޹ذÉ.ºÇºÇ

ÔÚ07-11-25£¬Zoom. Quiet <zoom.quiet在gmail.com> дµÀ£º
>
> On Nov 25, 2007 5:25 PM, FireBird <ygonic在gmail.com> wrote:
> > winrarÓаæȨµÄ£¬python×Ô¶¯Ìṩһ¸özipѹËõµÄ¹¤¾ß£¨Ïê¼ûzipfile£©¡£
> >
> »¹Óг¬¼‰Ã굀 7-zip !
>
> >
> > ÔÚ07-11-25£¬Andelf <andelf在gmail.com> дµÀ£º
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 11/25/07, QiJie Shen <sqj.python在gmail.com > wrote:
> > > >
> > > > winÖÐÈç¹û×°ÁËwinrarµÄ»°¿ÉÒÔ½«zipÄǾä¸ÄΪ£º
> > > >
> > > > zip_command = '"E:\\Program Files\\WinRAR\\winrar" a %s %s' %
> (target, '
> > '.join(source))
> > > >
> > > > E:\\Program Files\\WinRAR\\winrar Ϊ±¾µØµÄwinrar·¾¶£¬ Èç¹û×°ÁËwinzipµÄÒ²ÊÇÀàËÆ´¦Àí
> > > >
> > >
> > >
> > > ½¨ÒéÔÚ¼òÃ÷½Ì³ÌÀïÌí¼Ó zip.exe µÄÏÂÔØ, Õâ¸öÀý×Ó²»ÖªµÀ¿¨×¡¶àÉÙÈË.
> > >
> > >
> > > _______________________________________________
> > > 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
> >
>
>
>
> --
> '''Time is unimportant, only life important!
> ¹ý³Ì¸Ä½øÄËÊÇ¿ªÊ¼´ßÉú¿É´ÙÉú¿¿Æ×µÄÈ˵Ä×éÖ¯!
> '''http://zoomquiet.org
> ²© @ http://blog.zoomquiet.org/pyblosxom/
> ά @ http://wiki.woodpecker.org.cn/moin/ZoomQuiet
> ¶¹ @ http://www.douban.com/people/zoomq/
> ¿´ @ http://zoomq.haokanbu.com/
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Pls. usage OOo to replace M$ Office. http://zh.openoffice.org
> Pls. usage 7-zip to replace WinRAR/WinZip.  http://7-zip.org
> You can get the truely Freedom 4 software.
> _______________________________________________
> 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/20071125/96fce86a/attachment.html 

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

2007年11月25日 星期日 22:18

Ben Luo benluo在gmail.com
星期日 十一月 25 22:18:10 HKT 2007

On Nov 24, 2007 11:35 PM, Pattern Liu <liufengsjtu在gmail.com> wrote:

> ¶àл£¬ÏÂÔØʲôÈí¼þ°²×°ÄØ£¿winzip£¿£¿ÊDz»ÊÇ°²×°Á˾ͿÉÒÔÁË£¬ÎÒÔÚwindowsϵͳϵġ£
>
Äܶ࿴¿´howto, manual, tutor? ÊÖ°ÑÊÖ½ÌÒ²Òª×Ô¼ºÓкõÄѧϰ·½·¨¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071125/959c9fc6/attachment.html 

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

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

    你的回复:

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

    Zeuux © 2025

    京ICP备05028076号