On 12-06-20 11:18 AM, elvis-85...@notatla.org.uk wrote:
On 2012-06-17, Jon Clements wrote:
Whatever you do - *do not* attempt to write your own algorithm.
very true
As "they" say, random number generation is too important to be left
to chance. :-)
--
D'Arcy J.M. Cain | Democrac
On Wed, 12 Sep 2012 14:56:12 +0200
Jabba Laci wrote:
> This will call the 2nd function. Now my functions are called step_ID
> (like step_27(), step_28(), etc.). How to avoid the danger of
> redefinition? Now, when I write a new function, I search for its name
> to see if it's unique but there must
On Wed, 12 Sep 2012 18:56:46 +0200
Jabba Laci wrote:
> (5) install mc
>
> You can type just "5" as user input and step_5() is called
> automatically. If I use descriptive names like install_java() then
> selecting a menu point would be more difficult. And I don't want users
> to type "java", I wa
On Wed, 12 Sep 2012 16:37:11 -0400
Terry Reedy wrote:
> assures one that the test is being run. (I don't always test first, but
> I once discovered a test not being run when I modified it in a way that
> should have made it fail, but it didn't.)
1. Write the test
2. Run the test - make sure it
On Wed, 12 Sep 2012 18:04:51 GMT
Alister wrote:
> No No NO!
> you cant just pass user input to system calls without validating it first
> (google sql injection for examples of the damage unsanitised input can
> cause, it is not just as SQL problem)
http://xkcd.com/327/
--
D'Arcy J.M. Cain
On Wed, 12 Sep 2012 17:45:52 -0500
Tim Chase wrote:
> On 09/12/12 16:47, D'Arcy Cain wrote:
> > And run all of your tests every day. You will sleep better at night.
>
> Though I usually try to do test-driven development, I confess a
> fondness for Titus Brown's
On Tue, 25 Sep 2012 08:44:18 +0100
Mark Lawrence wrote:
> On 25/09/2012 06:07, Thomas Rachel wrote:
> > Am 25.09.2012 04:37 schrieb Dwight Hutto:
[...usual nonsense]
> someone had the audacity to protect his stance. I am sure that people
> have seen enough of his behaviour in the last few hours
On Fri, 28 Sep 2012 06:57:28 -0400
Roy Smith wrote:
> > I've seen both shebang lines to run a Python script on a *nix host:
> >
> > #!/usr/bin/env python
> > #!/usr/bin/python
> >
> > What's the difference?
>
> The first one looks through your PATH to find the right python
> interpreter to run
On 03/28/12 16:12, John Ladasky wrote:
I'm looking for a Python (2.7) equivalent to the Unix "cp" command.
Since the equivalents of "rm" and "mkdir" are in the os module, I
figured I look there. I haven't found anything in the documentation.
I am also looking through the Python source code in os
On 04/08/12 09:11, HoneyMonster wrote:
Well, I certainly shall not be reading - or even seeing - any more of his
drivel.
Yes you will. There is always someone willing to include his entire
messages for a one line reply.
It's always September somewhere.
--
D'Arcy J.M. Cain | Democra
On 12-05-09 01:52 PM, Rob Richardson wrote:
I am trying to work with a Python script someone else wrote. The script
includes the line
from Level3Utils import *
I need to look at the functions that are included in that import. In an effort
to identify exactly which file is being used,
On 12-05-26 05:32 PM, Paul Rubin wrote:
Roy Smith writes:
It sounds like I can run one on 300mA @ 5V. For my application, I'll
have about 10 A-h available at 12V (motorcycle battery).
OK, the RPi should be fine power-wise in that case, though I wouldn't
consider something with a 10AH motorcy
On 12-06-12 06:36 AM, Gilles wrote:
I enjoy writing scripts in Python much more than PHP, but with so many
sites written in PHP, I need to know what major benefits there are in
choosing Python (or Ruby, ie. not PHP).
I think that you just answered your own question in the first line of
that par
On 12-06-12 07:57 PM, Gilles wrote:
On Tue, 12 Jun 2012 07:42:56 -0400, D'Arcy Cain
wrote:
I guess I am in the minority then. I do plan to turn one of my larger
projects into a standalone web server some day but so far writing
simple Python CGI scripts has served me fine. I even do
On 09/19/2017 03:07 AM, Steven D'Aprano wrote:
How relevant is the "people use calculators to do arithmetic" argument
today? Okay, so I'm old and cynical, but I know [young] people who
don't (can't?) calculate a gratuity without an app or a web page.
Which is a form of calculator. People still
On 09/19/2017 06:46 AM, Larry Martell wrote:
True story - the other day I was in a store and my total was $10.12. I
One time I was at a cash with three or four items which were taxable.
The cashier rung each one up and hit the total button. She turned to me
and said something like "$23.42 pl
On 09/29/2017 03:15 AM, Steve D'Aprano wrote:
"Carefully-designed experiments" -- yeah, that is so totally how the coders I've
worked with operate *wink*
I think that's an awfully optimistic description of how the average programmer
works :-)
Better not hire average programmers then. I do "Ca
On 10/05/2017 05:42 PM, Fetchinson . via Python-list wrote:
On 10/5/17, Chris Angelico wrote:
On Fri, Oct 6, 2017 at 8:06 AM, Fetchinson . via Python-list
wrote:
import mystuff
mystuff.some_more_expensive_stuff( x )
del mystuff
del x
You're not actually deleting anything.
On 12/05/2017 07:33 PM, nick.martinez2--- via Python-list wrote:
I have a question on my homework. My homework is to write a program in which
the computer simulates the rolling of a die 50
times and then prints
(i). the most frequent side of the die
(ii). the average die value of all rolls.
I wr
On 12/29/2017 02:25 PM, Chris Angelico wrote:
>> PHP also added goto to a later version.
>
> Ahh, great choice of example. "It's okay - PHP does it."
I thought that that was a reason to not do it.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da.
On 01/09/2018 07:30 AM, Steven D'Aprano wrote:
> If you have a class with only data, and you access the attributes via the
> instance's __dict__, why not use an ordinary dict?
Or even subclass dict.
class MyClass(dict):
VAR = 5
m = MyClass()
m['newvar'] = "Something"
I do this and wrap thing
On 01/29/2018 01:43 PM, John Ladasky wrote:
> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet forever.)
>
> What's a... modem?
On 02/11/18 06:30, Victor Porton wrote:
> What is more pythonic?
>
> 1. Create its subclass PredicateParserWithError and add the additional field
> on_error to this class.
>
> 2. Add on_error field to the base class, setting it to None by default, if
> the class's user does not need this field.
A recent post by Terry Jan Reedy got me thinking about formatting. I
like the new(ish) format method for strings and I see some value in F
strings but it only works well with locals. Anything more starts
getting messier than format() and it is supposed to be cleaner. Also, I
find that I tend to
On 02/15/18 02:56, Peter Otten wrote:
>> class FSTR(str):
>> def __call__(self, *args):
>> return self.format(*args)
>>
>> And here is how it could be used.
>>
>> s = FSTR("ABC {1} {0} {2[x]}")
>
> This can be simplified to
>
> s = "ABC {1} {0} {2[x]}".format
Hmm. Hadn't thought of that.
On 2022-08-07 21:38, Paul Bryan wrote:
Have you tried turning it off and back on again?
Thank you, Roy.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da...@vybenetw
On 2021-03-06 4:24 p.m., Terry Reedy wrote:
Trolling, among other things, is fishing with a moving line, especially
with a revolving lure, as from a moving boat. A troll, among other
things, is that method or the lure used.
You are confusing "troll" with "trawl"
--
D'Arcy J.M. Cain
Vybe Netw
On 2021-03-26 12:42 p.m., Igor Korot wrote:
On top of that - usual stanza applies:
1. OS - Windows, Linux, Mac?
2. OS version?
3. Python version?
4. Are you able to run python interpretor?
5. Socks version you are trying to install?
6. Was install successful?
7. Use a subject that describes th
Given that mailman still runs under 2.7 and that's being deprecated, does
anyone have a suggestion for a replacement?
--
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vybenetworks.com VoIP: sip:da.
On 2016-10-20 08:03 PM, Wildman via Python-list wrote:
Using a direct path to the Python interpreter can cause problems
on some systems because it is not always installed to the same
directory. On my Debian-based system Python is installed in
/usr/bin. So your code as written will not run on my
On 2016-10-27 03:05 AM, Terry Reedy wrote:
When I used unix in the 1980s, the full screen ran csh until one started
another full screen application. MSDOS was the same. Every contemporary
photo of modern Linux or Mac I have seen has a desktop with windows just
like Windows. Do people on Linux s
On 2016-10-27 07:33 AM, jmp wrote:
On 10/27/2016 12:22 PM, pozz wrote:
(blocking) thread. The blocking function read returns *immediately* when
all the bytes are received. And I think during blocking time, the
thread isn't consuming CPU clocks.
Threads do consume CPU clocks.
Sometimes they
On 2016-11-01 01:23 AM, Ben Finney wrote:
Wildman via Python-list writes:
So the way your script was invoked has no bearing on whether Bash will
get involved in what your script does. Your script is *directly*
invoking programs, and if you don't ask for a shell to be involved you
won't get it.
Release 5.0.3 of PyGreSQL.
It is available at: http://pygresql.org/files/PyGreSQL-5.0.3.tar.gz.
If you are running NetBSD, look in the packages directory under databases.
There is also a package in the FreeBSD ports collection.
Please refer to the changelog.txt file for things that have changed
On 2016-12-15 12:06 PM, Steve D'Aprano wrote:
I have about a million or two keys, with a few hundred or perhaps a few
thousand distinct values. The size of each contiguous group of keys with
the same value can vary from 1 to perhaps a hundred or so.
There isn't enough info in your post to be su
On 2016-12-16 10:11 AM, Grant Edwards wrote:
I didn't notice much spam on c.l.p (but then again, I filter out all
posts from google-groups). The problem on c.l.p that caused me to
Yes, blocking GG was the biggest improvement to my reading this list
(mailing list in my case). That and a few j
On 2016-12-16 08:16 PM, Dennis Lee Bieber wrote:
Unfortunately, my client can only "pre filter" on subject and author; I
could kill all @gmail.*, but could not focus on just Google Groups
submissions...
I don't know what client you use but perhaps you can adapt this procmail
recipe.
Deborah - please trim your quoted text.
On 2017-01-04 04:32 AM, Deborah Swanson wrote:
Thanks, Steven. Yes, of course if you want to print strings you must
enclose them in quotes. I think you learn that in Week 1 of any
introductory course on Python.
Closer to minute one. When I investigated
On 2017-01-04 08:44 AM, Rodrigo Bistolfi wrote:
2017-01-04 7:39 GMT-03:00 Steve D'Aprano :
Aside: you've actually raised a fascinating question. I wonder whether
there
are any programming languages that understand URLs as native data types, so
that *source code* starting with http:// etc is unde
On 2017-01-04 05:58 PM, Deborah Swanson wrote:
the user to go and authenticate, you can simply
webbrowser.open("http://.../";) and it'll DTRT.
Thank you, thank you! Finally, at least one person on this list knows
about something (anything) in the python world that is internet aware.
Lots
On 2017-01-04 07:07 PM, Deborah Swanson wrote:
D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM
In all the messages in this thread I still don't understand what this
"teensy advantage" is supposed to be. Do you want to be able
to do this:
make_web_link(htt
On 2017-01-04 08:44 AM, Rodrigo Bistolfi wrote:
> 2017-01-04 7:39 GMT-03:00 Steve D'Aprano :
>> Aside: you've actually raised a fascinating question. I wonder whether
>> there
>> are any programming languages that understand URLs as native data types, so
>> that *source code* starting with http://
Deborah - please trim your quoted text.
On 2017-01-04 04:32 AM, Deborah Swanson wrote:
> Thanks, Steven. Yes, of course if you want to print strings you must
> enclose them in quotes. I think you learn that in Week 1 of any
> introductory course on Python.
Closer to minute one. When I investigat
On 2017-01-04 05:58 PM, Deborah Swanson wrote:
>> the user to go and authenticate, you can simply
>> webbrowser.open("http://.../";) and it'll DTRT.
>
> Thank you, thank you! Finally, at least one person on this list knows
> about something (anything) in the python world that is internet aware.
On 2017-01-04 07:07 PM, Deborah Swanson wrote:
> D'Arcy Cain wrote, on Wednesday, January 04, 2017 5:03 AM
>> In all the messages in this thread I still don't understand what this
>> "teensy advantage" is supposed to be. Do you want to be able
>>
I thought I was done with this crap once I moved to 3.x but some
Winblows machines are still sending what some circles call "Extended
ASCII". I have a file that I am trying to read and it is barfing on
some characters. For example:
due to the Qu\xe9bec government
Obviously should be "due
On 2017-01-13 05:44 PM, Grant Edwards wrote:
On 2017-01-13, D'Arcy Cain wrote:
Here is the failing code:
with open(sys.argv[1], encoding="latin-1") as fp:
for ln in fp:
print(ln)
Traceback (most recent call last):
File "./load_iff", line 11, in
pri
On 2017-01-27 03:17 PM, bob gailer wrote:
sudo apt-get won't work on Windows. Tell the reader that this is how to
do it in Unix, and show the Windows equivalent.
Actually it doesn't work on Unix either. It only works on Linux.
--
D'Arcy J.M. Cain
System Administrator, Vex.Net
http://www.Vex.N
On 2017-01-27 11:01 PM, Terry Reedy wrote:
This is a run-on sentence, which is to say, two sentences. Change
'suntax,' to 'syntax.' and 'in' to ' In'.
^^
I can't believe how many typos and grammar errors there are in this
thread by people correcting typos and grammar.
And please don't
I'm not even sure how to describe what I am trying to do which perhaps
indicates that what I am trying to do is the wrong solution to my
problem in the first place but let me give it a shot. Look at the
following code.
class C1(dict):
class C2(object):
def f(self):
return X['field']
On 03/25/2018 04:37 AM, Jugurtha Hadjar wrote:
> On 03/24/2018 07:14 PM, D'Arcy Cain wrote:
>> class C1(dict):
>> class C2(object):
>> def f(self):
>> return X['field']
>>
>> O1 = C1()
>> O1['field'] = 1
>
On 03/25/2018 05:10 AM, Jugurtha Hadjar wrote:
> print("I am {self.__class__.__name__} foo".format(self=self))
Unrelated to the original issue but why not one of the following?
print("I am {0.__class__.__name__} foo".format(self))
print(f"I am {self.__class__.__name__} foo")
--
D'Arcy J
On 03/24/2018 06:54 PM, Steven D'Aprano wrote:
>> On Saturday, March 24, 2018 at 1:20:24 PM UTC-5, D'Arcy Cain wrote:
>>> I tried various forms of super() but that didn't seem to work.
>
> Define "doesn't see to work".
It accesses th
Was "Accessing parent objects."
On 03/25/2018 12:26 PM, Jugurtha Hadjar wrote:
>> print("I am {0.__class__.__name__} foo".format(self))
>
> I prefer keyword arguments, but if I used it that way I'd do:
>
> print("I am {0} foo".format(self.__class__.__name__))
These are contrived examples. In r
It's called a super class but it doesn't quite work like a normal class.
>>> OBJ = object()
>>> OBJ.x = 3
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'object' object has no attribute 'x'
I can fix this by creating a NULL class.
>>> class NullObject(object): pass
...
On 2018-05-10 07:39 AM, AK wrote:
> Try (should work from both PY2 and PY3):
>
> d0 = date(2018,0o2,0o1)
Bad advice. Those numbers are decimal, not octal, You should use
"date(2018,2,1)" here. Works in PY2, PY3 and for my birthday, Sept 4.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.Vy
On 2018-05-10 07:28 AM, Skip Montanaro wrote:
> https://www.python.org/dev/peps/pep-3127/#removal-of-old-octal-syntax
Funny stuff:
Python could either:
1. silently do the wrong thing...
2. immediately disabuse him...
3. let him continue to think...
Some people passionately believe t
On 2018-05-18 06:24 PM, José María Mateos wrote:
> And another one I learned recently on a similar conversation on another
> mailing list (that of the e-mail client I'm using right now): it is very
> useful for searches. Every e-mail contains just the right amount of text
> necessary to be prope
On 2018-06-20 08:10 AM, Tim Golden wrote:
> [... snip discussions about Bart's language ...]
>
> Wearing my moderator hat
>
> Can we take the "Bart's language vs Python Show" to some other forum,
> please? We've already gone over this ground again and again and it isn't
> helping the signal-to-no
$ python2.7 -c "import ctypes.util;
print(ctypes.util.find_library('cairo'))"
libcairo.so.2
$ python3.6 -c "import ctypes.util;
print(ctypes.util.find_library('cairo'))"
None
I have the 3.6 version of py-cairo installed. Any thoughts?
NetBSD 7.1.2
Cheers.
--
D'Arcy J.M. Cain
System Administra
On 2018-07-12 04:17 PM, Terry Reedy wrote:
> On 7/12/2018 3:52 PM, D'Arcy Cain wrote:
>> $ python2.7 -c "import ctypes.util;
>> print(ctypes.util.find_library('cairo'))"
>> libcairo.so.2
>> $ python3.6 -c "import ctypes.util;
>> pri
On 2018-07-12 07:41 PM, Peter Otten wrote:
> Wild guess: one Python is 64 bit and the other is 32 bit, and you have only
> one version of the library installed.
Nope. Both are 64 bit.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetwo
On 2018-07-13 08:05 AM, Peter Otten wrote:
> D'Arcy Cain wrote:
>> Nope. Both are 64 bit.
>
> Just to be 100% sure, what does
>
> $ python2.7 -c 'import struct; print(struct.calcsize("l"))'
>
> $ python3.6 -c 'import struct; print(st
On 2018-07-13 10:28 AM, Peter Otten wrote:
> As far as I can see -- without having access to a netbsd machine -- this
Would it help if I gave you a login on one?
Interestingly, I don't have this issue on my NetBSD machine built from
HEAD. Maybe it is something that was fixed but not pulled up t
On 2018-07-13 05:45 PM, Marko Rauhamaa wrote:
> Yeah, that is cult behavior. Here's a few boxes to tick on:
>
>http://www.csj.org/infoserv_cult101/checklis.htm>
I couldn't find a single item that applies to this group. What's your
point?
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.V
I just realized that my subject was backwards. It's 2.7 that can find
the libs and 3.6 than cannot. Just in case that makes a difference.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
--
https://mail.python.org/mailman/lis
On 2018-07-17 10:22 AM, Peter Otten wrote:
> D'Arcy Cain wrote:
>
>> I just realized that my subject was backwards. It's 2.7 that can find
>> the libs and 3.6 than cannot. Just in case that makes a difference.
>
> Not for me, I believed the pasted shell sessi
On 2018-08-14 03:38 AM, Frank Millman wrote:
> Hi all
>
> Pylint is flagging a lot of lines as errors that I would consider to be
> acceptable.
>
> I have an abstract class ClassA with a number of concrete sub-classes.
> ClassA has a method which invokes 'self.method_b()' which is defined
> separ
On 2018-08-14 04:58 AM, Frank Millman wrote:
> "D'Arcy Cain" wrote in message
>> I am also getting a funny smell from your description. Are you sure
>> that you need to redefine the methods? Perhaps you just need to define
>> some class variables and use o
On 2018-08-18 09:40 PM, Larry Martell wrote:
> https://imgur.com/gallery/tW1lwEl
I think I have met the people who studied those books.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
--
https://mail.python.org/mailman/listin
On 2018-08-23 06:08 AM, Peter via Python-list wrote:
> I understand that Python 3.7 now issues DeprecationWarning for code
> entered in the interactive shell and also for single-module programs. I
> see this behaviour with:
>
> C:\wrk> python
> python 3.7.0 (v3.7.0:...
import imp
> __main__:1
On 09/03/18 09:45, Malcolm Greene wrote:
> Use case: Want to prevent 2+ instances of a script from running ...
> ideally in a cross platform manner. I've been researching this topic and
> am surprised how complicated this capability appears to be and how the
> diverse the solution set is. I've seen
On 09/03/18 09:45, Malcolm Greene wrote:
> Use case: Want to prevent 2+ instances of a script from running ...
> ideally in a cross platform manner. I've been researching this topic and
> am surprised how complicated this capability appears to be and how the
> diverse the solution set is. I've seen
On 9/26/18 3:58 AM, David Palao wrote:
> Hello,
> My opinion is that the terms "master/slave" describe well some situations.
> They could be seen by some people as offensive (although unfortunately
> sometimes true, even today) when applied to persons. But it is not
> offensive when applied to proc
On 10/15/18 5:54 PM, Gregory Ewing wrote:
> Cameron Simpson wrote:
>> I can't express how pleasing it is to see the traditional vi-vs-emacs
>> wars supplanted by emacs-vs-emacs :-)
>
> We're the People's Front of Emacs, not the Emacs People's Front!
I thought we were the People's Emacs Front.
--
On 2019-05-22 03:51, Robin Becker wrote:
> In PEP 594 t has been proposed that cgi & cgitb should be removed. I
> suspect I am not the only person in the world that likes using cgi and
> cgitb.
I use both heavily. Just another data point. I wasn't going to respond
with a "Me too" except that I s
On 2019-06-10 10:48, Michael Torrie wrote:
> Probably you should be using Python 3, which uses a print() function.
> But even in Python 2.7, the recommended way to do this is like this:
>
> fd = open("file","w+")
> with fd:
There is still a small window there if there are asynchronous events
happ
On 2019-06-10 15:46, Alan Bawden wrote:
> D'Arcy Cain writes:
>> with open("file","w+") as fd:
>
> That makes the window smaller, but it doesn't actually eliminate it. Look
> at the generated byte code. In both cases the call to open() is
On 10/18/19 2:21 PM, Jagga Soorma wrote:
I seem to have found a way to do this with the following:
print('{:<12s}{:>12s}'.format((temp_list[0]),(temp_list[3])))
Still let me know if there is a better way to format this output :)
I would start with removing the redundant parens.
print('{:<1
On 10/18/19 5:00 PM, D'Arcy Cain wrote:
Finally, if this is in a loop do this.
FMT = '{0[0]:<12s}{0[3]:>12s}'.format
for temp_list in GetLists(): print FMT(temp_list)
Oops. Time warp. I meant "print(FMT(temp_list))
--
D'Arcy J.M. Cain
Vybe Networks Inc.
htt
On 2020-05-22 7:49 a.m., John Yeadon via Python-list wrote:
> Am I unreasonable in expecting this code to exit when required?
Yes.
> # Add up the powers of 2 starting with 2**0 until 2 million is met.
> n = 1
> target = 200
> sum = 0
>
> while True:
> x = 2 ** (n - 1)
> sum += x
>
On 2020-08-26 09:22, Chris Green wrote:
> I have the following line in Python 2:-
>
> msgstr = string.join(popmsg[1], "\n") # popmsg[1] is a list
> containing the lines of the message
>
> ... so I changed it to:-
>
> s = "\n"
> msgstr = s.join(popmsg[1]) # popmsg[1] is a l
On 2020-08-28 08:30, Richard Damon wrote:
> This might be one of the cases where Python 2's lack handling of string
> vs bytes was an advantage.
For English speaking Americans.
> Python2 handled that sort of case quite easily. Python 3 on the other
> hand, will have issue converting the byte mess
On 10/12/20 7:20 AM, Chris Angelico wrote:
> This is yet another reason that "from MODULE import *" is a bad idea.
> Instead, just import the module itself, and take whatever you need.
Or just import the objects that you need;
from datetime import datetime, SYMBOL, etc...
I use Decimal a lot. I
On 10/18/20 5:55 AM, Steve wrote:
I am not sure if what I did to repair it but the problem is gone.
A copy/paste/rename was performed on the original code file and now I do not
get the error. No need for "r" or "\"...
WTH? I hate it when that happens.
Could that original hyphen have been a uni
On 10/22/20 7:23 AM, Marco Sulla wrote:
I would add that usually I do not recommend saving files on databases. I
usually save the file on the disk and the path and mime on a dedicated
table.
I used to do that because backing up the database became huge. Now I use
ZFS snapshots with send/recei
I am getting this error. I found this recipe to fix it:
from xmlrpclib import Marshaller
from decimal import Decimal
def dump_decimal(self, value, write):
write("")
write(str(value))
write("\n")
Marshaller.dispatch[Decimal] = dump_decimal
That seems to be for Python 2. I am ru
On 11/27/20 4:05 PM, Skip Montanaro wrote:
I am getting this error.
I assume you mean the email subject. It doesn't work in 3.8 either:
Yes I do and that's too bad.
but that's not surprising to me. The marshal module is more-or-less
meant to serialize Python byte code. Pickle is more genera
On 12-01-03 01:13 PM, Sean Wolfe wrote:
Hello everybody, I'm a happy pythonista newly subscribed to the group.
Welcome.
The question is, given this possibility, would this get us closer to
being able to compile down to a language like C or C++?
That's "a" question. "The" question is "do yo
On 12-01-03 01:24 PM, gene heskett wrote:
The solution is to chop the link between google.groups and this list. But
that subject has been declared verboten. Too much inconvenience to ask the
googlers to subscribe to the real list I guess. Because my spamassassin
Perhaps they just need to be r
On 12-01-03 02:24 PM, Benjamin Kaplan wrote:
:0 Hir
* ^List-Id:.*python-list.python.org
* ^From:.*@gmail.com
* ^Newsgroups:.*
/dev/null
--
Wouldn't that just kill everything sent from a gmail account? That's
not the same thing as Google Groups. The mailing list posts, at least,
have an "Organi
On 12-01-07 07:10 AM, patr...@bierans.de wrote:
It's my first script in python and I'd like to know if my way of coding
so far is right and if YOU have some little tips for me
or if you can point my nose on some things I've missed so far.
Looks pretty good overall. I have a little armchair qua
On 12-01-08 02:46 PM, patr...@bierans.de wrote:
Thanks for the feedback!
You're welcome.
D'Arcy wrote: [code examples]
But I will keep some of my underscores for "private" attributes and methods.
And I googled: "dim" was basic. I know too many languages and start mixing
the keywords - shame
On 2017-03-05 07:01 AM, Ned Deily wrote:
On behalf of the Python development community and the Python 3.6 release
team, I would like to announce the availability of Python 3.6.1rc1.
3.6.1rc1 is the first release candidate for Python 3.6.1, the first
maintenance release of Python 3.6. 3.6.0 was r
On 2017-03-05 07:01 AM, Ned Deily wrote:
On behalf of the Python development community and the Python 3.6 release
team, I would like to announce the availability of Python 3.6.1rc1.
3.6.1rc1 is the first release candidate for Python 3.6.1, the first
maintenance release of Python 3.6. 3.6.0 was r
On 2017-03-05 07:01 AM, Ned Deily wrote:
On behalf of the Python development community and the Python 3.6 release
team, I would like to announce the availability of Python 3.6.1rc1.
3.6.1rc1 is the first release candidate for Python 3.6.1, the first
maintenance release of Python 3.6. 3.6.0 was r
On 2017-03-05 03:40 PM, Terry Reedy wrote:
import re
def title(string):
return re.sub(r"\b'\w", lambda m: m.group().lower(), string.title())
Nice. It lowercases a word char that follows an "'" that follows a word
without an intervening non-word char. It passes this test:
print(title("'tim
On 2017-03-05 09:39 PM, John Nagle wrote:
I'm looking for shared hosting that supports
at least Python 3.4.
http://www.VybeNetworks.com/
We have Python 2.7 and 3.6 installed.
--
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
On 2017-03-06 05:04 AM, Peter Otten wrote:
Won't Steve D'aprano And D'arcy Cain Be Happy Now :)
Perhaps one could limit the conversion to go from lower to upper only, as
names tend be in the desired case in the original text.
That would help with acronyms as well.
--
D'
On 2017-03-06 06:33 PM, Steve D'Aprano wrote:
If you read "title case" as *literally* as being only for titles (of books,
I believe there is only one conclusion to be drawn from this thread -
There is still a place for human proofreaders. I'm taking that as good
news.
--
D'Arcy J.M. Cain
V
1 - 100 of 118 matches
Mail list logo