Re: file location/directory

2021-03-14 Thread dn via Python-list
On 15/03/2021 07.44, Quentin Bock wrote: > how can I change the path that python takes to run certain files, I'm > starting to create game and I want those in separate folders, so how can I > change it so that python runs the program with the files from that folder? Perhaps I'

Re: file location/directory

2021-03-16 Thread dn via Python-list
On 17/03/2021 02.02, Gys wrote: > On 3/14/21 7:44 PM, Quentin Bock wrote: >> how can I change the path that python takes to run certain files, I'm >> starting to create game and I want those in separate folders, so how >> can I >> change it so that python runs the

Re: .title() - annoying mistake

2021-03-19 Thread dn via Python-list
el Suit' > > should be > > 'The Man in the Grey Flannel Suit' To be fair, aren't book-titles* a (formalised) sub-set of the English language? https://www.librarianshipstudies.com/2018/12/anglo-american-cataloguing-rules-aacr.html * plays, movies, ... See also people's/family-names which have been anglicised or transliterated... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: .title() - annoying mistake

2021-03-19 Thread dn via Python-list
ture of our source(s), and how effective that learning-process? Recently, my grumpy-old-man status rose a notch, when I received a 'Finxter' email-advertisement offering a course in "all" of the Python built-in functions. The advert claimed that this new offering was the first time

Re: .title() - annoying mistake

2021-03-22 Thread dn via Python-list
On 23/03/2021 10.00, Avi Gross via Python-list wrote: > Speaking for myself, I am beyond tired of this topic, however informative > parts have been. +1 > I will say it is irrational to try to impose rationally across all possible > languages, let alone people like me who often combi

Re: Code Formatter Questions

2021-03-28 Thread dn via Python-list
nable/erroneous-formatting is somewhat the opposite of your asking for something to *perform* a re-format. Additionally, Q2 may require an ability to add rules to the checker. I've not looked at such, but comments in "Auto formatters for Python" (https://www.kevinpeters.net/aut

Re: Code Formatter Questions

2021-03-29 Thread dn via Python-list
r you spent time helping me with a design/coding problem, helping debug, and/or reviewing/improving my code (and I for you); than we had not time left-over after spending many hours and much mental energy arguing about whether this format is [more] right than that! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Canonical conversion of dict of dicts to list of dicts

2021-03-30 Thread dn via Python-list
On 31/03/2021 01.22, Loris Bennett wrote: > Jon Ribbens writes: >> On 2021-03-30, Loris Bennett wrote: >>> If I have dict of dicts, say >>> >>> dod = { >>> "alice": >>> { >>> &quo

Re: Canonical conversion of dict of dicts to list of dicts

2021-03-30 Thread dn via Python-list
On 31/03/2021 19.24, Loris Bennett wrote: > dn writes: > >> On 31/03/2021 01.22, Loris Bennett wrote: >>> Jon Ribbens writes: >>>> On 2021-03-30, Loris Bennett wrote: >>>>> If I have dict of dicts, say >>>>> >>>>>

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-03-31 Thread dn via Python-list
On 01/04/2021 12.14, Chris Angelico wrote: > I think this code makes some sort of argument in the debate about > whether Python has too much flexibility or if it's the best > metaprogramming toolset in the world. I'm not sure which side of the > debate it falls on, thoug

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-03-31 Thread dn via Python-list
On 01/04/2021 13.54, Chris Angelico wrote: > On Thu, Apr 1, 2021 at 11:39 AM dn via Python-list > wrote: >> >> On 01/04/2021 12.14, Chris Angelico wrote: >>> I think this code makes some sort of argument in the debate about >>> whether Python has too

Re: XanaNews Statistic for comp.lang.python. 4/1/2021 5:52:47 AM

2021-04-01 Thread dn via Python-list
On 02/04/2021 01.19, Chris Angelico wrote: > On Thu, Apr 1, 2021 at 10:56 PM The Doctor via Python-list > wrote: >> Top Posters >> >> Ranking Articles NameMost Used Newsreader >> --- -- ---

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-04-01 Thread dn via Python-list
On 02/04/2021 10.13, Chris Angelico wrote: > On Fri, Apr 2, 2021 at 7:52 AM David L Neil via Python-list > wrote: >> Officially April-Fools Day is over (here), but... > This wasn't a prank post, although it was intended to give amusement > rather than real education or

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-04-02 Thread dn via Python-list
On 02/04/2021 21.32, Alan Gauld via Python-list wrote: > On 02/04/2021 00:42, dn via Python-list wrote: > >> Contrarily "tuck" in (old) English slang represented "sweets" (or > > Not that old. We still use it occasionally today. And we > certainly had

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-04-02 Thread dn via Python-list
On 02/04/2021 13.00, Chris Angelico wrote: > On Fri, Apr 2, 2021 at 10:43 AM dn via Python-list > wrote: >> >> On 02/04/2021 10.13, Chris Angelico wrote: >>> Well, it's a simple matter of chronology. First you have crude oil, >>> then time passes, and th

Friday Finking: initialising values and implied tuples

2021-04-02 Thread dn via Python-list
When there are several items to be defined and initialised, how do you prefer to format the code, and why? Apprentice: learn options Journeyman: consider and discuss Python Master: define, declare, and correct/advise/tutor Some do not realise that using a tuple is a convenient way to convey

Re: Horrible abuse of __init_subclass__, or elegant hack?

2021-04-02 Thread dn via Python-list
ome of the 'squares' are significantly larger/smaller than others! > I'd upload a patch for that, but it doesn't seem to be > open source. At least I can't find it on chochub. Recommend you use our local facility: https://git.nzoss.org.nz/users/sign_in -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: initialising values and implied tuples

2021-04-04 Thread dn via Python-list
r crude above/to-the-left?" > > Cognitive burden slows down and fatigues. +1 > Alternatively, if the data "fits together", use a `namedtuple` with kwarg > initialisation or structured data types like `dataclasses`. Whereas the other formats cannot, it would be very easy to turn an (a) type of list into a dataclass! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Friday Finking: initialising values and implied tuples

2021-04-04 Thread dn via Python-list
On 04/04/2021 01.00, Rob Cliffe via Python-list wrote: > > > On 03/04/2021 04:09, 2qdxy4rzwzuui...@potatochowder.com wrote: >> On 2021-04-03 at 02:41:59 +0100, >> Rob Cliffe via Python-list wrote: >> >>> x1 = 42; y1 =  3;  z1 = 10 >>> x

Re: HELP Please, Python Program Help

2021-04-10 Thread dn via Python-list
the above/ > print(x) > > # This function divides two numbers > def divide(x, y): > return x / y Why use a function instead of operating in-line? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Ann: New Python curses book

2021-04-10 Thread Russell via Python-list
re, so the > shipping cost by far outweighs the book???s cost. Hope for other???s sake, > it migrates to the other Amazon stores fairly quickly. > > Thanks, > Bill > >> On Mar 30, 2021, at 7:12 AM, Alan Gauld via Python-list >> wrote: >> >> I&#x

Re: all versions of python fail to indent after conditional statement

2021-04-10 Thread Russell via Python-list
I would recommend reading a book that introduces and explains Python rather than just diving in. I'm been enjoying "Introducing Python: Modern Computing in Simple Packages" which can be found at https://amzn.com/1492051365. It started from the beginning and would answer the questio

Re: Style qeustion: Multiple return values

2021-04-12 Thread dn via Python-list
#x27; the equals/assignment. Thus, the answer to your question is a matter of style, and thus the understanding of those who might read the code. FWIW: I leave them out because it is easier on my eyes whilst scanning the line of code. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Style qeustion: Multiple return values

2021-04-12 Thread dn via Python-list
On 12/04/2021 22.32, Chris Angelico wrote: > On Mon, Apr 12, 2021 at 8:20 PM dn via Python-list > wrote: >> >> On 12/04/2021 20.29, Steve Keller wrote: >>> Just a short style question: When returning multiple return values, do >>> you use parenthesis? >>

Re: UI design: combobox or radiobuttons?

2021-04-13 Thread Mirko via Python-list
if radios would make the view more complex and less obvious. -- https://mail.python.org/mailman/listinfo/python-list

Re: [ANN] Free Python tutorial with exercises, cscx.org

2021-04-13 Thread Russell via Python-list
Jach Feng wrote: > Is there any reason a student/beginner learn Python now start from Python2? > > --Jach Only if you want a job porting python2 to python3. Python 2.x is officially End Of Life. -- rust 0x68caecc97f6a90122e51c0692c88d9cb6b58a3dc -- https://mail.python.org/mailman

Re: need help with a translation issue

2021-04-17 Thread dn via Python-list
x27;s there to stop some nefarious/stupid user (like me!) entering "gobbledegook" and complaining that the program fails? -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: need help with a translation issue

2021-04-17 Thread dn via Python-list
original spec) or INPUT to a database table. We've well-and-truly disappearing down a 'rabbit hole' now! (Apologies, - I noted Chris making "Alice in Wonderland" references) If you haven't already, now is a good time to ask just how relevant some of these 'rules

Re: Comparing text strings

2021-04-18 Thread dn via Python-list
I know Debian actually does what > you're looking for as a feature of the packaging system (apt-get > autoclean), and the Fedora/RedHat universe does not, so I've also looked > for what you're looking for :) Not a sand-box I've played in. However, dnf is at least par

Re: Determine what the calling program is

2021-04-18 Thread dn via Python-list
include a note that each file has/not been processed (plus any other stats or logging you may deem appropriate). A third state would be 'in process'. Now, at start-up, the application can quickly check to see if there is any file in that state... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: do ya still use python?

2021-04-20 Thread dn via Python-list
On 20/04/2021 20.32, Alan Gauld via Python-list wrote: > On 20/04/2021 04:47, Dan Stromberg wrote: > >> Actually, this list is less busy than it was a decade or two ago, but >> that's probably because of things like stackoverflow, python-dev, pypy-dev, >> cython-devel

Re: Ad-hoc SQL query builder for Python3?

2021-04-24 Thread dn via Python-list
Builder(s) Sundry tools built on PHP - for varying definitions of F/LOSS and 'ad-hoc'! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Ad-hoc SQL query builder for Python3?

2021-04-25 Thread dn via Python-list
and motivation behind them, or have they (perhaps) had the effect of de-motivating the very people who seek to be helpful (to you)? Please note: The questions (above) are Socratic and rhetorical. No reply is requested or required. They ask you to think about maintaining constructive relationships. You certainly do not need to explain yourself to us (nor us to you). Per the opening comment, the idea behind this message is that we become better at helping each other... -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Start Python programming

2021-04-27 Thread dn via Python-list
On 28/04/2021 05.32, Gazoo wrote: > > > I'd like to start learning Python programming. What sites/tutorials > could you recommend for beginner, please. Start with the Python Tutorial (https://docs.python.org/3/tutorial/index.html), thereafter there are other 'docs' a

Re: text displays on screen only when I click to exit the program

2021-04-30 Thread Mirko via Python-list
pygame.event.get(): > if event.type == pygame.QUIT: > running = False > > display_instruction(font_x, font_y) > pygame.display.update() > > > main() > > > > please excuse the def main() thing, this doesn't follow a tutorial

Re: Start Python programming

2021-04-30 Thread Russell via Python-list
Gazoo wrote: > > > I'd like to start learning Python programming. What sites/tutorials > could you recommend for beginner, please. > I liked the book found at https://automatetheboringstuff.com/ You can read the whole book online. I think you used to be able to downloa

OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Mirko via Python-list
I apologize for this OT post, especially because it's in reply to an at least partly troll post, but I just can't resist. Sorry. Am 08.05.2021 um 14:09 schrieb Talkie Toaster: > On 06/05/2021 18:56, Mark Lawrence wrote: >> Quite frankly I don't care how this discu

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-09 Thread dn via Python-list
r from CPython contributions but once > changes no longer occur on the basis of technical reasons > it raises eyebrows far beyond CPython contributors. > > Now in the Python community we must verify not only > grammatical and structural errors but also US-based > nuances in the langua

Re: OT: Autism in discussion groups

2021-05-10 Thread Mirko via Python-list
Am 09.05.2021 um 02:34 schrieb Michael Torrie: > On 5/8/21 3:28 PM, Mirko via Python-list wrote: >> >> I apologize for this OT post, especially because it's in reply to an >> at least partly troll post, but I just can't resist. Sorry. >> >> P.S.:

Re: The importance of mental health

2021-05-10 Thread Mirko via Python-list
Am 10.05.2021 um 15:16 schrieb Kyle Stanley: > Hey all, > > In these last few months, I have been in the process of healing from some > pretty heavy past trauma. And now that I am on the road to recovery, I want > to share my journey with the Python community in hopes that it ma

Re: Python script accessing own source code

2021-05-12 Thread Mirko via Python-list
Am 12.05.2021 um 20:41 schrieb Robin Becker: > ... >> >> with open(__file__) as myself: >> print(myself.read(), end='') > > very nice, but accessing code that's already seems quite easy. I > think the real problem is to get a python scrip

Python install failing. Install log is available.

2021-05-20 Thread jan via Python-list
Hi, I've usually had problems installing python, typically pip breaking. This time it's simply not installing correctly when run as administrator, and not at all when run as non-administrator. As administrator, it's not installing for other users as I believe it should. It&

Re: Python install failing. Install log is available.

2021-05-21 Thread jan via Python-list
OK, but 1. should the installer work for administrator + all users or not? 2. if not, should the installer work for me (a non-admin) and install python correctly and successfully for my account if I run it in my account, not the admin? thanks jan On 20/05/2021, Terry Reedy wrote: > On 5

Re: Data structure for plotting monotonically expanding data set

2021-05-27 Thread dn via Python-list
f files from which the data has been extracted, and the second containing the data currently formatted as a dict. NB The second may benefit from stating in "normal form" or splitting into related tables, and certainly indexing. Thus the process requires two steps: firstly to capture the data (from the files) into the DB, and secondly to graph the appropriate groups or otherwise 'chosen' users. SQL will simplify data retrieval, and feeding into matplotlib (or whichever tool). It will also enable simple improvements both to select sub-sets of users or to project over various periods of time. YMMV! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Applying winpdb_reborn

2021-05-29 Thread dn via Python-list
rt: http://www.columbia.edu/cu/computinghistory/029.html Those were the days... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Definition of "property"

2021-05-30 Thread dn via Python-list
front would be helpful. I have tried a number of times, but my > attempts to define it have not been clear. Perhaps the best I've found so > far is from the Python documentation: > > A property object has getter, setter, and deleter methods usable as > decorators that c

Re: Posting code on stackoverflow

2021-06-06 Thread dn via Python-list
how to enter code if it's not just >> clicking on >> the 'code' box before pasting text > > Last time I tried *before*, it did not work.  paste, reselect (a > nuisance) and click does. Using text-mode email formatting and copy-pasting 'here', works well! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Terminology: EU language skills, and Master to Main (or ...)

2021-06-12 Thread dn via Python-list
[to folk subscribed to both the Python list and Python-Tutor: apologies for cross-posting] Regarding levels of skill or complexity in learning, the European Union has been working on "The Common European Framework of Reference for Languages: Learning, Teaching, Assessment". It also st

Re: Terminology: EU language skills, and Master to Main (or ...)

2021-06-13 Thread jan via Python-list
Hi, see below On 13/06/2021, dn via Python-list wrote: > [to folk subscribed to both the Python list and Python-Tutor: apologies > for cross-posting] > > > Regarding levels of skill or complexity in learning, the European Union > has been working on "The Common European

optimization of rule-based model on discrete variables

2021-06-14 Thread Elena via Python-list
ution. What's the best way to approach the problem? In case, does something already exist in python? thank you -- https://mail.python.org/mailman/listinfo/python-list

Re: optimization of rule-based model on discrete variables

2021-06-14 Thread Elena via Python-list
that can be absent (0), present (1), modified (2). yi represent a quality index of the mixtures and g is a global quality of the whole process. Thank you in advance ele -- https://mail.python.org/mailman/listinfo/python-list

Re: Where did the message go?

2021-06-14 Thread dn via Python-list
On 15/06/2021 01.00, Grimble wrote: > I have two machines running Mageia 8 and Python 2.8.9, They use the same > Python script to maintain a list of changed packages from dnf update and > dnf install. In addition the script sends a short email message to my > main email address. Th

Re: Php vs Python gui (tkinter...) for small remote database app

2021-06-14 Thread dn via Python-list
On 15/06/2021 07.17, Pascal B via Python-list wrote: > Hi, > I would like to know if for a small app for instance that requires a > connection to a remote server database if php is more suitable than Python > mainly regarding security. > Php requires one port for http and o

Re: Behaviour of pop() for dictionaries

2021-06-14 Thread dn via Python-list
ou're going to love using deques with their 'popping from the left' and 'popping from the right' concepts! I don't know if you are ComSc student or not, but there isn't even consistency at the theoretical level. I first arrived at the concept of "queuing" an

Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
re I can help you much. After the optimization, I will use f just to predict new Xi. Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: optimization of rule-based model on discrete variables

2021-06-15 Thread Elena via Python-list
> (https://theory.stanford.edu/~nikolaj/programmingz3.html) which it's a > SMT/SAT solver with a built-in extension for optimization problems. > > I've more experience with this so here is a "draft" of what you may be > looking for. > > > from z3 import

Re: Where did the message go?

2021-06-15 Thread dn via Python-list
. was not a registered subdomain with >> my ISP, whereas bach.. was registered. Sorted now. >> > > I like your naming convention :) He's playing your tune! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of pop() for dictionaries

2021-06-15 Thread dn via Python-list
at I know I am going to have to look at > the documentation for dequeue when I want to use it. For lists, sets and > dictionaries, I don't expect to look at the documentation and pop() > seemed a good bet for what I wanted to do. "What I expect" (aka 'dim/dusty recollecti

Re: optimization of rule-based model on discrete variables

2021-06-16 Thread Elena via Python-list
s thing g that somehow depends on all > of your mixtures at once. > > I'm still not seeing the big picture. sorry I wrote it wrongly, my bad, I will use f just to predict yi from new coming Xi. -- https://mail.python.org/mailman/listinfo/python-list

Re: tkinter: tksheet

2021-06-16 Thread dn via Python-list
s I'm building are both database applications. If > tksheet() is not the most appropriate widget to display database tables > what > alternative would be better? Use the DBMS by retrieving the data in the desired sequence? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Optimizing Small Python Code

2021-06-24 Thread jan via Python-list
large n it would become obvious. jan On 24/06/2021, Avi Gross via Python-list wrote: > Yes, I agree that if you do not need to show your work to a human, then the > problem specified could be solved beforeand and a simple print statement > would suffice. > > Ideally you want to make

Re: Optimizing Small Python Code

2021-06-24 Thread jan via Python-list
ity of an object, such as a piece of text, is the length of a shortest computer program (in a predetermined programming language) that produces the object as output". cheers jan On 24/06/2021, Avi Gross via Python-list wrote: > Jan, > > As an academic discussion, yes, many enhance

Re: a simple question

2021-07-26 Thread dn via Python-list
On 27/07/2021 10.19, Glenn Wilson via Python-list wrote: > I recently downloaded the latest version of python, 3.9.6. Everything works > except, the turtle module. I get an error message every time , I use basic > commands like forward, backward, right and left. My syntax i

Re: SQLALchemy: update with in clause from kwargs

2021-08-03 Thread dn via Python-list
Code, values.values() ) ) [('A', 'test'), ('B', 'test'), ('C', 'test')] list( it.zip_longest( companyCode, values.values() ) ) [('A', 'test'), ('B', None), ('C', None)] list( zip( companyCode, v

Re: Errors and some bugs

2021-08-09 Thread dn via Python-list
essage, from the terminal-session into an email response, and we'll try to help... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-10 Thread dn via Python-list
Apologies for lateness. Coincidentally, I've been asked to speak to our local Python Users' Group on slicing. Herewith an attempt to modify those demos around your data/question. Apologies if the result is thus somewhat lacking in flow. Also, whereas I prefer to illustrate 'h

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-11 Thread dn via Python-list
e language's rules and idioms. Thus, understanding your mental model enables a third-party to understand where correction may be necessary or omission exists. [can you tell that my colleagues and I were having just this discussion this morning?] Having spent the last few years working with a se

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-11 Thread dn via Python-list
that cluster). At the time, it wasn't envisioned to be usable > with regular Python objects. > > https://en.wikipedia.org/wiki/Array_slicing#1991:_Python > """ > The stride syntax (nums[1:5:2]) was introduced in the second half of the > 1990s, a

Re: on writing a while loop for rolling two dice

2021-08-28 Thread dn via Python-list
deliver the desired result. Neat? No! Readable? No! An improvement over the while-True? Definitely not! Yet, the mechanism is the same AND offers a built-in counter. Hmmm... Returning to the concern: x, y = 0, 1 c = 0 The first line is purely to ensure that the loop executes at least once, ie

Re: on writing a while loop for rolling two dice

2021-08-29 Thread dn via Python-list
ly on computers running the Hollywood Operating System). Continuous Education: Thanks for the reminder that enumerate() can be seeded with a "start" value! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: on writing a while loop for rolling two dice

