Re: Netstat in python. Does it's possible?

2006-02-13 Thread billie
Thank you all for your helping. -- http://mail.python.org/mailman/listinfo/python-list

Re: Netstat in python. Does it's possible?

2006-02-13 Thread Jorgen Grahn
On Sun, 12 Feb 2006 22:56:06 +0100, Martin v. Löwis [EMAIL PROTECTED] wrote: Jorgen Grahn wrote: I was thinking mostly about /proc, /sys and related file systems. I have a feeling parts of them they change quite frequently under Linux, and of course under other Unices they may look completely

Re: Netstat in python. Does it's possible?

2006-02-12 Thread Cameron Laird
In article [EMAIL PROTECTED], Martin v. Löwis [EMAIL PROTECTED] wrote: Jorgen Grahn wrote: There might still be a problem for people doing things like this: netstat might use unstable or non-public APIs to find the things it lists. This is fine because it's typically your OS vendor who have to

Re: Netstat in python. Does it's possible?

2006-02-12 Thread Jorgen Grahn
On Sun, 12 Feb 2006 01:04:14 +0100, Martin v. Löwis [EMAIL PROTECTED] wrote: Jorgen Grahn wrote: There might still be a problem for people doing things like this: netstat might use unstable or non-public APIs to find the things it lists. This is fine because it's typically your OS vendor who

Netstat in python. Does it's possible?

2006-02-11 Thread billie
Hi all. I don't know if Python is good for this kind of jobs but I'm wondering if it's possible emulate the netstat command in Python. I'd need to know if a certain executable opened a socket and, in that case, I'd like to know what kind of socket it uses (TCP or UDP), its src/dst PORT, and the

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Sybren Stuvel
billie enlightened us with: Hi all. I don't know if Python is good for this kind of jobs but I'm wondering if it's possible emulate the netstat command in Python. On Linux, you can read /proc for that info, iirc. Sybren -- The problem with the world is stupidity. Not saying there should be a

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Martin v. Löwis
billie wrote: Hi all. I don't know if Python is good for this kind of jobs but I'm wondering if it's possible emulate the netstat command in Python. As a general recommendation, use strace(1) to answer this kind of question. Run strace -o tmp netstat, then inspect tmp to find out how netstat

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Jorgen Grahn
On Sat, 11 Feb 2006 16:28:06 +0100, Martin v. Löwis [EMAIL PROTECTED] wrote: billie wrote: Hi all. I don't know if Python is good for this kind of jobs but I'm wondering if it's possible emulate the netstat command in Python. As a general recommendation, use strace(1) to answer this kind of

Re: Netstat in python. Does it's possible?

2006-02-11 Thread Martin v. Löwis
Jorgen Grahn wrote: There might still be a problem for people doing things like this: netstat might use unstable or non-public APIs to find the things it lists. This is fine because it's typically your OS vendor who have to handle that (ship another netstat when the /proc or /sys file system