先看一个很简单的例子 #coding:utf8 import Queue #queue是队列的意思 q=Queue.Queue(maxsize=10) #创建一个queue对象 for i in range(9): q.put(i) #放入元素 while not q.empty():#检测元素是否为空 print q.get(),#读取元素 #默认为先进先出 如果需要一个无限长或者先进后出的队列 #创建一个无限长的队列,如果maxsize小于1就表示队列长度无限. q1=Queue.Queue
源博客 http://blog.itpub.net/24996904/viewspace-769327/ 在/etc/default/目录下有个rcS文件,文件内容如下:## /etc/default/rcS## Default settings for the scripts in /etc/rcS.d/## For information about these variables see the rcS(5) manual page.## This file belongs to the
/tmp目录文件重启后自动删除现在知道有ubuntu和solaris系统source:http://blog.chinaunix.net/uid-26212859-id-3567875.html经常会把临时性的log或抓包等文件放在/tmp目录下,重启后发现文件都丢失了.查下资料发现,可以通过设置解决这个问题.在/etc/default/目录下有个rcS文件,文件内容如下:## /etc/default/rcS## Default settings for the scripts in /etc