if(widgetStylesPrinted != true) {document.write('');}var widgetStylesPrinted = true;var content = '
import osimport time source = 'F:\\\\PJ\\PythonPJ' target_dir = 'F:\\\\PJ\\backup' target = target_dir + os.sep + time.strftime('%Y%m%d%H%M%S') + '.zip' zip_command = "zip -qr".format(target, ' '.join(source)) if os.system(zip_command) == 0: print('Successful backup to', target)else: print('Backup FAILED')