python-ifcfg icon indicating copy to clipboard operation
python-ifcfg copied to clipboard

WindowsParser support for _default_interface

Open PaluMacil opened this issue 7 years ago • 5 comments

_default_interface throws an attribute exception on Windows. I'm only a hobbyist in Python (work is C#) so I could be missing something, but it looks like this is only implemented for Unix. It also looks fairly easy to add. If I'm not misunderstanding anything, I'd like to make a pull request. I'm using your library for observing Raspberry Pis I'll register to my home network, but I figure I might as well use Windows to test so that I can make the library better for cross-compat cases.

PaluMacil avatar May 03 '18 21:05 PaluMacil

There are challenges on Windows indeed! Your input is most welcome!

benjaoming avatar May 03 '18 22:05 benjaoming

If you know things that are missing in Windows and make an issue (or issues) listing them with help wanted tags, I'm sure people would start picking them up. For the usefulness of this library, it doesn't seem that complicated to develop new features.

PaluMacil avatar May 04 '18 03:05 PaluMacil

To clarify my plans, I am using more Python now (primary language at work), but I have not had any need for this feature on Windows yet since I've been even more rarely on Windows machines. However! It looks like @dogwynn made a PR that resolves this request for Windows. I can certainly close this if there is nothing else needed here.

PaluMacil avatar Sep 04 '21 15:09 PaluMacil

@PaluMacil all contributions are welcome! I don't run Windows so I have no idea what specific issues can be. But I would say that localization of the ipconfig command seems to be the major issue, and then probably some flags from ifconfig aren't fully implemented.

I've just release #56 in 0.22

benjaoming avatar Sep 05 '21 23:09 benjaoming