Re: How to access a variable from one tab in another tab of a notebook?

2021-04-08 Thread Alan Gauld via Python-list
On 08/04/2021 06:01, Mohsen Owzar wrote: >> But this is why GUIs are often(usually?) built as a class >> because you can store all the state variables within >> the instance and access them from all the methods. >> >> You can do it with functions but you usually wind up >> with way too many gl

Re: Ann: New Python curses book

2021-04-12 Thread Alan Gauld via Python-list
On 12/04/2021 00:53, Daniel Nelson wrote: >> (It should be available in most other Amazon stores too) > > This looks handy, I'd love to buy a copy but I don't do business with > Amazon if I can avoid it. Any chance this will be available from other > locations? I tried to publish it on several

Re: Style qeustion: Multiple return values

2021-04-12 Thread Rob Cliffe via Python-list
On 12/04/2021 09:29, Steve Keller wrote: Just a short style question: When returning multiple return values, do you use parenthesis? E.g. would you write def foo(): return 1, 2 a, b = foo() or do you prefer def foo(): return (1, 2) (a, b) = foo() Stev

RE: translating external files type thing

2021-04-13 Thread Avi Gross via Python-list
https://translate.google.com/?sl=is&tl=en&op=translate Or, you could do it the hard way. Kidding aside, there may be a python module you can hand a file name or contents to and have it do much of the job using some API that may tap into the above Google resource. Dan specifically suggested impor

Re: UI design: combobox or radiobuttons?

2021-04-13 Thread Alan Gauld via Python-list
On 13/04/2021 22:53, Rich Shepard wrote: > While a set of radiobuttons occupies more room on the parent widget than > does a combobox are there any technical or user issues that would suggest > using one over the other? readability? If the combo box puts the units immediately beside the value the

Re: Ann: New Python curses book

2021-04-14 Thread Alan Gauld via Python-list
On 30/03/2021 12:12, Alan Gauld via Python-list wrote: > I've just published, in Kindle and paperback formats, I've just noticed that the kindle version has several indentation problems in the code listings. I can't do anything to fix it because it is all perfectly aligned

Re: port to PDOS (especially mainframe)

2021-04-14 Thread Alan Gauld via Python-list
On 14/04/2021 11:35, Paul Edwards wrote: > I have succeeded in producing a Python 3.3 executable ... > However, the executable doesn't work yet. Late to this party but how big is the assembler? It might be easier to translate the Python to C! I've done that in the past and with the aid of a few fun

Re: Website

