Thanks, with sendall it works nicely.
But when I try the reverse flow(that is, Racket to Python) making:
;...
(display "Hello" s-out)
;or with 'print
Python doesn't read with
recv(500)
it locks the terminal...
Sorry for the increasin asks :)
El 2014-04-23 23:32, Antonio Menezes Leitao escribió:
Hi,
On Wed, Apr 23, 2014 at 9:00 PM, Alejandro Zamora Fonseca
<ter...@ltu.sld.cu> wrote:
When I do:
1)Write this code: in Dr. Racket:
#lang racket
(define server (tcp-listen 12345))
(define-values (s-in s-out) (tcp-accept server))
2)Ctrl+R
- DrRacket waits(lock the REPL) for connections
3)Write this code in python:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('localhost', 12345))
- DrRacket unlock the REPL
4)s.send("hello") #in Python
Use sendAll instead of send and include an end-of-line in the string.
Best,
António.
--
Este mensaje le ha llegado mediante el servicio de correo electronico que
ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema
Nacional de Salud. La persona que envia este correo asume el compromiso de usar
el servicio a tales fines y cumplir con las regulaciones establecidas
Infomed: http://www.sld.cu/
____________________
Racket Users list:
http://lists.racket-lang.org/users