发布时间:2015-08-29 11:55:26
<pre class="displaycode" style="margin-top:0px;margin-bottom:0px;padding:0px;border:0px;outline:0px;font-size:inherit;vertical-align:baseline;background-color:#FFFFFF;">#!/bin/bashecho "Please enter your first and last name:"read YDecho "Hellow $YD , welcome to bash scripting ...!"exit 0</pre>.........【阅读全文】
发布时间:2015-08-10 16:35:13
<pre><span class="k">def</span> <span class="nf">all</span><span class="p">(</span><span class="n">iterable</span><span class="p">):</span> </pre><pre><span class="k"> for</span> <span class="n">element</span> <span class="ow">in</span> <span class="......【阅读全文】
发布时间:2015-08-06 20:37:09
#!/usr/bin/expect<br />cd /usr/local/spes/<br />spawn ./spes -i -u w00170949<br />expect "password:"<br />send "wq_5230056\r"<br />interact<br /><br />放在/etc/init.d/boot.local,开机自运行。<br />......【阅读全文】
发布时间:2015-08-04 19:40:23
1.list 定义<br />>>> li = ["a", "b", "mpilgrim", "z", "example"] >>> li ['a', 'b', 'mpilgrim', 'z', 'example'] >>> li[1] 'b'<br />1.list 负数索引<br />>>> li ['a', 'b', 'mpilgrim', 'z', 'example'] >>> li[-1] 'example' >>> li[-3] 'mpilgrim' >.........【阅读全文】
发布时间:2015-08-04 19:30:50
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">import </span>calendarmonthRange = calendar.monthrange(<span style="color:#0000ff;">2013</span>,<span style="color:#0000ff;">6</span>) </pre><pre style="background-color:#FFFFF.........【阅读全文】
发布时间:2015-08-03 11:40:22
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="background-color:#ffe4ff;">str</span> = <span style="color:#008080;font-weight:bold;">"www.runoob.com" </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000.........【阅读全文】
发布时间:2015-08-03 11:31:47
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 写文件 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">with </span><span style="color:#00008.........【阅读全文】
发布时间:2015-08-03 11:23:49
<pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#808080;font-style:italic;"># 引入日历模块 </span></pre><pre style="background-color:#FFFFFF;font-family:宋体;font-size:12pt;"><span style="color:#000080;font-weight:bold;">import </span>calendar </p.........【阅读全文】