-1

I'm trying to rewrite python script from python 2.7.x on raspbian stretch to python 3.9.x on raspbian bullseye and i already check what python modules and all deb packages related to python are installed on stretch.

so original script is starting like that :

import socket, struct, fcntl, subprocess, sys, time, os, IN, pygame
from random import randrange

I already manage to find and change all other modules names to correspond python3 but I still can not find a proper module to ---> IN

Can someone help me with this as i'm not a programmer and this is quite new to me.

on Debian stretch where script is installed I already checked all python packages with dpkg -L|grep python and i installed a proper ones for python3 on bullseye. I also done pip list and pip freeze to check what modules are in debian strech to install all in debian bullseye but now bullseye have same modules and i still can not run this script :(

line 1, in import socket, struct, fcntl, subprocess, sys, time, os, IN, pygame ModuleNotFoundError: No module named 'IN'

thx for any help

ToS
  • 1
  • 1
  • 1
    Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Mar 14 '22 at 18:33

1 Answers1

0

so i located this module in debian stretch by using some script to find python module that i found on stackoverflow

import IN
print(IN.__file__)

and the results is :

# python find_module.py 
/usr/lib/python2.7/plat-arm-linux-gnueabihf/IN.pyc

and now i don't know how to install something like this IN.pyc in to python3 as I can not find something like that for python3.

I assume that this was a part of python2.7 installation and now it is not included in python3 right ?

ToS
  • 1
  • 1