Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

python Îļþ±¸·Ý´íÎó

#! c:\python26
# Filename: backup_ver1.py
import os
import time
source=[r'C:\test', r'C:\test1']
target_dir='D:\\back\\'
target=target_dir+time.strftime('%Y%m%d%H%M%S')+'.zip'
zip_command="rar a -r \"%s\" \"%s\"" %(target,''.join(source))
if os.system(zip_command)==0:
  print'successful backup to',target
else:
  print'backup failed'

ÔÚdosÏÂÔËÐУ¬Ìáʾ¡°²»ÄܶÁÈ¡c:\testc:\test1µÄÄÚÈÝ¡± £¬Èç¹û¸ÄΪ¡°source=r'C:\test'¡± £¬Ö»±¸·ÝÒ»¸öĿ¼£¬¿ÉÒÔÔËÐС£
²»ÖªµÀÔõô½â¾ö
''.join(source)

==>

' '.join(source)

¼Ç×ÅÁ½¸öµ¥ÒýºÅÖмäÊǸö¿Õ¸ñ¡£

Èç¹ûÊǿոñ£¬ÔÚdosÔËÐÐÌáʾ¡°ÕÒ²»µ½Ö¸¶¨Â·¾¶¡±£¬²»ÄܿոñµÄ

Âß¼­ÓеãÎÊÌ⣬Õâ¸öÓ¦¸ÃÄܹ¤×÷£º

zip_command="rar a -r \"%s\" \"%s\"" % (target, "\" \"".join(source))

ºÇºÇ,ºÍÎÒÒ»ÑùÒ²ÔÚѧÕâ½ÚÄØ
{{


Ïà¹ØÎÊ´ð£º

python PILÄ£¿é´ò¿ªÍ¼Æ¬ÎÊÌâ

ÇëÎÊÏ£¬ÎÒµÄÊÇpython2.5°²×°ÁËPILÄ£¿é£¬È»ºó±àд³ÌÐò´ò¿ª±¾»úÉϵÄÒ»¸öͼƬʱ£¬ÎªÊ²Ã´ÀϳöÏÖ´íÎóÄØ£¬ÀÏÊÇÕÒ²»µ½Í¼Æ¬£¬´íÎóÌáʾÈçÏ£ºFile "C:\Python25\Lib\site-packages\PIL\Image.py", line 1888, in o ......

³ÏÕÐPython³ÌÐòÔ±²ÎÓë¼ÆËã»úÊé¼®³ö°æ

ÓźñµÄ¸å³ê£¬³ÏÕÐPython¼¼ÊõÈËÔ±²ÎÓë¸÷ÖÖ¼¼ÊõÊé¼®³ö°æ¡£ 
ͨ¹ý¸ÃÊé¼®£¬×÷Õß¿ÉÒԵõ½Èçϱ¨³ê£º 
1¡¢·áºñµÄ¸å³ê¡£ 
2¡¢Êé¼®Öø×÷µÄÊðÃûȨ¡£ 
3¡¢¶Ô×÷ÕߺÍÊé½øÐÐÐû´«£¬Ìá¸ß×÷ÕßÔÚ¼¼ÊõȦ×ÓÀ ......

python 3.xµÄifÓï¾ä

>>> x=-1
>>> if x>0:
print ('11')

>>> else:

SyntaxError: invalid syntax (<pyshell#20>, line 1)
ÍøÉÏËѵÄÒ²ÊÇ£º
>>> x=int(input("Please ent ......

C# RSA Python - .NET¼¼Êõ / C#

C#ÀïÃæÓÃusing System.Security.Cryptography; RSACryptoServiceProvider¼ÓÃܹýµÄÏûÏ¢
ÓÃPython CryptoÖÐRSAµÄ·½·¨ ÄÜÖ±½Ó ½âÂð£¿
RSA¼ÓÃÜ·½Ê½²»ÊÇͳһµÄÂð£¿ÐèҪעÒâЩʲô£¿

ÓаïÖú¡£µ«ÊÇû½â¾öÎÊÌâ¡£¡£¡£
......

python winϵ÷ÓÃdll

  СµÜ½Ó´¥python 2¸öÐÇÆÚÁË£¬°²×°µÄÊÇpython3.1°æ¡£
ÎÒÓõÄÊÇwindows7£¬Ïëд¸öµ÷ÓÃdllµÄ³ÌÐòʵ¼ù¡£ÎÊÌâÀ´ÁË£º

C++´úÂ룺
extern "C" int __stdcall test();

int __stdcall te ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