易截截图软件、单文件、免安装、纯绿色、仅160KB

Python 定时运行脚本

import sys
import os
import datetime
import time
class ArgsDealwith:
   
    def arg_environment(self, args):
        filepath = ('PYTHON_PATH', 'path')
        for i in filepath:
            filename = os.environ.get(i,"%s is null." % i)
            print '%s:' % i,' ', filename
    def arg_en(self, args):
        filepath = ('PYTHON_PATH', 'path')
        for i in filepath:
            filename = os.environ.get(i,"%s is null." % i)
            print '%s:' % i, ' ', ' '.join(filename.split(';'))
    def arg_file(self, args):
        if not args:
            print 'Error: file name is null.'
        else:
            if len(args) == 1 and args[0].lower() == 'python_path':
                filename = os.environ.get(args[0], None)
                if filename:
                    args = filename.split(';')
                else:
                    print 'Error: "%s" is null' % args[0]
          &nbs


相关文档:

Python库详解之网络(2)

昨天试了下用HTMLParser类来解析网页,可发现结果并不理想。不管怎么说,先写下过程,希望后来人能在此基础上解决我所遇到的问题。
写了2套解决方案,当然这2套只能对特定网站有效。我这里主要说明下对BBC主页www.bbc.co.uk和对网易www.163.com的解析。
对于BBC:
这套要简单得多,可能是该网页的编码比较标准吧
import ......

Python嵌入C++详解(3)

继前篇《Import Module》(http://blog.csdn.net/xiadasong007/archive/2009/09/02/4512797.aspx),继续分析嵌入部分基础知识。这次不多说,有什么问题记得多查英文资料,国内的这方面知识少
还是来看代码,写完我就睡觉了~
 
#include "python/python.h"
#include <iostream>
using namespace std;
int ......

Python库详解之网络(1)

刚刚写完Python嵌入部分的简单例子(差不多够现在用的啦~),接着看点实际的东西,如果没有这些应用的话,前面的嵌入也没有什么意义。嵌入的其他部分以后遇到再写,不必一下子把那些函数都弄懂,是吧~
OK,来看Python库中我认为最好玩的一部分,也就是Python对网页的操作。
这篇简单说下如何通过网址下载网页,前提当然是 ......

python使用心得

最近在公司负责一个项目,是做一个编译器,大家可能知道,做编译器一般用C++或java,但是我的这个项目却使用了python来做这个编译器,很有挑战性。
我今天所讲的是在开发过程中,对使用python2.6语言的感受,目前这个项目已经完成三分之一了。
说实话,python并不适合做这样的项目。(虽然也能做)以下是总结了python相关 ......

python的wiki 列子.

#coding=utf-8
from newtest.wiki.models import WiKi
from django.template import loader, Context
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response

def index(request, pagename=""):
"""显示正常页面,对页面的文字做特殊的链接处理"""
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号