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 sends the FIRST word only "This" and skips th
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)
>
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
a
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
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 dat
Hey guys,
I´ve got a problem importing a file with os.chdir. I´ve done a lot of research
but still I can´t fix it. For any suggestions I would be so thankful!
This is what I´ve tried so far:
import os
import numpy as np
import matplotlib.pyplot as plt
os.chdir('C:\Users\Ayla\Documents\Uni\Mas
What are you actually trying to do?
os.chdir() simply changes the current working directory of your process. It
doesn't read any data or "import" or really have any affect on its own. The
current directory is the directory you ran the script from in the first
place, which is where files will be op
Re: ">> Neither i like how a function magically turns into a generator if the
>> keyword `yield` appears somewhere within its definition.
> I agree, there should have been a required syntactic element on the "def"
> line as well to signal it immediately to the reader. It won't stop me from
> usi
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"))
> >>
> >>
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 s
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 example:
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 example
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 messag
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 but
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() fro
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 thinking
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
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 th
Hi,
Bit of a long shot! I am looking for remote work and like the look of Python.
I am an Australian, with a degree in Commercial computing, with 15 years using
Delphi in a business environment.
I am looking for a company to X train me to Python remotely, or maybe even a
remote Python develope
Maybe add your field
web? data science? machine learning? automation? computer vision? ...
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
The colon was the solution, thanks.
--
https://mail.python.org/mailman/listinfo/python-list
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
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 b
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 lot
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"))
> >
>
>
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 w
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 ment
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 y
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 = input
I assiduously avoided using Python's logging package for about the
first dozen years of its existence. I eventually gave in and started
using it relatively recently in the guise of a thin wrapper provided
by a colleague at work. Today I had occasion to tweak the timestamp
format only to discover th
On lun., avril 1, 2019 at 6:00 PM, python-list-requ...@python.org wrote:
On Sun, Mar 31, 2019 at 1:09 PM Alexey Muranov
wrote:
On dim., Mar 31, 2019 at 6:00 PM, python-list-requ...@python.org
wrote:
> On Sat, Mar 30, 2019, 5:32 AM Alexey Muranov
>
> wrote:
>
>>
>> On ven., Mar 29,
On 29Mar2019 09:32, DL Neil wrote:
How do you keep, use, and maintain those handy snippets, functions,
classes... - units of code, which you employ over-and-over again?
Having coded 'stuff' once, most of us will keep units of code,
"utilities", which we expect will be useful in-future (DRY pri
On 4/1/19, grossmu...@gmail.com wrote:
>
> os.chdir('C:\\Users\\Ayla\\Documents\\Uni\\Master_Umweltingenieurwesen\\
> Study_Project\\kerschbaum_input')
> os.chdir('C:/Users/Ayla/Documents/Uni/Master_Umweltingenieurwesen/
> Study_Project/kerschbaum_input')
These string literals should work if the
Gidday Cameron,
Thanks for this - some thoughts below:-
On 2/04/19 11:57 AM, Cameron Simpson wrote:
On 29Mar2019 09:32, DL Neil wrote:
How do you keep, use, and maintain those handy snippets, functions,
classes... - units of code, which you employ over-and-over again?
Having coded 'stuff' o
On Tue, Apr 2, 2019 at 11:16 AM DL Neil wrote:
> One of the points which intrigue me is that my colleagues don't keep
> snippets/a library, preferring to remember (hah!) when/where they used
> particular techniques in the past, and copying/duplicating, to fit the
> new system's requirements. Am wo
On 02Apr2019 13:14, DL Neil wrote:
On 2/04/19 11:57 AM, Cameron Simpson wrote:
On 29Mar2019 09:32, DL Neil wrote:
Do you 'keep' these, or perhaps next time you need something you've
'done before' do you remember when/where a technique was last
used/burrow into 'history'?
(else, code it from
As classes get more complex, it is good to call a function to do some of
the processing, and make the code easier to follow. My question is how
to do that? I've attached some silly code to illustrate the point. The
error is: name 'validScale' is not defined. Well, yes it is, but maybe
not t
> On Apr 1, 2019, at 7:02 PM, Dave wrote:
>
> As classes get more complex, it is good to call a function to do some of the
> processing, and make the code easier to follow. My question is how to do
> that? I've attached some silly code to illustrate the point. The error is:
> name 'validS
On 4/1/19 10:02 PM, Dave wrote:
def validScale(self, scaleName):
if scaleName.upper == 'F' or 'C' or 'K':
return True
else:
return False
def convertTemp(self):
""" Converts temperature scale if scales valid."""
if v
On 2/04/19 1:25 PM, Chris Angelico wrote:
On Tue, Apr 2, 2019 at 11:16 AM DL Neil wrote:
One of the points which intrigue me is that my colleagues don't keep
snippets/a library, preferring to remember (hah!) when/where they used
particular techniques in the past, and copying/duplicating, to fit
On 4/1/19 10:12 PM, Irv Kalb wrote:
On Apr 1, 2019, at 7:02 PM, Dave wrote:
As classes get more complex, it is good to call a function to do some of the
processing, and make the code easier to follow. My question is how to do that?
I've attached some silly code to illustrate the point. T
On 4/1/19 10:02 PM, Dave wrote:
As classes get more complex, it is good to call a function to do some of
the processing, and make the code easier to follow. My question is how
to do that? I've attached some silly code to illustrate the point. The
error is: name 'validScale' is not defined.
On 01Apr2019 22:02, Dave wrote:
As classes get more complex, it is good to call a function to do some
of the processing, and make the code easier to follow. My question is
how to do that? I've attached some silly code to illustrate the
point. The error is: name 'validScale' is not defined.
On Tue, Apr 2, 2019 at 1:21 PM DL Neil wrote:
> > Sometimes, I recollect and reference, which creates some very weird
> > interdependencies until I get around to refactoring...
>
> but some fairly hairy "technical debt" meantime?
>
>
> > https://github.com/Rosuav/MegaClip/blob/master/deviquotes.py
On 4/1/19 10:29 PM, Cameron Simpson wrote:
On 01Apr2019 22:02, Dave wrote:
As classes get more complex, it is good to call a function to do some
of the processing, and make the code easier to follow. My question is
how to do that? I've attached some silly code to illustrate the
point. The
On 2/04/19 1:56 PM, Cameron Simpson wrote:
On 02Apr2019 13:14, DL Neil wrote:
On 2/04/19 11:57 AM, Cameron Simpson wrote:
On 29Mar2019 09:32, DL Neil wrote:
Do you 'keep' these, or perhaps next time you need something you've
'done before' do you remember when/where a technique was last
used
46 matches
Mail list logo