Re: Losing words

2019-04-02 Thread John Doe
On 2019-04-01, Paul Rubin wrote: > John Doe writes: >> sendall also is not sending a whole sentence. > > Have you observed that with something like wireshark? > I was about colon ":" before message with a colon a whole message is " before message with a colon a whole message is sent. . >

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Abdur-Rahmaan Janhangeer wrote: > Since this is IRC, you might want to see a demo here: > https://github.com/Abdur-rahmaanJ/honeybot/blob/master/honeybot/main.py Yes. However get these def text() and loop while 1: working together. def text(): while True: mess =

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Rhodri James wrote: > > I'm not an expert, but looking at RFC-1459 it looks like your final > parameter (the message) needs to be preceded by a colon. In other words > you want: > > s.send(bytes("PRIVMSG " + channel + " :" + mess + "\n", "UTF-8")) > > (Try printing out the line

Re: Losing words

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 7:11 AM John Doe wrote: > > On 2019-04-01, Chris Angelico wrote: > > > > Cool. Please don't post context-free messages though - not everyone > > knows that you were talking about IRC. (Part of that is because your > > subject line didn't mention IRC either.) > > > I've

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: > > Cool. Please don't post context-free messages though - not everyone > knows that you were talking about IRC. (Part of that is because your > subject line didn't mention IRC either.) > I've mentioned it in a mother post mate. > If you're going to do a lot

Re: Losing words

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 6:36 AM John Doe wrote: > > On 2019-04-01, Roel Schroeven wrote: > > This is what 'while' is made for: > > > > def text(): > > while True: > > mess = input("> ") > > s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", > > "UTF-8")) > > > >

Re: Losing words

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 6:31 AM John Doe wrote: > > > The colon was the solution, thanks. > Cool. Please don't post context-free messages though - not everyone knows that you were talking about IRC. (Part of that is because your subject line didn't mention IRC either.) If you're going to do a

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Roel Schroeven wrote: > This is what 'while' is made for: > > def text(): > while True: > mess = input("> ") > s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", > "UTF-8")) > see it working thanks, indeed while is powerful, had to add colon to

Re: Losing words

2019-04-01 Thread Abdur-Rahmaan Janhangeer
Since this is IRC, you might want to see a demo here: https://github.com/Abdur-rahmaanJ/honeybot/blob/master/honeybot/main.py Abdur-Rahmaan Janhangeer Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: Losing words

2019-04-01 Thread John Doe
The colon was the solution, thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Losing words

2019-04-01 Thread Roel Schroeven
John Doe schreef op 1/04/2019 om 19:16: On 2019-04-01, Joel Goldstick wrote: def text(): mess = input("> ") s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) text() Is this a typo or are you calling text() from within text()? Indeed I do :-) I was

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: > > Use a loop, not recursion :) > I can guess only you mean: while but I've got no idea while what. -- https://mail.python.org/mailman/listinfo/python-list

Re: Losing words

2019-04-01 Thread MRAB
On 2019-04-01 18:16, John Doe wrote: On 2019-04-01, Joel Goldstick wrote: def text(): mess = input("> ") s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) text() Is this a typo or are you calling text() from within text()? Indeed I do :-) I was

Re: Losing words

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 4:21 AM John Doe wrote: > > On 2019-04-01, Joel Goldstick wrote: > >> > >> def text(): > >> mess = input("> ") > >> s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) > >> > >> text() > >> > > > > Is this a typo or are you calling text()

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Joel Goldstick wrote: >> >> def text(): >> mess = input("> ") >> s.send(bytes("PRIVMSG " + " "+ channel + " " + mess + "\n", "UTF-8")) >> >> text() >> > > Is this a typo or are you calling text() from within text()? >> Indeed I do :-) I was thinking on another way

Re: Losing words

2019-04-01 Thread Grant Edwards
On 2019-04-01, Rhodri James wrote: I'm learning SOCKETS and working with Irc. --- s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) When more than one word ( for example: This is a

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Jon Ribbens wrote: > On 2019-04-01, John Doe wrote: >> I'm learning SOCKETS and working with Irc. >> --- >> s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) >> >> When more than one word ( for

Re: Losing words

2019-04-01 Thread Rhodri James
On 01/04/2019 16:14, John Doe wrote: On 2019-04-01, Chris Angelico wrote: I'm learning SOCKETS and working with Irc. --- s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) When more than one word ( for

Re: Losing words

2019-04-01 Thread Jon Ribbens
On 2019-04-01, John Doe wrote: > I'm learning SOCKETS and working with Irc. > --- > s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) > > When more than one word ( for example: This is a message) > in *message* it

Re: Losing words

2019-04-01 Thread Joel Goldstick
On Mon, Apr 1, 2019 at 11:16 AM John Doe wrote: > > On 2019-04-01, Chris Angelico wrote: > >> > >> I'm learning SOCKETS and working with Irc. > >> --- > >> s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) > >> > >>

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, David Raymond wrote: > https://docs.python.org/3.7/library/socket.html#socket.socket.send > > .send returns the number of bytes that it actually succeeded in sending. From > the docs: "Applications are responsible for checking that all data has been > sent; if only some of the

Re: Losing words

2019-04-01 Thread John Doe
On 2019-04-01, Chris Angelico wrote: >> >> I'm learning SOCKETS and working with Irc. >> --- >> s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) >> >> When more than one word ( for example: This is a message) >> in

RE: Losing words

2019-04-01 Thread David Raymond
https://docs.python.org/3.7/library/socket.html#socket.socket.send .send returns the number of bytes that it actually succeeded in sending. From the docs: "Applications are responsible for checking that all data has been sent; if only some of the data was transmitted, the application needs to

Re: Losing words

2019-04-01 Thread Chris Angelico
On Tue, Apr 2, 2019 at 12:41 AM John Doe wrote: > > I'm learning SOCKETS and working with Irc. > --- > s.send(bytes("PRIVMSG " + channel +" "+ message + "\n", "UTF-8")) > > When more than one word ( for example: This is a message) >