2021-08-29 Thread dn via Python-list
On 29/08/2021 22.24, Chris Angelico wrote: > On Sun, Aug 29, 2021 at 8:14 PM dn via Python-list > wrote: >> Efficiency: >> - wonder how max( d ) == min( d ) compares for speed with the set() type >> constructor? > > That may or may not be an improvement. > >&

Re: on writing a while loop for rolling two dice

2021-08-29 Thread dn via Python-list
On 30/08/2021 00.47, Peter Otten wrote: > On 29/08/2021 12:13, dn via Python-list wrote: >> On 29/08/2021 20.06, Peter Otten wrote: >> ... >>> OK, maybe a bit complicated... but does it pay off if you want to >>> generalize? >>> >>>

Re: The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

2021-08-30 Thread dn via Python-list
ldn't understand/didn't believe me - yet I am completely correct. (as always - cough, splutter, snort...) Welcome to the last day of (what may be) your summer! These things can be tricky... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Struggling to understand timedelta rpesentation when applying an offset for an hour earlier - why is days = -1?

2021-08-31 Thread dcs3spp via Python-list
Hi, I wonder if anyone can help I am struggling to understand the representation of timedelta when used in conjunction with astimezone. Given the code below, in a python interactive interpreter, I am trying to calculate a resultant datetime an hour earlier from a UTC datetime

