Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python: 2.7.3
- Flask: 0.9
- from __future__ import with_statement
- from flask import Flask, request, session, g, redirect, url_for,
- abort, render_template, flash, views
- from sqlite3 import dbapi2 as sqlite3
- from contextlib import closing
- from apscheduler.scheduler import Scheduler
- sched = Scheduler()
- sched.add_interval_job(moveAllCars, seconds = 5)
- sched.start()
- def moveAllCars():
- print "debug 1"
- dbCommand = g.db.execute('SELECT CarID FROM Car')
- print "debug 2"
- #and so on
- from os import getcwd
- import logging
- logging.basicConfig(
- filename=''.join([getcwd(), '/', 'log_file_name']),
- level=logging.DEBUG,
- format='%(levelname)s[%(asctime)s]: %(message)s'
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement