On 20/05/2011 12:26, Ayaskanta Swain wrote:
> Thanks for the reply and suggestions. I followed the patch provided by
> you in issue 2528, but the code looks very tricky to me.
OK, first a summary of the discussion on the python-dev thread.
Essentially it was felt that os.access was sufficiently s
l.jpg", transparent = False)
> games.screen.background = wall_image
>
> games.screen.mainloop()
>
> Can anyone please assist me.
You should provide
1)the traceback itself.
2)Version of python
3)Operating system
4)All relevant code
Also
Do the following :
import sys
On 24/05/2011 16:36, RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f? (which should
equal "C:\AciiCsv\Gravity_Test_data"). I've tried all sorts of stuff
and am just not finding it. Any help greatly appreciated !
You're
On 24/05/2011 17:04, RVince wrote:
Ha! You;re right -- but is there a way to get it without the filename
appended at the end?
Well, just use the functions in os.path, specifically os.path.dirname...
TJG
--
http://mail.python.org/mailman/listinfo/python-list
On 25/05/2011 07:36, Ulrich Eckhardt wrote:
RVince wrote:
s = "C:\AciiCsv\Gravity_Test_data\A.csv"
f = open(s,"r")
How do I obtain the full pathname given the File, f?
Apart from the issue that the 'name' attribute is only the name used to open
the file, there is another issue, though not on
On 24/05/2011 21:18, Claudiu Nicolaie CISMARU wrote:
Now. There is one more issue. Seems that on faster computers and/or
Windows 7 (the Win32 thing I have tested on a HVM Xen machine with
Windows XP) the os.rename is too fast after fp.close() and generates the
same Exception. The code follows:
c
MRAB wrote:
>
>I'd just like to point out that it's a convention, not a rigid rule.
Reminds me of the catch-phrase from the first Pirates of the Caribbean
movie: "It's more of a guideline than a rule."
--
Tim Roberts, t...@probo.com
Providenza & Boekelhei
rs, and I am trying to get excited about it, but
it has succumbed to the same special-characters-as-syntax disease that
killed Perl. Much Ruby code is just unreadable.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
application
you are launching is buffering its output, so that it doesn't SEND until
the application ends.
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
test for uniqueness of keys or
> elements.
>
>
> >>> nan = float("nan")
> >>> nan == nan
> False
>
> In short, don't do that.
There's a second part the mystery - sets and dictionaries (and I think
lists) assume that identify implies equality (hence the second result). This
was recently discussed on python-dev, and the decision was to leave things
as-is.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Scenario: a file-name from potentially untrusted sources may have
odd filenames that need to be sanitized for the underlying OS.
On *nix, this generally just means "don't use '/' or \x00 in your
string", while on Win32, there are a host of verboten characters
and file-names. Then there's also
time = get_fields()
date = datetime.datetime.fromordinal( date.toordinal() )
print str(date+time)
--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
On 2017-09-02 12:21, Steve D'Aprano wrote:
> On Fri, 1 Sep 2017 01:29 am, Tim Chase wrote:
> > I'd want to have an optional parameter to take locale into
> > consideration. E.g.
>
> Does regular case-sensitive equality take the locale into
> consideration
On 11/09/2017 11:58, Paul Moore wrote:
I'm doing some training for a colleague on Python, and I want to look
at a bit of object orientation. For that, I'm thinking of a small
project to write a series of classes simulating objects moving round
on a chess-style board of squares.
Don't know if yo
On 12/09/2017 12:20, Leam Hall wrote:
This is an area the Python community can improve on. Even I would
encourage someone new to Python and wanting to do webdev to use Python 3.
But if someone comes onto the list, or IRC, and says they need to stay
on Python 2 then please drop the dozens of e-
On 12/09/2017 12:20, Leam Hall wrote:
But if someone comes onto the list, or IRC, and says they need to stay
on Python 2 then please drop the dozens of e-mails and comments about
upgrading.
(Just spotted this quoted by Steven D'Aprano).
Another factor of course is that people are reading and
Looking through docs, I was unable to tease out whether there's a
prescribed behavior for the results of defining a dictionary with the
same keys multiple times
d = {
"a": 0,
"a": 1,
"a": 2,
}
In my limited testing, it appears to always take the last one,
resulting in
{"
On 2017-09-15 17:45, Terry Reedy wrote:
> On 9/15/2017 3:36 PM, Tim Chase wrote:
> >d = {
> > "a": 0,
> > "a": 1,
> > "a": 2,
> >}
> >
> > In my limited testing, it appears to always take the
On 09/16/2017 12:38 AM, Steve D'Aprano wrote:
> /rant on
>
> So apparently everyone who disagrees that Python should be more like
> Javascript
> is an old greybeard fuddy-duddy yelling "Get off my lawn!" to the cool kids --
> and is also too stupid to know how dumb they are.
>
> "Hi, I've been p
On 09/16/2017 12:38 AM, Steve D'Aprano wrote:
> /rant on
>
> So apparently everyone who disagrees that Python should be more like
> Javascript
> is an old greybeard fuddy-duddy yelling "Get off my lawn!" to the cool kids --
> and is also too stupid to know how dumb they are.
>
> "Hi, I've been p
On 17/09/2017 14:34, breamore...@gmail.com wrote:
On Sunday, September 17, 2017 at 2:16:48 PM UTC+1, bartc wrote:
print can also be used for debugging, when it might be written, deleted
and added again hundreds of times. So writing all those brackets becomes
irksome. 'print' needs to be easy
On 2017-09-18 00:42, Steve D'Aprano wrote:
> On Sun, 17 Sep 2017 11:51 pm, Tim Golden wrote:
> Presumably you've never wanted to print to something other than
> std.out. The syntax in Python 2 is horrid:
>
> print >>sys.stderr, args
For those cases, the old synt
On 09/16/2017 09:59 AM, Tim Daneliuk wrote:
> On 09/16/2017 12:38 AM, Steve D'Aprano wrote:
>> /rant on
>>
>> So apparently everyone who disagrees that Python should be more like
>> Javascript
>> is an old greybeard fuddy-duddy yelling "Get off my lawn!&
On 2017-09-17 14:16, bartc wrote:
> print() is used for its side-effects; what relevant value does it
> return?
depending on the sink, errors can be returned (at least for the
printf(3) C function). The biggest one I've encountered is writing
to a full disk. The return value is how many characte
On 2017-09-17 16:15, Rick Johnson wrote:
> > I've wanted to do all those things, and more. I love the
> > new print function. For the cost of one extra character,
> > the closing bracket,
>
> Oops, _two_ characters! What about the opening "bracket"?
>>> print(len('print "hello"'))
13
>>>
On 2017-09-18 01:41, INADA Naoki wrote:
> > > That said, I'm neither here nor there when it comes to
> > > using print-as-a-statement vs print-as-a-function. I like
> > > the consistency it brings to the language, but miss the
> > > simplicity that Py2 had for new users. I'd almost want to
> > >
On 19/09/2017 09:05, Stefan Behnel wrote:
The stdlib is there to provide a base level of functionality. That base
level tends to be much higher up than in most other programming languages,
but from the point of view of Python, it's still just a base level, however
comfortable it might be.
If you
On 2017-09-23 19:14, Chris Angelico wrote:
> On Sat, Sep 23, 2017 at 7:07 PM, Kryptxy
> wrote:
> > Thank you all! I opened a ticket about the same (on github).
> > I got response from most of them, and all are agreeing to the
> > change. However, one contributor did not respond at all. I tried
> >
On 2017-09-26 02:29, Steve D'Aprano wrote:
> x = Parrot(name="Polly")
>
> (using Python syntax for simplicity) and somebody tries to tell me
> that the value of x is anything but a Parrot instance named "Polly",
So this is a Polly-morphic constructor?
-tkc
--
https://mail.python.org/mailman/l
On 25/09/2017 20:40, Marko Rauhamaa wrote:
Rhodri James :
On 25/09/17 15:26, Marko Rauhamaa wrote:
That's not what I said. I said all expressions *evaluate to* pointers.
This may well be true in particular implementations, but it is an
implementation detail so Chris' point still stands. Anot
On 26/09/2017 15:16, Grant Edwards wrote:
On 2017-09-26, Ned Batchelder wrote:
On 9/25/17 10:20 PM, Steve D'Aprano wrote:
On Tue, 26 Sep 2017 02:54 am, Ned Batchelder wrote:
[...]
We've been asked nicely by the list mod to stop :)
Perhaps we could agree on a subject line tag to be used i
On 2017-09-26 18:25, alister via Python-list wrote:
>>> We've been asked nicely by the list mod to stop :)
>>
>> Perhaps we could agree on a subject line tag to be used in all
>> threas arguing about what to call the Python argument passing
>> scheme? That way the other 99% of us could pre-empt
On 27/09/17 09:50, Bill wrote:
If you are teaching beginning students, do you expect them to try to
follow these sorts of conventions? Is it perfectly fine to let
"taste" guide you (I'm just trying to get a feel for the philosophy
here)?
I few years ago I wrote a few short blog posts about
On 29/09/2017 18:15, Vincent Vande Vyvre wrote:
Is it a reason why my messages appears always a long time (today 9
hours) on the list after I send it ?
Vincent,
Your address is being caught in our moderation traps for some reason. At
the moment I'm away and on-line less than usual. Perhaps t
stralians would say that writing "an
herb" is a mistake since we pronounce the "h", but millions of people
elsewhere would disagree with us.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-10-10 08:29, Chris Angelico wrote:
On Tue, Oct 10, 2017 at 6:21 PM, Sayth Renshaw
wrote:
Hi
How do I create a valid file name and directory with pathlib?
When I create it using PurePosixPath I end up with an OSError due to
an obvously invlaid path being created.
You're on Windows.
On 2017-10-10 10:28, Chris Angelico wrote:
On Tue, Oct 10, 2017 at 8:22 PM, Tim Golden
wrote:
On 2017-10-10 08:29, Chris Angelico wrote:
On Tue, Oct 10, 2017 at 6:21 PM, Sayth Renshaw
wrote:
Hi
How do I create a valid file name and directory with pathlib?
When I create it using
On 2017-10-10 10:58, Chris Angelico wrote:
On Tue, Oct 10, 2017 at 8:56 PM, Tim Golden
wrote:
My understanding of the document you linked to
is that the colon still has special meaning, and thus you can't use
it
in arbitrary file names.
In fact its presence in that filename crea
On 12/10/2017 09:08, T Obulesu wrote:
Hello all, I want to send some frames defined by me{Example,
[0x45,0x43,0x32]} to the raspberry pi from any
macine(Desktop/Laptop/other raspberry pi). But I want to send those
frames over wifi or use wlan0 using python Any suggestions?
Are you talking abou
On 2017-10-22 12:24, Patrick Vrijlandt wrote:
> I would like your recommendation on the choice of a web framework.
Might depend on what skills you already bring to the table. If you
already know an ORM like SQLAlchemy or a template language like
Jinja, you might want to take the "bring the pieces
On 2017-10-22 15:26, Patrick Vrijlandt wrote:
> The version control I was referring to, is indeed users' data. I
> plan to use Mercurial for the source code. The questionnaires being
> developed will go through many revisions. The questionnaires being
> filled in, are enough work to have a provisio
On 24/10/2017 16:40, Lele Gaifax wrote:
Steve D'Aprano writes:
But given an empty file, how do you distinguish the empty file you get
from 'music.mp3' and the identical empty file you get from 'movie.avi'?
That's simple enough: of course one empty file would be
"music.mp3.zip.zip.zip", while
[rearranging for easier responding]
On 2017-10-27 13:35, Robert wrote:
> self.freqslider=forms.slider(
> parent=self.GetWin( ),
> sizer=freqsizer,
> value=self.freq,
> callback= self.setfreq,
> minimum=−samprate/2,
> maximum=samprate/2,
> num_steps=100,
> st
On Wednesday, November 1, 2017 at 6:30:27 PM UTC-4, Andrew Z wrote:
> nope. it doesnt:
>
> I added print-s after each line and that produced:
> [az@hp src]$ cat ./main1.py
> import matplotlib.pyplot as plt
> print("imported")
> plt.plot([1,2,4,1])
> print("plot is done")
> plt.show()
> print("show
On 07/11/2017 14:20, bartc wrote:
On 07/11/2017 13:30, Thomas Jollans wrote:
On 2017-11-07 12:53, bartc wrote:
Having
said that, I located pip.exe, trying typing 'pip install cffi' and it
seemed to be doing something but then failed with a bunch of errors.)
So you're missing out on all of PyP
On 28/11/2017 08:41, Paul Moore wrote:
On 27 November 2017 at 19:05, Paul Moore wrote:
On 27 November 2017 at 18:13, Skip Montanaro wrote:
If you have a Windows key, you can assign it to be
the Compose key.
Would this be true on a machine running Windows? My work environment
has me developi
On 28/11/2017 10:17, Thomas Jollans wrote:
On 2017-11-28 02:14, Skip Montanaro wrote:
I'm 99.5% certain it's not gate_news.
A funny thing. All messages I have looked at so far with the "nospam"
thing have a Message-ID from binkp.net. (They are also all Usenet
posts.) For example:
Newsgroups:
On 09/12/2017 05:35, Rustom Mody wrote:
Repeating old posts again appearing
[No not complaining… I know people are working on it. Thanks Skip and whoever
else]
Just thought I'd mention they are now mildly mojibaked
I've just added a new filter and pinged the other list admins /
postmaster.
On 15/12/2017 09:58, supsw...@gmail.com wrote:
Hi,
I have created one library file
"modified_python_automation_tcl.py"..Inside my library file I have
set of codes as follows.
import sys import time from datetime import datetime import
re,sys,os,itertools,datetime,commands,logging,math,time,copy
On 17/12/17 00:10, Gregory Ewing wrote:
The duplicate posts all seem to have this header:
Injection-Info: news.bbs.geek.nz;
posting-host="M6YmRdZYyc42DJk0lNlt/X4dpP4dzvceBNabSmESN3E";
logging-data="4415"; mail-complaints-to="ab...@news.bbs.geek.nz"
I've emailed the administrator of bbs.g
On 12/17/2017 12:41 AM, Abdur-Rahmaan Janhangeer wrote:
> Hi all,
>
> Can somebody point out to me some py-based template languages interpreters
> resources?
>
> Thank you !
>
http://jinja.pocoo.org/
--
https://mail.python.org/mailman/listinfo/python-list
On 17/12/2017 13:22, Jon Ribbens wrote:
On 2017-12-17, Tim Golden wrote:
On 17/12/17 00:10, Gregory Ewing wrote:
The duplicate posts all seem to have this header:
Injection-Info: news.bbs.geek.nz;
posting-host="M6YmRdZYyc42DJk0lNlt/X4dpP4dzvceBNabSmESN3E";
logging-data=&q
Playing around, I had this (happens to be Py2, but gets the same
result in Py3) code
class X(object):
ONE = "one"
TWO = "two"
_ALL = frozenset(v for k,v in locals().items() if k.isupper())
@classmethod
def __contains__(cls, v):
return v in cls._ALL
print(dir(X))
print(X._ALL)
Runnin
On 20/12/2017 05:52, Steve D'Aprano wrote:
This is possibly a question for the list admins...
I notice that Lawrence D’Oliveiro has taken up labelling his posts with a
demand that his posts are not to be posted to the Python-List mailing list.
I also see that his posts are not showing up on the
On Thursday, December 21, 2017 at 12:18:11 PM UTC-5, MarkA wrote:
> On Thu, 21 Dec 2017 07:05:33 -0800, rafaeltfreire wrote:
> From docs.python.org:
>
> 8.10. copy — Shallow and deep copy operations
>
> Source code: Lib/copy.py
>
> Assignment statements in Python do not copy objects, they create
On Friday, December 22, 2017 at 8:41:29 AM UTC-5, Tim Williams wrote:
> On Thursday, December 21, 2017 at 12:18:11 PM UTC-5, MarkA wrote:
> > On Thu, 21 Dec 2017 07:05:33 -0800, rafaeltfreire wrote:
> > From docs.python.org:
> >
> > 8.10. copy — Shallow and deep copy
On 2017-12-29 08:42, Ben Finney wrote:
> Duram writes:
>
> > How to use goto in python?
>
> Step 0: what is goto in Python?
>
> Step 1: that's not something that exists in Python. So why are you
> asking how to use something that doesn't exist?
so quick to shoot down a poor soul.
http://ent
On 12/01/2018 08:47, Paul Moore wrote:
On 12 January 2018 at 01:21, bartc wrote:
On 11/01/2018 23:23, Chris Angelico wrote:
On Fri, Jan 12, 2018 at 10:11 AM, bartc wrote:
I'm almost ready to plonk you, but I think there is still SOME value
in your posts. But please, stop denigrating what
On 28/01/2018 15:04, Steven D'Aprano wrote:
I'm seeing this annoying practice more and more often. Even for trivial
pieces of text, a few lines, people post screenshots instead of copying
the code.
Where has this meme come from? It seems to be one which inconveniences
*everyone* involved:
- for
otherwise, this type of thing
keeps happening.
BTW: I have nothing to do with the final persistence format of the data,
but in practice I've had to learn the DB schema and stored procedures for
everything I support. Strangely the DB team don't have to learn my parts ...
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On 29 January 2018 at 11:27, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
> On Mon, 29 Jan 2018 08:55:54 +1100, Tim Delaney wrote:
>
> > I got back a Word document containing about 10 screenshots where they'd
> > apparently taken a screenshot,
On 01/02/2018 17:01, superchromix wrote:
Our own programming discussion newsgroup, located at
comp.lang.idl-pvwave, started receiving spam messages several months
ago.
Two weeks ago, access to comp.lang.idl-pvwave was blocked by Google
Groups.
When trying to access comp.lang.idl-pvwave, a mess
$WORKON_HOME
Good so far. Based on
https://bitbucket.org/dhellmann/virtualenvwrapper-hg
it sounds like ksh should be supported. However when I try to enable
it, I get:
$ . ~/.local/bin/virtualenvwrapper.sh
ksh: /home/tim/.local/bin/virtualenvwrapper.sh[97]: ${.sh.file}": bad
substit
Giving a nudge here. I've tried the below process with both
OpenBSD's stock ksh and FreeBSD's stock /bin/sh as my shell and both
seem to have similar errors (the FreeBSD error is less precise about
the line location or the actual error:
/home/tim/.local/bin/virtualenvwrapper.s
On 09/02/2018 05:00, Steven D'Aprano wrote:
On Thu, 08 Feb 2018 23:40:57 +, Mark Lawrence wrote:
I don't see any spam in my inbox as I read on gmane, I'm pointing out
the disgraceful state of gg and why it should be dropped as it's less
than useless.
Who is it that you think should "drop"
On 09/02/2018 15:37, Chris Green wrote:
Steven D'Aprano wrote:
On Fri, 09 Feb 2018 12:45:29 +, Chris Green wrote:
Mark Lawrence wrote:
[...]
Please don't waste your time with the gmane website. Just point any
(semi-)decent mail client like Thunderbird at news.gmane.org and you've
Su
Has anybody else been getting unexpected/unsolicited emails from the
Python bug-tracker?
I'm not associated with (didn't submit/lurk/follow/sign-up-for) this
bug or its notifications but somehow I'm getting messages on this
particular issue. I've now received two notifications (both on this
same
r: __class__ assignment only supported for heap types or ModuleType
subclasses
In some implementations it is possible to subvert the Python typing system
by stepping out of Python code and into (for example) a C extension, but
that does not make Python *the language* weakly typed.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
Something like the following might do the trick. As an added benefit,
it's easy to set all the defaults automatically in __init__ as well
without hand-adding "self.dopey = dopey". On the down side, in the
non-__init__ functions, you have to use kwargs["dopey"] and the like.
It also involves tackin
While inelegant, I've "solved" this with a wrapper/generator
f = file(fname, …)
g = (line.replace('\0', '') for line in f)
reader = csv.reader(g, …)
for row in reader:
process(row)
My actual use at $DAYJOB cleans out a few other things
too, particularly non-breaking spaces coming from
On 2018-02-28 21:38, Dennis Lee Bieber wrote:
> > with open( fname, 'rt', encoding='iso-8859-1' ) as csvfile:
>
> Pardon? Has the CSV module changed in the last year or so?
>
> Last time I read the documentation, it was recommended that
> the file be opened in BINARY mode ("rb")
On 2018-03-01 23:57, John Pote wrote:
> On 01/03/2018 01:35, Tim Chase wrote:
> > While inelegant, I've "solved" this with a wrapper/generator
> >
> >f = file(fname, …)
> >g = (line.replace('\0', '') for line in f)
> I won
The documentation says[1]
> Return the approximate size of the queue. Because of
> multithreading/multiprocessing semantics, this number is not
> reliable.
Are there any circumstances under which it *is* reliable? Most
germane, if I've added a bunch of items to the Queue, but not yet
launched an
t I do have a _sysconfigdata__openbsd7_amd64-unknown-openbsd7.1.py module
under:
./build/lib.openbsd-7.1-amd64-3.9/_sysconfigdata__openbsd7_amd64-unknown-openbsd7.1.py
I suspect somewhere, it's not picking up the full 7.1 version string.
I am having a problem figuring it out. I kindly ask if yo
Thanks for the response HTH. Your comment led me to think
that perhaps a "ports" dependency failed to be generated correctly.
They are patched on the fly.
I went back to "scratch" on fresh installation with a clean Python build.
This time it worked correctly. Go figur
iving of malformed input and edge
cases.
I use html5lib - it's fast enough for what I do, and the most likely to
return results matching what the author saw when they maybe tried it in a
single web browser.
Tim Delaney
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, May 22, 2023 at 12:41 PM Mats Wichmann wrote:
> On 5/20/23 13:53, Chris Green wrote:
> > I'm converting a bash script to python as it has become rather clumsy
> > in bash.
> >
> > However I have hit a problem with converting dates, the bash script
> > has:-
> >
> > dat=$(date --date
On 2021-01-13 21:20, Bischoop wrote:
> I want to to display a number or an alphabet which appears mostly
> consecutive in a given string or numbers or both
> Examples
> s= ' aabskaaabad'
> output: c
> # c appears 4 consecutive times
> 8bbakebaoa
> output: b
> #b appears 2 consecutive times
I
On 2021-01-13 18:20, Dan Stromberg wrote:
> I'm kind of partial to:
>
> import collections
> import typing
>
>
> def get_longest(string: str) -> typing.Tuple[int, str]:
> """Get the longest run of a single consecutive character."""
> dict_: typing.DefaultDict[str, int] =
> collections.de
On 2021-01-16 03:32, Bischoop wrote:
>> The OP didn't specify what should happen in that case, so it would
>> need some clarification.
>
> In that case maybe good solution would be to return three of them?
That's the solution I chose in my initial reply, you get a tuple back
of ([list of longest
On 2021-02-24 08:12, Ethan Furman wrote:
> I'm looking for a name for a group of options that, when one is
> specified, all of them must be specified.
[snip]
> - ???: a group of options where, if one is specified, all must be
> specified (mutually inclusive)
[snip]
> Is there a name out there alrea
python3
I see numerous caveats regarding the installing of pips for both these
versions.
I would welcome advice on how to proceed which could very well be
accomplished
by links to relevant discussions or documentation.
thanks
--
Tim
tj49.com
--
https://mail.python.org/mailman/listinfo/python
On 3/21/21 5:14 PM, MRAB wrote:
Tn 2021-03-21 23:13, Tim Johnson wrote:
Using ubuntu 20.04 as a recent install
with python3 (3.8.5) which was installed as part of the
original distribution install
and
python2 (2.7.18) that has been installed using apt.
I have a large amount of utilities
On 3/21/21 5:44 PM, Dan Stromberg wrote:
python3 -m pip install
Got it. Thanks a lot.
--
Tim
tj49.com
--
https://mail.python.org/mailman/listinfo/python-list
On 2021-05-26 08:18, Alan Gauld via Python-list wrote:
> Does that mean that if I give Python a UTF8 string that is mostly
> single byte characters but contains one 4-byte character that
> Python will store the string as all 4-byte characters?
As best I understand it, yes: the cost of each "chara
On 2021-05-26 18:43, Alan Gauld via Python-list wrote:
> On 26/05/2021 14:09, Tim Chase wrote:
>>> If so, doesn't that introduce a pretty big storage overhead for
>>> large strings?
>>
>> Yes. Though such large strings tend to be more rare, largely
>
On 2021-10-25 22:40, anders Limpan wrote:
> i would like to create a contact book were you can keep track of
> your friends. With this contact book you will both be able to add
> friends and view which friends that you have added. anyone
> interested in helping me out with this one ?=) --
Python p
On Tue, Oct 26, 2021 at 6:36 PM Shaozhong SHI
wrote:
> Hello,
>
> The result of df.count() appears to be a series object. How to store the
> result of df.count() as a new dataframe in Pandas?
>
> That is data anyhow.
>
> Regards,
>
> David
> --
> https://mail.python.org/mailman/listinfo/python-l
On 2022-03-03 06:27, Grant Edwards wrote:
> On 2022-03-03, Chris Angelico wrote:
> > Awww, I was going to make a really bad joke about timezones :)
>
> As opposed to all the really good jokes about timezones... ;)
And here I thought you were just Trolling with timezones...
https://en.wikipedi
On 2022-03-04 02:02, Chris Angelico wrote:
>> I want to make a little survey here.
>>
>> Do you find the for-else construct useful? Have you used it in
>> practice? Do you even know how it works, or that there is such a
>> thing in Python?
>
> Yes, yes, and yes-yes. It's extremely useful.
Just
On 2022-03-04 11:55, Chris Angelico wrote:
> In MS-DOS, it was perfectly possible to have spaces in file names
DOS didn't allow space (0x20) in filenames unless you hacked it by
hex-editing your filesystem (which I may have done a couple times).
However it did allow you to use 0xFF in filenames wh
On 2022-03-30 16:37, Barry wrote:
> Is logging.getLevelNamesMapping() what you are looking for?
Is this in some version newer than the 3.8 that comes stock on my
machine?
$ python3 -q
>>> import logging
>>> logging.getLevelNamesMapping()
Traceback (most recent call last):
File "", lin
Dear Sir,
I have successfully downloaded Python into my laptop but the shortcut icon
is not appearing on the desktop. I am using Windows 10 with the PC
specifications as per snap shot attached below. Can you advise what to do?
Thank you
Tim Deke
[image: image.png]
--
https://mail.python.org
On 2016-08-14 12:28, Steven D'Aprano wrote:
> Is there anyone here running Python on a PowerPC willing to help me
> diagnose and fix this issue?
>
> http://bugs.python.org/issue27761
Not so savvy in the building, but I've got a Mac PPC (still on 10.4
or whatever the last-ish PPC build of OS X was
On 2016-08-14 13:54, Steven D'Aprano wrote:
> I need to be able to programmatically test whether I'm running on a
> PowerPC. How can I do that?
>
> import platform
> if platform.machine() in ('ppc', 'ppc64'):
> print('running PowerPC')
>
>
> Is that right?
Running OpenBSD on a PPC iBook G4:
On 2016-08-21 04:53, Rustom Mody wrote:
> 2. Basic computing theory shows that re-s and dfas are equivalent.
> Which would one prefer to write/debug? [Thats not a rhetorical
> question]
I'm curious where REs and DFAs are shown to be equivalent (serious,
not trying to be snarky). I can see with no
On 2016-08-23 00:21, Ben Finney wrote:
> So yes, filenames from arbitrary sources should be *completely*
> untrusted, and never used to access any file on the system. Throw
> the entire filename away and make a filename locally, without using
> any part of the original name.
Sadly, this ideal advi
On 2016-08-23 02:20, Chris Angelico wrote:
> It generally will (or rather, only if the file has one of a
> particular set of extensions). Automatic thumbnailing is usually
> done only for certain file names. I don't know of anything that
> opens every single file to see if it has a JFIF signature (
On 2016-08-22 22:39, Chris Angelico wrote:
> Nope. On Windows, you would try/except it. There are myriad other
> ways something could fail, and the only correct action is to
> attempt it. Most of the reserved names will simply give an error;
The problem is that when opening such a pseudo-file, you
On 10/09/2016 11:26, Veek 'this_is_not_my_name' M wrote:
Veek 'this_is_not_my_name' M wrote:
/me claps
TJG
--
https://mail.python.org/mailman/listinfo/python-list
801 - 900 of 7367 matches
Mail list logo