[Tutor] Python code to connect using PPPoE
Hugo González Monteverde
hugonz-lists at h-lab.net
Thu Jan 25 23:24:41 CET 2007
PPPoE is both in the Linux Kernel (for the low level work) and as some
executables and scripts.
It fou want to establish a connection from a Python script (E.G. ehn the
computer has no internet access and you need it) The best way would be
to call the appropriate utilities, and parse their output. This means
calling adsl-connect, ficonfig, and the like, maybe parsing the output
from ifconfig. Take a look at the module named subprocess to do that.
Reimplementing these utilities in Python is some work, but doable.
Implementing PPPoE in Python, reading the device files and all that...
well... it's almost nonsense. For this, you have to use the kernel.
Johan Geldenhuys wrote:
> I want to establish the connection with Python. I think in Linux you can use
> a PPPoE package to make life easier, but I don't want to use the Kernel to
> do that.
More information about the Tutor