Re: The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

2021-08-31 Thread dn via Python-list
On 01/09/2021 00.45, Chris Angelico wrote: > On Tue, Aug 31, 2021 at 8:55 PM MRAB wrote: >> On 2021-08-31 02:16, dn via Python-list wrote: >>> On 31/08/2021 11.07, Dennis Lee Bieber wrote: >>>> On Sun, 29 Aug 2021 19:49:19 -0700 (PDT), "hongy...@gmail

Re: The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

2021-08-31 Thread dn via Python-list
On 01/09/2021 09.13, Chris Angelico wrote: > On Wed, Sep 1, 2021 at 6:38 AM dn via Python-list > wrote: >>> Yeah. I do recommend making good use of the IANA tzinfo database >>> though (especially since Python 3.9 made that a bit easier to access), >>> as it'

Re: The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

2021-08-31 Thread dn via Python-list
adan-hours" for 'flipping the switch' (in my head) and turning a late-night owl, and stereotypical techie/hacker; into an 'early bird'. Ironically such serves me well today - dealing with clients and colleagues on the other side of the planet, who much prefer me to wake-early, so that they don't have to interrupt their evenings at home... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: The sqlite3 timestamp conversion between unixepoch and localtime can't be done according to the timezone setting on the machine automatically.

2021-08-31 Thread dn via Python-list
re seen as being wasted as many people are asleep at that time. If the sunlight hours are shifted to the evening, by way of daylight saving time, they are more useful. » -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem with python

