Second Opinion
Folosind serviciul second opinion ne puteți trimite RMN-uri, CT -uri, angiografii, fișiere .pdf, documente medicale. Astfel vă vom putea da o opinie neurochirurgicală, fără ca aceasta să poată înlocui un consult de specialitate. Răspunsurile vor fi date prin e-mail în cel mai scurt timp posibil (de obicei în mai putin de 24 de ore, dar nu mai mult de 48 de ore). Second opinion – Neurohope este un serviciu gratuit. www.neurohope.ro |
Socketuri in Python pe Windows 7
Last Updated: Apr 17 2014 13:12, Started by
old_jhon
, Apr 17 2014 08:19
·
0
#1
Posted 17 April 2014 - 08:19
Salutare. Incerc sa ma conectez la un server dintr-un script Python pe Windows si primesc eroarea de mai jos. Pe Linux merge OK codul de mai jos.
Codul arata cam asa: s=socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP) ip_address = '192.168.0.2' s.connect((ip_address, 1)) Si eroarea: s.connect((ip_address, 1)) File "<string>", line 1, in connect error: [Errno 10022] An invalid argument was supplied |
#2
Posted 17 April 2014 - 08:30
incearca asa
ip_address = '192.168.0.2' port = 1 s.connect((ip_address, port)) cred ca are legatura cu modul in care declari adresa IP "The simplest way to create addresses is to use the ipaddress.ip_address() factory function, which automatically determines whether to create an IPv4... address based on the passed in value: https://docs.python..../ipaddress.html Edited by Bucifon, 17 April 2014 - 08:46. |
#3
Posted 17 April 2014 - 13:09
Am ramas pe linux, nu are rost sa ma chinui cu Windowsul. Modulul acela ipaddress cred ca este pentru Python 3.4, eu folosesc 2.6 pe Windows. Merci pentru ajutor oricum.
|
#4
Posted 17 April 2014 - 13:12
TCP e SOCK_STREAM, nu RAW.
Windows nu te lasa sa umblii cu socketuri RAW. |
Anunturi
▶ 0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users