stop using deprecated sys module