some python3-friendly syntax. still no img module.