2021-04-14 Thread Mladen Gogala via Python-list
On Wed, 14 Apr 2021 15:41:37 +0200, Rainyis wrote: > Hello, > I am Sergio Llorente, and I want to create a web about python. I will > publish apps, scripts.. made by python. I will like to put python in the > domain. The domain will be like all-about-python.com but in Spanish( > todosobrepython.co

Re: Ann: New Python curses book

2021-04-15 Thread Alan Gauld via Python-list
On 14/04/2021 19:55, Rich Shepard wrote: > On Wed, 14 Apr 2021, Alan Gauld via Python-list wrote: > >> The paper version should be fine (apart from one error on p44 which has >> now been fixed!). > > Alan, > > What's the error and correction so I can change it

Re: Current thinking on required options

2021-04-19 Thread Jon Ribbens via Python-list
On 2021-04-19, Paul Bryan wrote: > Calling them options—when they're required—seems like a problem. 🙂 The option is what the value is, not whether there is a value at all. If you order a coffee then you may have an option as to what temperature it is, that doesn't mean the coffee having a tempera

RE: Current thinking on required options

2021-04-19 Thread Avi Gross via Python-list
Sidestepping the wording of "options" is the very real fact that providing names for even required parts can be helpful in many cases. There re programs that may not require anything on the command line to be done but many need something to provide some flexibility. So, I tend to agree that in ma

Re: do ya still use python?

2021-04-19 Thread Jon Ribbens via Python-list
On 2021-04-20, Paul Rubin wrote: > Ethan Furman writes: >> List, my apologies -- not sure how that one got through. > > It was trollishly written but was a reasonable observation on the state > of the Usenet group. I didn't realize it had come through (or reached) > the mailing list. Anyway the

Re: do ya still use python?

2021-04-20 Thread Alan Gauld via Python-list
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, python-ideas, distutils-sig, issue trackers, code-quality, > and probably others. > > The

RE: do ya still use python?

2021-04-21 Thread Avi Gross via Python-list
. -Original Message- From: Python-list On Behalf Of o1bigtenor Sent: Wednesday, April 21, 2021 6:07 AM To: Terry Reedy Cc: Python Subject: Re: do ya still use python? On Tue, Apr 20, 2021 at 6:26 PM Terry Reedy wrote: > > On 4/20/2021 4:32 AM, Alan Gauld via Python-list wrote: &g

Re: Ad-hoc SQL query builder for Python3?

2021-04-25 Thread Alan Gauld via Python-list
On 24/04/2021 15:24, Rich Shepard wrote: > My web searches are not finding what I need to include in an application I'm > building: an ad-hoc sql query builder. > > End users will want to query their data for reports not included in the > built-in queries. I assume you understand the huge risks i

Re: "py.ini" question

2021-04-25 Thread Alan Gauld via Python-list
On 24/04/2021 15:23, Gisle Vanem wrote: > I have a question about the Python launcher; >c:\Windows\py.exe and the py.ini file. > > I have both Python 3.6 (32-bit) and Python 3.8 (64-bit) > installed. And I have a 'c:\Users\Gisle\AppData\Local\py.ini' > with this only: >[defaults] >pyth

Re: Ad-hoc SQL query builder for Python3?

2021-04-26 Thread Robert Latest via Python-list
Rich Shepard wrote: > For those interested I've found a couple of possibilities: PyPika and > SQLbuilder. I'll be looking deeply into them to learn their capabilities. In case nobody mentioned it before, don't forget to take a look at SQLAlchemy. The object-relational-mapper (ORM) creates a 1:1 ma

Re: Start Python programming

2021-04-28 Thread Alan Gauld via Python-list
On 27/04/2021 18:32, Gazoo wrote: > I'd like to start learning Python programming. What sites/tutorials > could you recommend for beginner, please. There is a getting started page on the python web site with links to guide you to many listed suggestions - books, web tutorials, video courses etc.

RE: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Avi Gross via Python-list
Chris, Given some notice, what stops anyone from joining the mailing list before there is a divorce between the forums? Everybody has trivial access to an email account these days and many mailers allow incoming messages that fit a pattern to be placed in some names folder to be read as a group i

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Jon Ribbens via Python-list
On 2021-05-06, Chris Angelico wrote: > On Thu, May 6, 2021 at 10:32 AM Paul Bryan wrote: >> >> Given the ease of spoofing sender addresses, and its propensity for use >> in anonymous spamming and trolling (thanks python-list-owner for >> staying on top of that!), I propose to disconnect comp.lang

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Jon Ribbens via Python-list
On 2021-05-06, Paul Bryan wrote: > What's involved in moderating c.l.p? Would there be volunteers willing > to do so? Nothing at all is involved, apart from changing the status of the group. The moderation would be done by the same people, in the same way, as the moderation of the list is done no

RE: neoPython : Fastest Python Implementation: Coming Soon

2021-05-05 Thread Avi Gross via Python-list
Chris, I got the fastest python yesterday as it was so fast that it beat the one coming tomorrow. The trick is adding back the legs that evolution allowed to lapse. Without bated breath, Regardless, Avi -Original Message- From: Python-list On Behalf Of Chris Angelico Sent: Wednesday,

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-05 Thread Jon Ribbens via Python-list
On 2021-05-06, Richard Damon wrote: > On 5/5/21 9:40 PM, Jon Ribbens via Python-list wrote: >> On 2021-05-06, Paul Bryan wrote: >>> What's involved in moderating c.l.p? Would there be volunteers willing >>> to do so? >> Nothing at all is involved, apart

Programmed energy use

2021-05-05 Thread Avi Gross via Python-list
Benjamin, The topic is being changed by me because I get amused by statistics. We can all agree that any form of energy use uses energy, duh! But that does not make it good or bad in isolation. If I had a job that had me wake up every day in the dark, drive for an hour to an airport, hop acros

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Richard Damon wrote: > On 5/5/21 10:44 PM, Jon Ribbens via Python-list wrote: >> On 2021-05-06, Richard Damon wrote: >>> As someone with a long usenet background, converting the existing group >>> to moderated would be practically impossible. It just is

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Skip Montanaro wrote: >> Are you unaware that the group is already gatewayed to a moderated >> mailing list for which all of that work is already done? > > What is this moderation of which you speak? I'm one of the Python > postmasters (I maintain the SpamBayes setup) and am aware o

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Richard Damon wrote: > On 5/6/21 6:12 AM, Jon Ribbens via Python-list wrote: >> I think you're fundamentally missing the point that the newsgroup is >> *already gatewayed to the mailing list*. Marking the group moderated >> will not result in any more w

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Skip Montanaro wrote: >> Are you saying that the messages that appear occasionally from people >> such as Ethan Furman claiming to be moderators and alleging that >> particular people have been banned or suspended are lies? And that the >> message I received once saying that my comp

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Richard Damon wrote: > On 5/6/21 9:12 AM, Jon Ribbens via Python-list wrote: >> Are you saying that the messages that appear occasionally from people >> such as Ethan Furman claiming to be moderators and alleging that >> particular people have been banned or su

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Richard Damon wrote: > On 5/6/21 9:44 AM, Jon Ribbens via Python-list wrote: >> Sounds like nearly all moderated lists/forums then. > > Then perhaps you have never been on a real Moderated mailing list or > Forum. Ah, the "no true scotsforum" argum

Re: Proposal: Disconnect comp.lang.python from python-list

2021-05-06 Thread Jon Ribbens via Python-list
On 2021-05-06, Stestagg wrote: > Where's this discussion going? > > Let's not get too caught up on definitions or the sizes of everyone's > respective .. newsgroups. > > Which of the practically possible options are best for this list <-> > newsgroup setup? As before I'd suggest that changing the

RE: Bloody rubbish

2021-05-06 Thread Avi Gross via Python-list
Actually, Joe, putting in any serious program using toggle switches without anything like a BACKSPACE was very hard as I often had to abort and start again. Doing it twice the same way, Argh Luckily, I only had to do it a few times to learn just like I had to write assembler programs o

Re: STARTUP FAILURE

2021-05-13 Thread Alan Gauld via Python-list
On 13/05/2021 14:49, Sumukh chakkirala wrote: > Hello, I have been facing this " startup failure" for a while now, I can > open the IDLE from the programs that I have saved but I'm not able to open > the IDLE directly. Hope you can help me with this issue as soon as possible. > Usual questions:

Re: Standarize TOML?

2021-05-16 Thread Jon Ribbens via Python-list
On 2021-05-15, Jason C. McDonald wrote: > During the Steering Committee presentation at PyCon, it was mentioned > that no one has formally proposed TOML be added to the standard library > (emphasis on formal). THe joke went forth that there would be a flood > of proposals to that end. > > So, just

Re: Writers [Was: Re: Standarize TOML?]

2021-05-18 Thread Jon Ribbens via Python-list
On 2021-05-18, Michael F. Stemper wrote: > On 17/05/2021 18.48, Terry Reedy wrote: >> I disagree.  Rehashing *opinions* is pretty useless. The issues were >> already discussed on >> https://discuss.python.org/t/adopting-recommending-a-toml-parser/4068 >> >> There are multiple packages.  There is

Re: learning python ...

2021-05-24 Thread Rob Cliffe via Python-list
On 24/05/2021 14:34, hw wrote: Your claim that I'm insulting python or anoyone is ridiculous. According to your logic, C is insulting python.  I suggest you stop making assumptions. Calling a mature, widely used language "unfinished" because of what *you* see as a defect *is* insulting. (Of

Re: learning python ...

2021-05-24 Thread Rob Cliffe via Python-list
Please don't be put off by your experience so far.  Everyone stumbles along the way and runs into "gotchas" when learning a new language.  Python is a fantastic language for development.  One of my early "epiphany" moments was experimenting with different algorithms to try to find the right one

Re: learning python ...

2021-05-24 Thread Alan Gauld via Python-list
On 24/05/2021 07:21, hw wrote: >> Inside the function f() the name 'x" shadows the global "x"; references >> to "x" are to the function's local vairable. Which is very desireable. > > If it works that way, I would consider it an entirely different > variable. Remember that in Python variables

Re: learning python ...

2021-05-24 Thread Alan Gauld via Python-list
On 24/05/2021 16:54, Michael F. Stemper wrote: > In my early days of writing python, I created lists named "list", > dictionaries named "dict", and strings named "str". I mostly know better > now, but sometimes still need to restrain my fingers. I think most newbie programmers make that mistake.

Re: learning python ...

2021-05-24 Thread Alan Gauld via Python-list
On 24/05/2021 19:48, Grant Edwards wrote: >> Traceback ( File "", line 1 >> if = 1.234 >>^ >> SyntaxError: invalid syntax > > I must admit it might be nice if the compiler told you _why_ the > syntax is invalid (e.g. "expected conditional expression while parsing > 'if' statement").

Re: learning python ...

2021-05-24 Thread Jon Ribbens via Python-list
On 2021-05-24, Alan Gauld wrote: > On 24/05/2021 16:54, Michael F. Stemper wrote: > >> In my early days of writing python, I created lists named "list", >> dictionaries named "dict", and strings named "str". I mostly know better >> now, but sometimes still need to restrain my fingers. > > I think

RE: learning python ...

2021-05-24 Thread Avi Gross via Python-list
I have studied many programming languages and am amused when people attack python as if every other language is somehow more optimal. Cameron and others have provided examples but look at positives AND negatives. Yes code like: num = int(num) does look a tad off as it reuses the same name for s

Re: learning python ...

2021-05-25 Thread Alan Gauld via Python-list
On 25/05/2021 00:41, Jon Ribbens via Python-list wrote: > What would you call the argument to a function that > returns, say, an upper-cased version of its input? Probably 'candidate' or 'original' or 'initial' or somesuch. Or even just 's'.

string storage [was: Re: imaplib: is this really so unwieldy?]

2021-05-26 Thread Alan Gauld via Python-list
On 25/05/2021 23:23, Terry Reedy wrote: > In CPython's Flexible String Representation all characters in a string > are stored with the same number of bytes, depending on the largest > codepoint. I'm learning lots of new things in this thread! Does that mean that if I give Python a UTF8 string

Re: string storage [was: Re: imaplib: is this really so unwieldy?]

2021-05-26 Thread Jon Ribbens via Python-list
On 2021-05-26, Alan Gauld wrote: > On 25/05/2021 23:23, Terry Reedy wrote: >> In CPython's Flexible String Representation all characters in a string >> are stored with the same number of bytes, depending on the largest >> codepoint. > > I'm learning lots of new things in this thread! > > Does th

Re: string storage [was: Re: imaplib: is this really so unwieldy?]

2021-05-26 Thread Alan Gauld via Python-list
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 because > they become unweildy for other reasons. I do have some scripts that work on large strings - mainl

Re: string storage [was: Re: imaplib: is this really so unwieldy?]

2021-05-26 Thread Alan Gauld via Python-list
On 26/05/2021 22:15, Tim Chase wrote: > If you don't decode it upon reading it in, it should still be 100MB > because it's a stream of encoded bytes. I usually convert them to utf8. > You don't specify what you then do with this humongous string, Mainly I search for regex patterns which can

RE: learning python ...

2021-05-27 Thread Avi Gross via Python-list
ubject: Re: learning python ... When the idea is to learn something, it's not exactly helpful to abandon that idea when encountering the first obstacle or when someone tells you you don't like it as much as they do ... On 5/25/21 7:56 AM, Avi Gross via Python-list wrote: > I have studi

Re: Applying winpdb_reborn

2021-05-29 Thread Alan Gauld via Python-list
On 29/05/2021 19:10, Dennis Lee Bieber wrote: > On Sat, 29 May 2021 09:51:04 -0700 (PDT), Rich Shepard > declaimed the following: >> What I find interesting is that every web page I find on 'using pdb' does no >> more than explain the available commands; they don't explain the debugging >> proces

Re: Applying winpdb_reborn

2021-05-30 Thread Alan Gauld via Python-list
On 30/05/2021 00:03, Cameron Simpson wrote: > I'd imagine debugging is much like it is in C. Wait for the breakpoint > to trip, then inspect the programme variables. That's a pretty crude form of debugging (although much better than just single stepping from the beginning!). Adding conditional

Re: Definition of "property"

2021-05-30 Thread Jon Ribbens via Python-list
On 2021-05-30, Irv Kalb wrote: > I understand what a "property" is, how it is used and the benefits, > but apparently my explanation hasn't made the light bulb go on for my > editor. The editor is asking for a definition of property. I've > looked at many articles on line and a number of books,

Re: Definition of "property"

2021-05-30 Thread Alan Gauld via Python-list
On 30/05/2021 17:57, Irv Kalb wrote: > I am doing some writing (for an upcoming book on OOP), and I'm a little > stuck. Oh dear, that's one of myt hot buttons I'm afraid! I hope it really is about OOP and not about classes. Classes are such a minor part of OOP that it is depressing how many boo

Re: Python doesn't work

2021-05-30 Thread Alan Gauld via Python-list
On 30/05/2021 12:23, Mr.Incognito wrote: >Hello > >I downloaded the latest versioon of Python and tried to open several .py >files, but it doesn't open. It opens for a sec, then closes itself. I >tried uninstalling and reinstalling, but it doesn't work. Most likely it is working b

Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]

2021-05-30 Thread Alan Gauld via Python-list
On 30/05/2021 18:26, [email protected] wrote: > I tried winpdb-reborn some time last year on my Win10 system (python 3.8.3 > at that time), but could not figure out how to use it to debug a python > script that uses the curses module. You are not alone. debugging curses is one of the biggest

RE: Definition of "property"

2021-05-30 Thread Avi Gross via Python-list
-list On Behalf Of Alan Gauld via Python-list Sent: Sunday, May 30, 2021 4:20 PM To: [email protected] Subject: Re: Definition of "property" On 30/05/2021 17:57, Irv Kalb wrote: > I am doing some writing (for an upcoming book on OOP), and I'm a little stuck. Oh dear, tha

ANN: distlib 0.3.2 released on PyPI

2021-05-31 Thread Vinay Sajip via Python-list
I've recently released version 0.3.2 of distlib on PyPI [1]. For newcomers, distlib is a library of packaging functionality which is intended to be usable as the basis for third-party packaging tools. The main changes in this release are as follows: * Fixed #139: improved handling of errors relat

Re: Definition of "property"

2021-05-31 Thread Jon Ribbens via Python-list
On 2021-05-30, Terry Reedy wrote: > Note: at least one person says a property *pretends* to be an attribute. No, I said it pretends to be a *data* attribute. It is effectively several methods in a trenchcoat pretending to be a variable. -- https://mail.python.org/mailman/listinfo/python-list

Re: Definition of "property"

2021-05-31 Thread Alan Gauld via Python-list
On 30/05/2021 23:57, Mike Dewhirst wrote: > > A property is an object method masquerading as a cachable object attribute Or a group of methods perhaps? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Fli

Functions as Enum member values

2021-05-31 Thread Colin McPhail via Python-list
Hi, According to the enum module's documentation an Enum-based enumeration's members can have values of any type: "Member values can be anything: int, str, etc.." I defined one with functions as member values. This seemed to work as long as the functions were defined ahead of the enume

Re: Functions as Enum member values

2021-05-31 Thread Colin McPhail via Python-list
> On 31 May 2021, at 18:24, Peter Otten <[email protected]> wrote: > > On 31/05/2021 17:57, Colin McPhail via Python-list wrote: >> Hi, >> According to the enum module's documentation an Enum-based enumeration's >> members can have values of any t

Re: Definition of "property"

2021-06-01 Thread Jon Ribbens via Python-list
On 2021-05-31, Greg Ewing wrote: > On 31/05/21 9:13 am, Jon Ribbens wrote: >> No, I said it pretends to be a *data* attribute. > > I don't think it's pretending to be anything. From the outside, > it's just an attribute. >From the outside, it's just a *data* attribute. Which, from the inside, it

Re: Definition of "property"

2021-06-01 Thread Alan Gauld via Python-list
On 31/05/2021 01:24, Greg Ewing wrote: > On 31/05/21 8:20 am, Alan Gauld wrote: >> >> That's a very Pythonic description. > > If it's a book about Python, it needs to be. The word "property" > has a very specialised meaning in Python. > > In some other languages it's used the way we use "attribut

Re: Definition of "property"

2021-06-01 Thread Jon Ribbens via Python-list
On 2021-06-01, Greg Ewing wrote: > On 1/06/21 2:34 am, Jon Ribbens wrote: >> From the outside, it's just a *data* attribute. Which, from the inside, >> it isn't. Hence "pretending". > > But what is it about the external appearance that would make > you think it's a data attribute, rather than som

Re: How to debug python + curses? [was: RE: Applying winpdb_reborn]

2021-06-01 Thread Alan Gauld via Python-list
On 31/05/2021 16:16, Grant Edwards wrote: > On 2021-05-30, Alan Gauld via Python-list wrote: >> You are not alone. debugging curses is one of the biggest obstacles to >> its use. > > Can't you just run the debugger in a different window and attach to > the process

Re: Definition of "property"

2021-06-01 Thread Alan Gauld via Python-list
On 31/05/2021 15:59, Dennis Lee Bieber wrote: > On Sun, 30 May 2021 21:20:24 +0100, Alan Gauld via Python-list > declaimed the following: > >> On 30/05/2021 17:57, Irv Kalb wrote: >>> I am doing some writing (for an upcoming book on OOP), and I'm a little >>&

Pandsa to Excel conversion issue

2021-06-01 Thread EK Esawi via Python-list
Hi All-- I am using Pandas to read an excel file which is very "dirty" and needs cleaning. I read the file via pandas and did not setup dtypes or converters hoping i can do so later.. When i run my code, most columns did come out as strings but i cannot convert them to float or integer using a

Re: Neither pdb or print() displays the bug

2021-06-01 Thread Alan Gauld via Python-list
On 01/06/2021 21:18, Rich Shepard wrote: > On Sun, 30 May 2021, Cameron Simpson wrote: > >> I've only just started with pdb. As of Python 3.7 there's a builtin >> function named breakpoint() which drops you into the debugger. > I'm stuck with neither approach (pdb, print()) working. > The act

fabric: fab command

2021-06-02 Thread jayshankar nair via Python-list
Hi, I am unable to find the package for the below module. The error shows when i run the command fab(fabric). import tools.fab.dev_utils as dev_utilsImportError: No module named tools.fab.dev_utils Please let me know which package i have to install. Thanks,Jayshankar -- https://mail.python.org/

Re: fabric: fab command

2021-06-02 Thread Alan Gauld via Python-list
On 02/06/2021 14:35, jayshankar nair via Python-list wrote: > import tools.fab.dev_utils as dev_utilsImportError: No module named > tools.fab.dev_utils > Please let me know which package i have to install. Work backwards. Can you import tools.fab? Can you import tools? Once you know

Re: Replacement for Mailman

2021-06-08 Thread Jon Ribbens via Python-list
On 2021-06-08, D'Arcy Cain wrote: > Given that mailman still runs under 2.7 and that's being deprecated, > does anyone have a suggestion for a replacement? There is always Mailman 3... -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacement for Mailman

2021-06-08 Thread Jon Ribbens via Python-list
On 2021-06-08, Grant Edwards wrote: > On 2021-06-08, Paul Bryan wrote: >> How about Mailman 3.x on Python 3.x? > > According to https://www.gnu.org/software/mailman/requirements.html > mailman 3.x still requires Python 2.7 for the archiver and the web UI. I'm pretty sure that's out of date. --

Re: Replacement for Mailman

2021-06-08 Thread Jon Ribbens via Python-list
On 2021-06-08, Terry Reedy wrote: > On 6/8/2021 4:36 PM, Jon Ribbens via Python-list wrote: >> On 2021-06-08, Grant Edwards wrote: >>> On 2021-06-08, Paul Bryan wrote: >>>> How about Mailman 3.x on Python 3.x? >>> >>> According to https:

jython getting started question

2021-06-11 Thread Steve Pruitt via Python-list
Not sure if this is the right list for jython questions. I am getting started with both python and jython. My use case need is invoking python from java. org.python:jython:2.7.2 loaded ok. To check, I executed the following. ScriptEngineManager manager = new ScriptEngineManager(); List engine

Re: jython getting started question

2021-06-11 Thread Steve Pruitt via Python-list
f of Steve Pruitt via Python-list Sent: Friday, June 11, 2021 9:24 AM To: [email protected] Subject: [EXTERNAL] - jython getting started question CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know t

Re: Tkinter8.6: date picker

2021-06-14 Thread Alan Gauld via Python-list
On 11/06/2021 22:20, Rich Shepard wrote: > I need a date picker +1 -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/ma

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

2021-06-14 Thread Alan Gauld via Python-list
On 13/06/2021 04:21, dn via Python-list wrote: > What do you think a professionally-recognisable series of skill-levels > for programmers? This has been done or attempted many times, with perhaps the most complete scheme being the British Computer Society's "Industry Standard Mod

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

2021-06-14 Thread Pascal B via Python-list
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 one port for the connection to the database open. If using Python with a tkinter gui,

Re: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-14 Thread Rob Cliffe via Python-list
This puzzled me, so I played around with it a bit (Python 3.8.3): n = [] for i in range(3):     n.append((1,7,-3,None,"x")) for i in range(3):     n.append((1,7,-3,None,"x")) print([id(x) for x in n]) a = 4 n = [] for i in range(3):     n.append((1,7,-3,a,None,"x")) for i in range(3):     n.appe

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
May I ask if there are any PRACTICAL differences if multiple immutable tuples share the same address or not? I mean if I use a tuple in a set or as the key in a dictionary and a second one comes along, will it result in two entries one time and only one the other time? Some languages I use often

RE: Why the list creates in two different ways? Does it cause by the mutability of its elements? Where the Python document explains it?

2021-06-15 Thread Avi Gross via Python-list
Greg, My point was not to ASK what python does as much as to ask why it matters to anyone which way it does it. Using less space at absolutely no real expense is generally a plus. Having a compiler work too hard, or even ask the code to work too hard, is often a minus. If I initialized the tuple

Re: tkinter: tksheet

2021-06-16 Thread Alan Gauld via Python-list
On 16/06/2021 21:45, Rich Shepard wrote: > The two applications I'm building are both database applications. If > tksheet() is not the most appropriate widget to display database tables what > alternative would be better? I've not used tksheet but it sounds like it might be worth investigating.

Re: tkinter: tksheet

2021-06-17 Thread Alan Gauld via Python-list
On 17/06/2021 00:15, Rich Shepard wrote: > When I view my contacts table it needs to includes attributes from the > company, people, and contacts tables so I can view all prior contacts with > that person. Sounds like a job for a database view. Can you modify the database schema? Could you create

Re: Strange disassembly

2021-06-18 Thread Rob Cliffe via Python-list
On 18/06/2021 11:04, Chris Angelico wrote: sys.version '3.10.0b2+ (heads/3.10:33a7a24288, Jun 9 2021, 20:47:39) [GCC 8.3.0]' def chk(x): ... if not(0 < x < 10): raise Exception ... dis.dis(chk) 2 0 LOAD_CONST 1 (0) 2 LOAD_FAST0

Re: Strange disassembly

2021-06-19 Thread Rob Cliffe via Python-list
On 19/06/2021 07:50, Chris Angelico wrote: On Sat, Jun 19, 2021 at 4:16 PM Rob Cliffe via Python-list wrote: On 18/06/2021 11:04, Chris Angelico wrote: sys.version '3.10.0b2+ (heads/3.10:33a7a24288, Jun 9 2021, 20:47:39) [GCC 8.3.0]' def chk(x): ... if not(0 < x

Re: Anaconda navigator not working

2021-06-20 Thread Rob Cliffe via Python-list
I'm afraid I can't help at all, but I have many times (well, it feels like many) encountered the     "%1 is not a valid Win32 application" error message.  It looks like a format string that has not been given an argument to format. I would guess it's a bug either in Windows or somewhere in Pyth

RE: Optimizing Small Python Code

2021-06-22 Thread Avi Gross via Python-list
I had a similar question, Greg. Optimized for what, indeed. Some might suggest removing a VISIBLE loop is an optimization and some might not. First you need to look at what your code does. It is fairly primitive. Here is a two-line version but is it simpler: for n in range(1, 7): print (n,

RE: Optimizing Small Python Code

2021-06-23 Thread Avi Gross via Python-list
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 a problem harder such as by specifying an N that varies then testing it with an arbitrary N. But I suggest t

RE: Optimizing Small Python Code

2021-06-24 Thread Avi Gross via Python-list
rtional to the length of the output, that makes the output time also O(n^2) here too. So I guess this only looks like it's reduced to linear because the output here is very small. For large n it would become obvious. jan On 24/06/2021, Avi Gross via Python-list wrote: > Yes, I

RE: Optimizing Small Python Code

2021-06-24 Thread Avi Gross via Python-list
[email protected] Subject: Re: Optimizing Small Python Code On 24 Jun 2021, at 16:58, Avi Gross via Python-list mailto:[email protected]> > wrote: Now a has a length of 53! It now looks like this: b'x\x9c3\xe4R\x00\x03\x03.#8\x0bB\x1br\x19c\x88(\x18q\x99p!q\xc1\x00\

Re: pyttsx3 installation error

2021-07-02 Thread Roland Mueller via Python-list
What's about installing? https://pypi.org/project/pyttsx3/ pe 2. heinäk. 2021 klo 23.41 Nikita Lohale ([email protected]) kirjoitti: > Traceback (most recent call last): > File "f:\Nikita\Python programming\Iron Man Jarvis AL\jarvis.py", line > 1, in > import pyttsx3 > ModuleNotFoun

Re: Tkinter widgets for desktop database application

2021-07-14 Thread Alan Gauld via Python-list
On 13/07/2021 21:24, Rich Shepard wrote: > What have other developers used for the UI on a stand-alone database > application not using a web browser? Mostly I just use a scrolledlistbox and a set of functions for formatting the data into columns for display. The big snag is you can't do spreads

RE: Searching pypi.org, is there an 'advanced search'?

2021-07-17 Thread Avi Gross via Python-list
Chris, Just a bit off topic, but google does have some advanced features such as using the word AND or putting something in quotes to make it search for the combination written the same way. Some of the tricks work for other search engines too. Google does have an advanced search feature here

Re: Where to keep local Python modules?

2021-07-23 Thread Roland Mueller via Python-list
Hello, pe 23. heinäk. 2021 klo 21.44 Chris Green ([email protected]) kirjoitti: > This isn't a question about how to set PYTHONPATH so that Python code > can find imported modules, it's about what is a sensible layout for > one's home directory - i.e. where to put Python modules. > > I'm running Linu

a simple question

2021-07-26 Thread Glenn Wilson via Python-list
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 is correct: pat.forward(100) is an example. Can you tell me what is wrong.      thanks

RE: a simple question

2021-07-26 Thread Avi Gross via Python-list
:58 + (UTC), Glenn Wilson via Python-list declaimed the following: >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 is corr

Re: argparse: delimiter for argparse list arguments

2021-08-03 Thread Jon Ribbens via Python-list
On 2021-08-03, Michael Torrie wrote: > On 8/2/21 1:43 PM, Sven R. Kunze wrote: >> maybe, I am missing something here but is it possible to specify a >> delimiter for list arguments in argparse: >> >> https://docs.python.org/3/library/argparse.html >> >> Usually, '--' is used to separate two lis

Re: argparse: delimiter for argparse list arguments

2021-08-03 Thread Jon Ribbens via Python-list
On 2021-08-03, Roel Schroeven wrote: > Jon Ribbens via Python-list schreef op 3/08/2021 om 17:48: >> On 2021-08-03, Michael Torrie wrote: >> > On 8/2/21 1:43 PM, Sven R. Kunze wrote: >> >> maybe, I am missing something here but is it possible to specify a >>

Re: Ask for help on using re

2021-08-06 Thread Jon Ribbens via Python-list
On 2021-08-06, jak wrote: > Il 06/08/2021 16:17, jak ha scritto: >> Il 06/08/2021 12:57, Jach Feng ha scritto: >>> That's an interest solution! Where the '|' operator in re.compile() >>> was documented? >> >> I honestly can't tell you, I've been using it for over 30 years. In any >> case you can

Re: Flask – how to write csv file & save using prefilled value of the filename (response.headers["Content-Disposition"]="attachment; filename=xxx")

2021-08-09 Thread Roland Mueller via Python-list
pe 6. elok. 2021 klo 19.15 MRAB ([email protected]) kirjoitti: > On 2021-08-06 16:50, Suretha Weweje wrote: > > I am trying to upload a CSV file with flask, read and process one line > at a > > time while iterating through all rows of the file and write the results > > back to a new CSV f

Re: some problems for an introductory python test

2021-08-11 Thread Wolfram Hinderer via Python-list
Am 11.08.2021 um 05:22 schrieb Terry Reedy: Python is a little looser about whitespace than one might expect from reading 'normal' code when the result is unambiguous in that it cannot really mean anything other than what it does.  Two other examples: >>> if3: print('yes!') yes! >>> [0]  [0]

<    23   24   25   26   27   28   29   30   31   32   >