You can probably also do this with scipy but there is a specific convex optimiser cvxopt that suits this problem.
from cvxopt import solvers, matrix
For your problem suppose you seek $N$ variables $w$, then let $x$ be a vector where the first $N$ elements are $w$ and the latter $N$ elements are slack variables $t$. i.e. $x=[w,t]^T$
For your problem $P = \...