@get('/task/new')
def task_new():
 taskid = hexencode(os.urandom(8))
 remote_addr = request.remote_addr
 DataStore.tasks[taskid] = Task(taskid, remote_addr)
 logger.debug(("Created new task: '%s'" % taskid))
 return jsonize({'success': True, 'taskid': taskid})

@ get ( '/task/new' ) def task_new ( ) : taskid = hexencode ( os . urandom ( 8 ) ) remote_addr = request . remote_addr DataStore . tasks [ taskid ] = Task ( taskid , remote_addr ) logger . debug ( ( "Created new task: '%s'" % taskid ) ) return jsonize ( { 'success' : True , 'taskid' : taskid } )
create new task id .