2021-09-04 Thread dn via Python-list
On 05/09/2021 06.27, Igor Korot wrote: > Hi, ALL, > > [code] > igor@WaylandGnome ~/bakefile $ python > Python 3.9.6 (default, Aug 8 2021, 17:26:32) > [GCC 10.3.0] on linux > Type "help", "copyright", "credits" or "license" for more

Re: on writing a while loop for rolling two dice

2021-09-07 Thread alister via Python-list
hat and then allow the preprocessor to replace >>>INDEFINITELY_LOOP with valid C code. >> >> Those usually are beginners. >> >>>So, how to do something like that in python, is a challenge left to the >>>user >> >> Such a use of mac

Friday Finking: Contorted loops

2021-09-09 Thread dn via Python-list
Why does Python not have a repeat-until loop construct? (or should that be 'modern programming languages'?) This is a perennial question (one contributor calling it "immemorial"), but there seem to be reasons why the Python Interpreter would find such a construct awkward, or

leave

2021-09-10 Thread flaskee via Python-list
Sent with [ProtonMail](https://protonmail.com/) Secure Email. -- https://mail.python.org/mailman/listinfo/python-list

Re: on writing a while loop for rolling two dice

2021-09-10 Thread dn via Python-list
e readable layout. It doesn't use a two-arg iter, but still rates because it does use a relatively-obscure member of the itertools library... https://docs.python.org/3.8/library/itertools.html#itertools.takewhile -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: on writing a while loop for rolling two dice

2021-09-11 Thread dn via Python-list
On 11/09/2021 18.03, Chris Angelico wrote: > On Sat, Sep 11, 2021 at 3:26 PM dn via Python-list > wrote: >> >> On 31/08/2021 01.50, Chris Angelico wrote: >>> On Mon, Aug 30, 2021 at 11:13 PM David Raymond >>> wrote: >>>> >>>&

Re: Friday Finking: Contorted loops

2021-09-12 Thread alister via Python-list
is not worth the effort. it is not the job of the interpreter to sanitise stupid programming "Special Cases aren't special enough the break the rules" -- If you stew apples like cranberries, they taste more like prunes than rhubarb does. -- Groucho Marx -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
On Thu, 16 Sep 2021 03:26:39 +1000, Chris Angelico wrote: > On Thu, Sep 16, 2021 at 3:17 AM Mostowski Collapse > wrote: >> >> I really wonder why my Python implementation is a factor 40 slower than >> my JavaScript implementation. >> Structurally its the same c

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
On Wed, 15 Sep 2021 18:23:10 +0200, Mostowski Collapse wrote: > I really wonder why my Python implementation is a factor 40 slower than > my JavaScript implementation. > Structurally its the same code. > > You can check yourself: > > Python Version: > https://github.com/

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
> > But then i isn't need. even Better (i had only skimmed the code as I was certain I would find this, it is probably the No. 1 thing new python programmers get wrong if your example is correct the it can be simplified even further to for help in term.args: mark_term(help) &

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
; It should read: >> >> for i,help in enumerate(term.args): >> mark_term(help) >> >> But then i isn't need. > even Better (i had only skimmed the code as I was certain I would find > this, it is probably the No. 1 thing new python programmers get wrong if >

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
s[i] > > You can try yourself: use a slice as a generic example you can try in the interactive interpreter (aka REPL): >>>items = [1,2,3,4,5,6,7,8,9,0] >>>for item in items[:-1]: >>>print(item) 1 2 3 4 5 6 7 8 9 I should state for the record that I am no P

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-09-15 Thread alister via Python-list
construct is a common error in new python programmers the next progression they make is when they discover the range function items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] for x in range(len(list)): print (items[x]) but that is equally inefficient the pythonic way is as previously suggested

