@@korntech1445 Hello sir. Thank you for you reply. Yes sir. I meant port lik in https 443 or 8080. I want to get the port address my computer is using. I am able to find the username of my pc with the following codes. import getpass username = getpass.getuser() print(username)
@@md.ruhenhossainbhuiyan7808 I don't think there is a module for that (I'm not aware of it) but you could run an OS command (like netstat) using subprocess module. Check out this link: stackoverflow.com/questions/6338492/python-pipelining-subprocess-in-windows Hope this helps.
thanu
Hello sir. Can you tell me how to get port address?
Hello Ruhen, What do you mean exactly? From which object do you want to extract port address? You mean port like in https 443?
@@korntech1445 Hello sir. Thank you for you reply. Yes sir. I meant port lik in https 443 or 8080. I want to get the port address my computer is using. I am able to find the username of my pc with the following codes.
import getpass
username = getpass.getuser()
print(username)
@@md.ruhenhossainbhuiyan7808 I don't think there is a module for that (I'm not aware of it) but you could run an OS command (like netstat) using subprocess module. Check out this link: stackoverflow.com/questions/6338492/python-pipelining-subprocess-in-windows
Hope this helps.
Thanks very helpful