摘要: Python版本2.7.9模拟POST请求 1 #coding:u8 2 import urllib 3 import urllib2 4 5 url = u"http://192.168.84.182:8000/Home/GetTheme" 6 params = urllib.urlencode... 阅读全文
posted @ 2015-08-13 16:12 CodeTracker 阅读(601) 评论(0) 推荐(0) 编辑
摘要: Python 版本2.7.9模拟GET请求 1 import urllib 2 import urllib2 3 4 url = "http://www.baidu.com/s?wd=haha" 5 6 req = urllib2.Request(url) 7 #打印请求对象 8 print r... 阅读全文
posted @ 2015-08-13 15:20 CodeTracker 阅读(463) 评论(0) 推荐(0) 编辑
摘要: 单行条件 语法为statement keyword condexpr。其中keyword可为if、unless、while或until,如: print ("This is zero.\n") if ($var == 0); print ("This is zero.\n") unle... 阅读全文
posted @ 2015-08-13 14:10 CodeTracker 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 1、while循环 while ( ) { }2、until循环 until ( ) { }3、for循环 ,如 for ($count=1; $count <= 5; $count++) { # statements inside the loop go h... 阅读全文
posted @ 2015-08-13 11:19 CodeTracker 阅读(805) 评论(0) 推荐(0) 编辑
摘要: 1 my $dir = "D:\\My_Work\\Temp"; 2 my @files = (); 3 4 #获取给定目录下文件 5 @files = get_dir_files($dir); 6 7 #获取给定目录以及子目录下文件 8 @files = get_dir_files_... 阅读全文
posted @ 2015-08-13 00:44 CodeTracker 阅读(2395) 评论(0) 推荐(0) 编辑