Re: The code version of python -i

2021-09-16 Thread dn via Python-list
Abdur-Rahmaan, Apologies for delay: several last-minute tasks were landed on me, so I haven't been able to 'read the list' since last week. > If i have a file name flower.py and i add x = 1 in it. > When i run python -i flower.py i get a shell >>>> > >

Re: Question again

2021-09-16 Thread dn via Python-list
On 17/09/2021 12.25, Avi Gross via Python-list wrote: > I wonder if this is yet another case when a pop-up window closes rapidly > when done and any last text written is just not perceived. > > Good design in such cases makes a final pause till the user acknowledges in > some wa

Re: XML Considered Harmful

2021-09-21 Thread alister via Python-list
On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: > On the prolog thread, somebody posted a link to: > <https://dirtsimple.org/2004/12/python-is-not-java.html> > > One thing that it tangentially says is "XML is not the answer." > > I read this page

Re: XML Considered Harmful

2021-09-21 Thread alister via Python-list
On Tue, 21 Sep 2021 14:22:52 -0500, Michael F. Stemper wrote: > On 21/09/2021 13.49, alister wrote: >> On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: >> >>> On the prolog thread, somebody posted a link to: >>> <https://dirtsimple.org/2004/12/

Re: XML Considered Harmful

2021-09-23 Thread dn via Python-list
On 22/09/2021 07.22, Michael F. Stemper wrote: > On 21/09/2021 13.49, alister wrote: >> On Tue, 21 Sep 2021 13:12:10 -0500, Michael F. Stemper wrote: >> >>> On the prolog thread, somebody posted a link to: >>> <https://dirtsimple.org/2004/12/python-is-not-jav

Re: XML Considered Harmful

2021-09-23 Thread dn via Python-list
On 24/09/2021 14.07, Stefan Ram wrote: > dn writes: >> With that, why not code it as Python expressions, and include the module? > > This might create a code execution vulnerability if such > files are exchanged between multiple parties. The OP's spec, as quoted ea

Re: XML Considered Harmful

2021-09-24 Thread dn via Python-list
mix > them all in a single document (and there are tools available to validate > your files). But those features make it very complex (you almost > certainly don't want to write your own parser) and you really have to > understand the data model (especiall namespaces) to use it. and YAML? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-25 Thread dn via Python-list
ed, overlaying hierarchy onto 3NF and using an RDBMS would be my first thought - but because of the recursive JOINs, I recommend something more capable than SQLite. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: XML Considered Harmful

2021-09-25 Thread dn via Python-list
nly country to which your data applies. > If there's a standard for your industry, or your company, or on > some other level, then at least document what it is and that > you're using it, so that the next person (which may be you a > year from now) doesn't have to guess. +1 *always* add unit attributes -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

<    7   8   9   10   11   12   13   14   15   16   >