nMustaki / debinterface

A simple Python library for dealing with the /etc/network/interfaces file in most Debian based distributions.
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

AttributeError: 'module' object has no attribute 'Interfaces' #6

Closed underdpt closed 8 years ago

underdpt commented 8 years ago

Hi,

I'm trying to use your debinterface fork, but am facing an error:

Python 2.7.3 (default, Jun 20 2016, 16:18:47)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import debinterface
>>> adapters = debinterface.Interfaces().adapters
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Interfaces'
>>>

I'm using python 2.7.3 on raspbian, but also happens on windows (with test interfaces.txt file).

underdpt commented 8 years ago

I found it:

from debinterface.interfaces import Interfaces

and then

adapters = Interfaces.adapters

I think the README should be updated.

nMustaki commented 8 years ago

You're completly right, I must create a real documentation !

/ * "What do you despise? By this you are truly known." * from Manual of Muad'Dib by the Princess Irulan. /

On Wed, Oct 26, 2016 at 1:14 PM, underdpt notifications@github.com wrote:

I found it:

from debinterface.interfaces import Interfaces

and then

adapters = Interfaces.adapters

I think the README should be updated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nMustaki/debinterface/issues/6#issuecomment-256317853, or mute the thread https://github.com/notifications/unsubscribe-auth/AA-fUQDSV--xBzo3vxbHIemqPjiPpCpCks5q3zYxgaJpZM4KhCdY .

nMustaki commented 8 years ago

Documentation is now pushed to Read the doc and class can be imported like the example. Just have to complete the doc now ;-)