On 06/11/2019 11:42, Rhodri James wrote:
On 06/11/2019 09:51, Spencer Du wrote:
On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote:
On 05/11/2019 18:33, Spencer Du wrote:
I want to execute at least two python files at once when imported but
I dont know how to do this. Currently I
On 06/11/2019 09:51, Spencer Du wrote:
On Tuesday, 5 November 2019 19:44:46 UTC+1, Rhodri James wrote:
On 05/11/2019 18:33, Spencer Du wrote:
I want to execute at least two python files at once when imported but
I dont know how to do this. Currently I can only import each file one
after
would you want to do this? What
exactly does "at the same time" mean here?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 04/11/2019 22:23, Peter J. Holzer wrote:
On 2019-11-04 14:54:23 +, Rhodri James wrote:
On 04/11/2019 14:33, Veek M wrote:
__metaclass__ = whatever; # is python2.x syntax
But not Python3: see PEP 3115
Doesn't "X is python2.x syntax" imply "X is not python3 syntax"
for the True result. Logically the
problem must be to do with your MyzMeta class then. I have no idea what.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
MyMeta.__instancecheck__(). The
isinstance() still returns True, though, and I don't know why. Then
again, your definition of MyMeta is really weird.
f = Foo()
b = Bar()
print(isinstance(f, (Bar, Foo)))
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python
ement the reference count"
existed.Thank you.
Could cause some interresting "the object has disappeared!" problems when
you're not carefull with it though ... :-)
Yes, it can. That's why you want to create a finalizer to tidy up.
--
Rhodri James *-* Kynesim Ltd
--
https://mai
count. This won't automatically
delete the reference from the WeakSet when the instance goes away,
you'll want to set a finalizer for that, but the documentation covers
what you want to know fairly clearly. Trust me, I was doing exactly
this a week or so ago, and it's pretty straightfo
On 01/11/2019 17:07, MRAB wrote:
On 2019-11-01 12:36, Rhodri James wrote:
On 31/10/2019 20:14, MRAB wrote:
On 2019-10-31 18:46, ferzan saglam wrote:
The code below which I have written should print the result of 43.6
with the given values I have included at the end of this question
n Python3. So my first
piece of advice would be to switch to Python3 now so you don't have to
re-learn oddities like input(), print() and string handling.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
James Gerity added the comment:
Cheers for the additional context. My recommendation would be to change the
language to avoid confusion with the consortium's formal specifications.
Describing what SRE does should be fine:
> Matches any alphanumeric Unicode character, as w
New submission from James Gerity :
The documentation for the `re` library¹ describes the behavior of the specifier
'\w' as matching "Unicode word characters," which is very vague. The closest
thing I can find that corresponds to this language is the guidance offered in
Unicode
ich indicates that I too shouldn't consider using black!)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
many and varied ways of coming back to bite you?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 15/10/2019 12:38, Antoon Pardon wrote:
On 11/10/19 15:48, Rhodri James wrote:
On 10/10/2019 12:40, Antoon Pardon wrote:
About including piped iterators:
http://code.activestate.com/recipes/580625-collection-pipeline-in-python/
On 10/10/19 13:00, Paul Moore wrote:
As another measure
On 11/10/2019 15:13, Prabakaran Hadoop wrote:
Thanks for your reply. Any work around or any other way to achieve from python
to prestosql .
If there is, it'll be in the GitHub issue I linked to. I just applied
Google to your question.
--
Rhodri James *-* Kynesim Ltd
--
https
line means in particular. It's exactly like
coming across an unusual phrasing or iffy grammar in a piece of writing;
you get thrown out of the reading experience by having to concentrate on
the individual words.
Heh. Literary criticism as applied to programming. Only in Python...
--
Rhodri James
d not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error
in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a
callback: 2'
I am trying to connect from windows 10 local to Prestodb in AWS.
There is an o
be more enthusiastic.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
New submission from James Allsopp :
Hi,
I like to build my Url's using url unparse, e.g.
site_to_test = urllib.parse.urlunparse((scheme, host, page, '', '', ''))
r = requests.get(site_to_test)
However, we reach a lot of sites through SSH tunnels, as our network is heavily
locked down
I would use IPython as a scripting language. It has a slow startup time
though.
On Thu, Oct 3, 2019 at 9:59 AM Chris Angelico wrote:
> On Thu, Oct 3, 2019 at 11:41 PM Hongyi Zhao wrote:
> >
> > On Thu, 03 Oct 2019 23:12:45 +1000, Chris Angelico wrote:
> >
> >
> > > Seems fine. Most of the code
d to a real object.
Concrete may not be the best term for this, but I can't think of a
better one.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
Change by James Abel :
--
keywords: +patch
pull_requests: +16122
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16533
___
Python tracker
<https://bugs.python.org/issu
New submission from James Abel :
In activate.bat, the else needs to be on the same line as the if
--
components: Windows
messages: 353722
nosy: James Abel, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: activate.bat else needs
- 1)
instance = Dummy()
instance.factorial(3)
6 # correct
So, to summarize, if you create a class with type(name, bases, dict_)
or with the "class" keyword, recursive methods can't be writen
in the same way. This is what puzzle me.
On the contrary, recursive methods are written in exactly the same wa
r directory
cat "concatenates files" to quote its man page. Does that mean it
creates them if they don't exist, just because I typed the name into the
command? No. I wouldn't expect it either. In exactly the same way I
don't expect a concrete file*name* to necessarily refer t
fib(...) instead of fib(self, ...) both times.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 26/09/2019 15:35, Oscar Benjamin wrote:
On Thu, 26 Sep 2019 at 13:39, Rhodri James wrote:
You have returned the class object, not
an instance of anything,
Well object is an instance of object as well as of type:
Fair point. I keep forgetting that.
--
Rhodri James *-* Kynesim Ltd
but not so many that you overwrite what you
want to keep. Working out how many spaces that is for any given message
could be quite tedious. You may well find it easier to lcd.clear() the
whole display and rewrite everything when you want to change anything.
Anyway, I hope that helps.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ates
that "The return value of __new__() should be the new object instance
(usually an instance of cls)". You have returned the class object, not
an instance of anything, so on the whole it's lucky that
object.__init__() does nothing!
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
be nice:
I would like to avoid the extra steps writing an reading extern files.
subprocess is your friend here. Something like:
[snip myself]
You can also use the io.StringIO class of the stdlib, which is more suitable
for this use case.
Not for running external tools, surely?
--
Rhodri James
ey produce, and the overlap isn't as big as you would hope. Making
chip design simpler would certainly help.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
=True)
return latex.output
The above is completely untested and not in the least bit robust, but
that's the area of the standard library you should be looking at.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
further off-list using
"JamesBTobin (at) Gmail (dot) Com". Kind regards, James
--
https://mail.python.org/mailman/listinfo/python-list
into the text of your email, that way we
will get to see them!
(The temptation to say "Use your words" is oh so strong :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
uld have found that worked too.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ssRegistry = my_class_registry
@register(my_class_registry)
def MyFunction(...):
...
Or you may be able to achieve what you want with dir() and some careful
naming?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
how, I've never used it) or delete the "max_rows=1" and accept
the inefficiency.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
not change from one to the other. It's exactly
like "STRING.isnumeric()"; for the same string it will always give the
same answer.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 29/08/2019 16:29, Hongyi Zhao wrote:
On Thu, 29 Aug 2019 14:51:43 +0100, Rhodri James wrote:
When the stream isn't connected to an interactive terminal, obviously.
For example, when it's writing to file.
But I cannot see any thing like this in the code.
I don't understand what's
On 29/08/2019 14:37, Hongyi Zhao wrote:
On Thu, 29 Aug 2019 13:23:07 +0100, Rhodri James wrote:
TLDR: these two lines set up (but don't output) a progress message for
an interactive stream.
Thanks a lot for your deeply notes on this. But, if so, when will the
``else ...'' be executed
rsor is once again at the start of the line, so we can
carry on with "3% complete", "4% complete" and so on.
TLDR: these two lines set up (but don't output) a progress message for
an interactive stream.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 10/08/2019 10:45, Peter J. Holzer wrote:
On 2019-08-10 09:10:12 +1000, Cameron Simpson wrote:
On 09Aug2019 22:28, Paul St George wrote:
On 09/08/2019 16:29, Rhodri James wrote:
(Actually I would probably use outstream.write() and do my own
formatting, but let's not get side-tracked
"Y:", thing[1], file=outstream)
print("Z:", thing[2], file=outstream)
I would probably use the latter, but it's just a matter of personal
preference.
(Actually I would probably use outstream.write() and do my own
formatting, but let's not get side-tracked ;-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
help you figure out what information is available when.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t understand.
Are you saying I should change the first line of code to something like:
|outstream = with open(path to my file,'w') # this is invalid syntax|
and then delete the
outstream.close()
No, you should do what Peter wrote:
with open("/path/to/file", "w") as outstr
ode that returns the data I
am trying to process:
return map(self.doctor_answer, it)
I don't see anything calling imap.
That suggests you aren't calling the code you think you're calling. I
think a little poking with pdb or some strategic prints is in order...
--
Rhodri James *-* Kyne
evaluates to . If it is false, it evaluates to
. In this specific case, "base" is assigned 1024 if "gnu"
or "binary" are true, else it is assigned 1000.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
don't have installed, the documentation coming with the application
should tell you what to install and where to get it from.
If files are genuinely missing from the script folder (wherever/whatever
that is), contact the author of the application.
If all else fails, read the documentation ;-)
--
Rh
Change by Rhodri James :
--
nosy: +Rhodri James, ethan.furman
___
Python tracker
<https://bugs.python.org/issue21705>
___
___
Python-bugs-list mailing list
Unsub
Change by Rhodri James :
--
nosy: +Rhodri James, ethan.furman
___
Python tracker
<https://bugs.python.org/issue9968>
___
___
Python-bugs-list mailing list
Unsub
Change by Rhodri James :
--
nosy: +Rhodri James, ethan.furman
___
Python tracker
<https://bugs.python.org/issue10879>
___
___
Python-bugs-list mailing list
Unsub
Change by Rhodri James :
--
pull_requests: +14841
pull_request: https://github.com/python/cpython/pull/15094
___
Python tracker
<https://bugs.python.org/issue1047
Change by Brandon James :
--
keywords: +patch
pull_requests: +14833
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/15088
___
Python tracker
<https://bugs.python.org/issu
New submission from Brandon James :
When using the ipaddress library, all multicast addresses and networks return
True when using the is_global method for their respective classes. I believe
their are two possible fixes for this.
1) In practice no multicast addresses are globally routable
On 01/08/2019 19:06, Chris Angelico wrote:
On Fri, Aug 2, 2019 at 2:30 AM Rhodri James wrote:
Hi there, Adam!
On 01/08/2019 14:31, adam kabbara wrote:
Hello I am having trouble with tkinter when I enter the command from tkinter
import* I get an error message
What *exactly* did you type
ion of
what you did wrong; if you show us, we can help you get used to
interpreting it for yourself.
Happy coding!
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
New submission from James Xu :
While working on our project, we have noticed that for
`subprocess.Popen(command, ...)`, when `command` is a string that contains
escaped double quote, for example, `command = '"path to executable" --flag
arg'`, this works fine. However, when command
. Accordingly, the PythonVersionError
custom exception/class.
Ah, so you *used* PythonVersionError without importing it. Sorry, but
that's on you.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
[Rearranged and snipped so this makes any kind of sense]
On 16/07/2019 16:43, אורי wrote:
On Tue, Jul 16, 2019 at 3:13 PM Rhodri James wrote:
On 16/07/2019 11:08, אורי wrote:
2. I want to override a function called build_suite in an inherited
class.
The function receives an argument
s of getting away with making no
changes to your code when an API you use changes are rather small.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
__init__(self):
C1.__init__(self) # Whoops, forgot this one
super() also has major advantages if you are stuck with multiple
inheritance. Raymond Hettinger has an excellent article on this here:
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/
--
Rhodri James
])')
print(Starters)
print(Main_Course)
print(Desert)
OUTPUT:
['Fried Calamari', 'Potted crab']
['Fish', 'Meat']
['Cake', 'Banana Split']
If you think you need to do this, you are almost certainly wrong. Ew!
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 14/06/2019 10:32, INJAMUL HOQUE wrote:
...nothing. I'm afraid your email had no content when it reached us.
If you included a screen shot, I'm afraid it was automatically removed
before it reached us.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python
utton. The call to ttk.Checkbutton() is itself a positional
argument in the call to LabelInput, coming after the keyword argument
"input_var = tk.IntVar".
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
it has finished compiling
your program into byte code. There is nothing to run pdb on!
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
ne, the traceback tells you exactly what is
going on.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
that myself ;-)
My question is why people who value and understand old modules don't
volunteer more to help keep them up to date.
As I said (and was apparently misinterpreted), I am considering it.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
that maintaining them wouldn't be a massive effort.
Definitely something to think about.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
were going to disappear I would have to
rewrite it in C or similar.
(No, using something more complex than CGI is not an option. I'm
working on an embedded system, and we're watching our RAM usage
nervously enough already.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mai
On 12/05/2019 07:10, hi wrote:
Sent from Mail for Windows 10
What problem? If you sent a screenshot or similar, please be aware that
the mailing list strips off attachments.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
nto a .txt or .csv file or any other type?
3. How can I append the header on the top of this output file?
Have you looked at the csv module in the standard library?
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
the text from the PDF. You are on
your own for working out how to parse the tables out of that text,
though; the structures in the data you are hoping for simply don't exist.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t tags. That library is imported within a try/except
block.
Most imports I've seen have been for mandatory functionality; while my
current code could run without its CRC library, everything it tried to
talk to would reject its messages, for example!
--
Rhodri James *-* Kynesim Ltd
--
https://mai
James Saryerwinnie added the comment:
I ran into this as well also using the embedded distribution for windows
(https://docs.python.org/3/using/windows.html#the-embeddable-package).
socket.getaddrinfo() will encode unicode hostnames using idna and trigger this
error if you call
and restarting a thread is always going to be a risky business,
and will leave your system less stable. Don't do it unless you have no
choice (and if you think you have no choice, you're probably wrong!).
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
umentation and see if it makes sense for your needs.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
Change by James Socol :
--
nosy: -jamessocol
___
Python tracker
<https://bugs.python.org/issue9883>
___
___
Python-bugs-list mailing list
Unsubscribe:
james stone added the comment:
I encountered this issue as well when using python 3.6.7 and psycopg2. Postgres
tries to sort rows by the primary key field and if the returned type is a
memoryview an the error is thrown: "TypeError: '<' not supported between
instances of 'me
valid,
and frankly I can't be bothered.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
s.send(bytes("PRIVMSG " + channel + " :" + mess + "\n", "UTF-8"))
(Try printing out the line you want to send before sending it, and
compare it with the example commands in the RFC.)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
James Edwards added the comment:
Edit conflict -- indeed -- self closing.
---
I should point out that this could be fixed with something like the following:
@classmethod
def __subclasshook__(cls, C):
if cls is Sequence:
return _check_methods(C, "__rever
James Edwards added the comment:
This was tagged as 3.7, but the issue still exists AFAICT in the latest github
master: https://github.com/python/cpython/blob/master/Lib/_collections_abc.py
--
___
Python tracker
<https://bugs.python.
New submission from James Edwards :
Consider:
from collections.abc import *
class DefinitelyNotAList:
def __init__(self, backer):
self.backer = backer
def __getitem__(self, key):
return self.backer[key]
def __len__(self
it look a lot less magical.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
guarantee to deliver the texts at all. We have had clients
become very unhappy when confronted with the reality of that.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
t to track maybe
_var
or something like that, i want to solve that problem and this is just a
proposal
Sorry, I still don't understand. *What* do you want to mark with
"_var"? It that a comment? A new keyword? Just a leading underscore?
Could you give a full example, plea
so easily the
default.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
for all variables, because I
think you know what the answer to that one will be.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
h I'd hate to be the one trying to
implement it and I imagine it's likely to slow down execution a fair bit.
Under what condition do you want execution halted? At the moment you
haven't been much more specific than "when my program is wrong", which
isn't very helpful.
--
Rhodri J
symbils to mark that.
You sent this to me instead of the list, but never mind. If you want
this, Guido's time machine strikes again. Just use type annotations and
mypy, or pylint or the like for static checking of unexpected variables.
--
Rhodri James *-* Kynesim Ltd
--
https
-*-
# -*- explicit -*-
could be used to prevent it
What exactly would you want "strict" (in whatever form) to do? I'm
guessing, but it sounds like you want more static checking. Usually
that's the province of linters and type annotation, depending on just
what you want.
--
Rh
:)
Fine, you've got me there :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
On 06/03/2019 14:15, Calvin Spealman wrote:
C++ (a language I have no respect for)
This was uncalled for and inappropriate. Please keep discord civil.
That was the civil version :-)
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
shouldn't break your expectations.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
James Edwards added the comment:
It may be worth also addressing the fact that IPv6Network makes no restriction
on it's netmask (when specified as a tuple).
--
nosy: +jedwards
___
Python tracker
<https://bugs.python.org/issue35
On 27/02/2019 21:39, Roel Schroeven wrote:
Rhodri James schreef op 27/02/2019 om 15:18:
Aren't we overthinking this?
I think it's pretty clear that a variable is never deleted before it
goes out of scope. A quick search in the documentation points me to
(https://docs.python.org/3/reference
when mobiles
enter the picture. I'm not convinced it's a completely good idea; a
sensible UI for a desktop probably won't be sensible for a phone and
vice versa
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
en executed, so the reference to the open file must exist for at least
that long.
--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list
201 - 300 of 4053 matches
Mail list logo