python capture