Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(4)  |  Derive(0)  |  Import(1)

        def write_status(status, directory, job_name, log=None):
    
    filename=os.path.join(directory, job_name+'.txt')
    try:
        f=open(filename, 'w')
        f.write(status.encode('utf-8'))
        f.close()
    except Exception, e:
        if log:
            log.warning('cannot write status into file: "%s"', filename)
    else:
        if log:
            log.info('status written into file: "%s"', filename)
        


src/m/k/mksbackup-1.0.4/mksbackuplib/main.py   mksbackup(Download)
from datetime import datetime, timedelta
 
from archiver import boolean, check_mail_config, Destinations, sendmail, Manager, send_mail_report, write_status, ftp_url_re
 
import cron
 
            if cmd_options.statusdir:
                write_status(status, cmd_options.statusdir, job['name'])
 
            continue
                errmsg=sendmail(job, subject, msg_body, attachments, manager.log, 'err')
                if cmd_options.statusdir:
                    write_status(status, cmd_options.statusdir, job['name'])
 
            continue
 
            if cmd_options.statusdir:
                write_status(status, cmd_options.statusdir, job['name'])
 
        else:
 
                if cmd_options.statusdir:
                    write_status(result[1], cmd_options.statusdir, job['name'])
 
                errmsg=send_mail_report(job, result, manager)