Closed m986883511 closed 1 year ago
Windows may work, but as I don't have any Windows systems to test on, I can't say for sure if it does, or provide much help if it doesn't. At a minimum, getting the DHCP server to work is going to take quite a bit more than you've given there. Look at pypxe.server
for what's needed, or the pypxe
command that gets installed with the module.
PyPXE can used in windows. Turn off firewall and retry.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\****\AppData\Local\Programs\Python\Python311\Lib\site-packages\pypxe\dhcp.py", line 135, in __init__
signal.signal(signal.SIGALRM, self.export_leases)
^^^^^^^^^^^^^^
AttributeError: module 'signal' has no attribute 'SIGALRM'. Did you mean: 'SIGABRT'?
Please put unrelated problems in new issues.
THis is related to the issue, when I tried running dhcp.DHCPD() on windows I got that error.
v1.8.4 moves the signal handling to pypxe.server
. Please update to that. Windows appears to not support SIGALRM
, so you should be able to just comment out registering that signal handler. I don't have a Windows system to test on, so I can't help any further than that.
I want to use in windwos ,but does not effect.
set = { "ip":"10.90.116.248", 'port':8088, } from pypxe import http from pypxe import tftp from pypxe import dhcp dhcp.DHCPD() tftp.TFTPD(set) http.HTTPD(set)
while True: pass