安裝sudo pip install sphinx初始化進入你代碼所在的目錄,輸入以下內容sphinx-quickstart會出來一系列要選填的東西,按照我的填入就可以了Welcome to the Sphinx 1.2.3 quickstart utility.Please enter values for the following settings (just press Enter toaccept a default value, if one is given in
剛寫完,還沒來得及測試,依賴的是netdom,如需要軟體包,可留言 代碼如下複製代碼 import pythoncomimport wmiimport osimport platformdef joinDomain(domain,username,password,dns):if not domain or not username or not password or not dns:return False# change the work
代碼如下複製代碼 #!/usr/bin/python#-*-coding:cp936 -*-import osimport zipfiledef unzip(infile,targetDir): if not os.path.exists(infile): return False if not os.path.isdir(
這兩天溫故了python的multiprocessing多進程模組,看到的pipe和queue這兩種ipc方式,啥事ipc? ipc就是進程間的通訊模式,常用的一半是socke,rpc,pipe和訊息佇列等。 今個就再把pipe和queue搞搞。 代碼如下複製代碼 #coding:utf-8import multiprocessingimport time def proc1(pipe): while
這兩天,偶爾再次看了遍這篇文章,並且對Fabric感興趣,或許我管理一些伺服器時也許還能用得上,所以花了點時間簡單瞭解了一下Fabric。首先,Fabric是什麼呢? Fabric是一個Python庫和命令列工具,它可以將使用SSH操作的應用部署或系統管理任務更加地高效(流水線化)。Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for
在一些Linux機器上用easy_install安裝MySQLdb時,遇到的問題,使用web.py做幾個RESTful API和幾個網頁,與MySQL互動是需要用MySQLdb這個Python庫,當使用“sudo easy_install MySQL-python”命令安裝MySQLdb時,提示“Please install a more recent version first, using ‘easy_install -U