Re: Please tell me how to execute python file in Ubuntu by double

2017-12-12 Thread alister via Python-list
to "shake the box" > by running it. Back to the original problem has the execute bit been set on the file? -- All Hell hadn't been let loose. It was merely Detritus. But from a few feet away you couldn't tell the difference. (The Fifth Elephant) -- https://mail.python.org/mailman/listinfo/python-list

Re: Please tell me how to execute python file in Ubuntu by double

2017-12-15 Thread alister via Python-list
if I snore." -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Learning

2017-12-17 Thread alister via Python-list
On Sat, 16 Dec 2017 14:41:00 +1200, Marko Rauhamaa wrote: > r...@zedat.fu-berlin.de (Stefan Ram): > >> Varun R writes: >>>I'm new to programming, can anyone guide me, how to start learning >>>python programming language >> >> As a start, one sh

Re: What is wrong with this regex for matching emails?

2017-12-19 Thread alister via Python-list
a registration process, in which case if it is incorrect the registration email will not be received & registration cannot be completed so self validating without any effort. -- OMNIVERSAL AWARENESS?? Oh, YEH!! First you need four GALLONS of JELL-O and a BIG WRENCH!! ... I think you drop th'WRENCH in the JELL-O as if it was a FLAVOR, or an INGREDIENT ... ... or ... I ... um ... WHERE'S the WASHING MACHINES? -- https://mail.python.org/mailman/listinfo/python-list

Re: What is wrong with this regex for matching emails?

2017-12-19 Thread alister via Python-list
On Wed, 20 Dec 2017 08:21:02 +1100, Chris Angelico wrote: > On Wed, Dec 20, 2017 at 7:21 AM, alister via Python-list > wrote: >> On Mon, 18 Dec 2017 07:57:27 +1100, Ben Finney wrote: >>> A more correct match would boil down to: >>> >>> * Match any print

Re: Goto

2017-12-28 Thread alister via Python-list
On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: > How to use goto in python? > > --- > This email has been checked for viruses by AVG. > http://www.avg.com Dont! actually you cant - there isn't one* *at least not in the core language no doubt some sick person will h

Re: Goto

2017-12-29 Thread alister via Python-list
On Thu, 28 Dec 2017 18:54:31 -0800, breamoreboy wrote: > On Thursday, December 28, 2017 at 7:40:14 PM UTC, alister wrote: >> On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: >> >> > How to use goto in python? >> > >> > --- >> > This e

Humble Book Bundle: Python by Packt

2018-01-01 Thread beliavsky--- via Python-list
One can purchase the following Python books and videos published by Packt for $15 at https://www.humblebundle.com/books/python-by-packt-book-bundle for about the next two weeks. Python Data Analysis Cookbook Mastering Python, Second Edition Learning Robotics using Python Python Programming with

Re: : ✨🍰✨ python 2018 wiki - a piece of cake ✨🍰✨ --- 🙄🙄🙄

2018-01-08 Thread alister via Python-list
On Mon, 08 Jan 2018 15:55:00 +, user net wrote: > Abdur-Rahmaan Janhangeer: >> there is a language called python by guido >> >> you can ask your questions here ! > > > > ✨🍰✨ python - a piece of cake ✨🍰✨ > > > when u read this post in

Re: Installing "kitchen" module

2018-01-22 Thread alister via Python-list
On Mon, 22 Jan 2018 08:19:51 -0800, codydaviestv wrote: > On Tuesday, 23 January 2018 02:41:04 UTC+10:30, bream...@gmail.com > wrote: >> On Monday, January 22, 2018 at 3:37:44 PM UTC, codyda...@gmail.com >> wrote: >> > So here's the situation. I am unfam

Re: error from Popen only when run from cron

2018-01-27 Thread Wildman via Python-list
Cron provides this as $PATH: /usr/bin;/usr/sbin >From within a terminal enter: whereis service If service is not in Cron's $PATH, that is your problem. Adding the complete path to 'service' in the script should fix things. If service is in Cron's $PATH, I have no further ideas. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-28 Thread Wildman via Python-list
modem off and leave the internet forever.) I can think of no justification for it. -- GNU/Linux user #557453 May the Source be with you. -- https://mail.python.org/mailman/listinfo/python-list

Issues while using CallerLookup Package

2018-01-29 Thread Mark.luther0987 via Python-list
ages\CallerLookup\Main.py", line 6, in from CallerLookup.Responses import * File "C:\Python27\lib\site-packages\CallerLookup\Responses.py", line 7, in from CallerLookup.Utils.Logs import format_exception ImportError: No module named Utils.Logs I tried on python 2.7

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
gt; That might be more a problem of power. I would simply repeatedly reject the fault report until the user provided the information in the requested format -- Work smarter, not harder, and be careful of your speling. -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
g, are more powerful than is generally understood. Indeed, the world is ruled by little else. -- John Maynard Keyes -- https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
https://mail.python.org/mailman/listinfo/python-list

Re: Where has the practice of sending screen shots as source code come from?

2018-01-30 Thread alister via Python-list
> simpler and more effective to explicitly check your mirror (as the Dutch > actually do). > > >> Presumably it goes beyond the 'inconvenience' of images-instead-of-text >> to the saving-of-lives… > > I have no idea what connection you think is between

Re: Where has the practice of sending screen shots as source code come from?

2018-01-31 Thread alister via Python-list
On Tue, 30 Jan 2018 21:22:39 +0100, Jugurtha Hadjar wrote: > On 01/29/2018 03:48 PM, alister via Python-list wrote: >> On Mon, 29 Jan 2018 15:20:06 +0100, Jugurtha Hadjar wrote: >> >>> On 01/28/2018 04:43 PM, Skip Montanaro wrote: >>>> I've never b

Re: Help to debug my free library

2018-01-31 Thread alister via Python-list
27;t know a bug if he were eating it for dinner. His > posts are blocked on the mailing list, and you'd do well to just plonk > him in your newsreader. > > ChrisA I disagree jmf's posts are worth reading, if you find yourself agreeing with him you know you have got something

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-01 Thread alister via Python-list
; > Seeing the spam postings in this newsgroup, I expect something similar > may happen to comp.lang.python, soon. simple solution stop using google groups & use either the mailing list or a news server with an NNTP client -- Your wig steers the gig. -- Lord Buckley -- https://mail.python.org/mailman/listinfo/python-list

Re: This newsgroup (comp.lang.python) may soon be blocked by Google Groups

2018-02-03 Thread alister via Python-list
ou know that, autistic or not, you have the power to choose the > tone of the words you type? > > ChrisA indeed my son is mildly autistic. I always explained to him that that diagnosis did not give him an excuse, it simply gave him an explanation of why things were harder for him. -- If it's worth doing, it's worth doing for money. -- https://mail.python.org/mailman/listinfo/python-list

Can't load Python program on my HP ENVY computer

2018-02-04 Thread Bernard via Python-list
I have an HP ENVY TouchSmart 17 Notebook PC. Windows 8.1. Intel(R) Core(TM) i7-4700 mQ cpu @ 2.40 ghz 2.40ghz 64-bit operation system x64 based processor Full Windows touch support with 10 touch points Can you send me the link to the correct Python version that will run on this computer

Re: "None" and "pass"

2018-02-06 Thread alister via Python-list
failed edit or > something. Having a placeholder shows that it's intentional. > > ChrisA indeed and pass was implemented for precisely this usage why even think about possible alternatives -- Use an accordion. Go to jail. -- KFOG, San Francisco -- https://mail.python.org/mailman/listinfo/python-list

Re: This newsgroup (comp.lang.python) may soon be blocked by Google

2018-02-11 Thread alister via Python-list
>> ssh would be even a bigger problem here. As I mentioned, I can't even >> email from work to the outside! All web sites that provide remote >> connectivity tools are blocked. >> >> Regards, >> Igor. >> > If they take such restrictive practices then maybe should consider > *just* doing your job when at work and leave the browsing to your own > time? I would also suggest that you consider the above statement ha snot been made out of malice but is trying to protect you. if the restrictions are as strict as you say and you get seen you will probably loose your job. -- Xerox does it again and again and again and ... -- https://mail.python.org/mailman/listinfo/python-list

Re: Regex on a Dictionary

2018-02-13 Thread alister via Python-list
On Tue, 13 Feb 2018 13:42:08 +, Rhodri James wrote: > On 13/02/18 13:11, Stanley Denman wrote: >> I am trying to performance a regex on a "string" of text that python >> isinstance is telling me is a dictionary. When I run the code I get >> the followi

Re: Respam levels.

2018-02-13 Thread alister via Python-list
s. The reformatting of the body of message is to > date trivial, just a reduction in line length. > > This may be the result of a misconfigured spam filter, or an actual spam > attack; anyway, I've now filtered news.bbs.geek.nz from my feed. > > Will many thanks for the effort /dev/null on my laptop is now almost full with this junk :-) -- Let's do it. -- Gary Gilmore, to his firing squad -- https://mail.python.org/mailman/listinfo/python-list

Python 2 to 3 Conversion

2018-02-16 Thread Wildman via Python-list
I have a bit of code I found on the web that will return the ip address of the named network interface. The code is for Python 2 and it runs fine. But, I want to use the code with Python 3. Below is the code followed by the error message. Suggestions appreciated. #!/usr/bin/env python3

Re: Python 2 to 3 Conversion

2018-02-18 Thread Wildman via Python-list
d so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 to 3 Conversion

2018-02-18 Thread Wildman via Python-list
On Sun, 18 Feb 2018 20:51:18 +1100, Chris Angelico wrote: > On Sun, Feb 18, 2018 at 4:35 AM, Wildman via Python-list > wrote: >> Thanks to Chris and Ben. Your suggestions were slightly >> different but both worked equally well, although I don't >>

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Mon, 19 Feb 2018 12:32:49 +, Rhodri James wrote: > On 18/02/18 16:18, Wildman via Python-list wrote: >>> But that's only going to show one (uplink) address. If I needed to get >>> ALL addresses for ALL network adapters, I'd either look for a library, >>

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
-Spike -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Tue, 20 Feb 2018 05:39:15 +1100, Chris Angelico wrote: > On Tue, Feb 20, 2018 at 3:53 AM, Wildman via Python-list > wrote: >> On Tue, 20 Feb 2018 02:26:19 +1100, Chris Angelico wrote: >> >>> * Opaque IOCTLs >> >> Would you mind to elaborate a little ab

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Tue, 20 Feb 2018 05:31:27 +1100, Chris Angelico wrote: > On Tue, Feb 20, 2018 at 3:49 AM, Wildman via Python-list > wrote: >> On Mon, 19 Feb 2018 12:32:49 +, Rhodri James wrote: >> >>> On 18/02/18 16:18, Wildman via Python-list wrote: >>>>>

Re: Python 2 to 3 Conversion

2018-02-19 Thread Wildman via Python-list
On Tue, 20 Feb 2018 10:55:28 +1100, Chris Angelico wrote: > The given homepage URL is > http://alastairs-place.net/projects/netifaces/ - is that the right > one? > > ChrisA Yes, that is the right one. Now I'm feeling a little stupid. I should have remembered that many py

Re: py2exe maintainer abandoned the project; is there any replacements? Or, anyone willing to continue the work?

2018-02-21 Thread Kryptxy via Python-list
https://sourceforge.net/p/py2exe/mailman/message/36033869/ > > Is there any > suitable replacement with similar or better capabilities? > There is > PyInstaller, which works on all major OS: http://www.pyinstaller.org/ > Christian -- https://mail.python.org/mailman/listinfo/python

Re: How to make Python run as fast (or faster) than Julia

2018-02-23 Thread alister via Python-list
On Fri, 23 Feb 2018 03:11:36 -0500, Terry Reedy wrote: > On 2/22/2018 10:31 PM, Python wrote: > >>> Why do you care about the 50 million calls? That's crazy -- the >>> important thing is *calculating the Fibonacci numbers as efficiently >>> as possibl

Re: How to only get \n for newline without the single quotes?

2018-02-24 Thread Wildman via Python-list
On Sat, 24 Feb 2018 11:41:32 -0600, Peng Yu wrote: > I would like to just get the escaped string without the single quotes. > Is there a way to do so? Thanks. > >>>> x='\n' >>>> print repr(x) > '\n' Python 3.5.3 (default, Jan 19 2

Re: help me ?

2018-02-27 Thread alister via Python-list
; > Help me ! Try staying awake in class where I am sure what you need would have been covered before the assignment was set failing that try reading any of the python tutorials available on the internet -- A career is great, but you can't run your fingers through its hair. -- https

Re: psutil

2018-02-27 Thread Wildman via Python-list
On Tue, 27 Feb 2018 19:29:50 -0500, Larry Martell wrote: > Trying to install psutil (with pip install psutil) on Red Hat EL 7. > It's failing with: > > Python.h: No such file or directory > > Typically that means the python devel libs are not installed, but they are: &

Re: py2exe output flagged as malware

2018-02-28 Thread alister via Python-list
On Wed, 28 Feb 2018 09:53:09 +, Robin Becker wrote: > I see this has happened to others in the past. I'm using 32 bit python > 2.7.10 with py2exe 3.3 on windows 7. The exes work fine, > but when I try to download into windows 10 I'm getting the exes > immediately remov

Re: Problem: Need galileo running on debian wheezy

2018-03-01 Thread Wildman via Python-list
don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Bypassing firewall

2018-03-05 Thread Alister via Python-list
On Mon, 05 Mar 2018 08:37:14 +, Faruq Bashir wrote: > How will i bypass web application firewall For what purpose? is this your firewall? -- https://mail.python.org/mailman/listinfo/python-list

Re: Style for docstring

2022-04-22 Thread alister via Python-list
n group theory in there to help somebody who doesn't know what > those standard terms mean.) four guidance I would sugest Pep257 as a start point which would suggest "Return True if permutation is even" -- I think my career is ruined! -- https://mail.python.org/mailman/listinfo/python-list

Re: Style for docstring

2022-04-23 Thread jan via Python-list
d to write "return true iff this". > > BTW: As a language element that helps to construct a boolean > expression from a file name, some languages, like SQL, use > "EXISTS", while others, like MS-DOS-batch, use "EXIST". > > > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: new sorting algorithm

2022-05-02 Thread jan via Python-list
#x27;t be pathologically slow. It's hardly Quicksort's best > feature, but it could easily be a lot worse. I'd have to check, but I > think it still manages to be O(n log n). Merge sort, of course, is a > lot more consistent, but the asymptotic cost is still broadly the > same. > > But Timsort manages to be close to O(n) for sorted data, reversed > data, nearly-sorted or nearly-reversed data, etc. Makes it very handy > for jobs like "click a heading to sort by it", where you might add > multiple sort keys. > > (Plus, Python's implementation has some cool tricks for small > collections that make it quite efficient.) > > ChrisA > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

Re: Changing calling sequence

2022-05-11 Thread anthony.flury via Python-list
Why not do : def TempsOneDayDT(date:datetime.date): return TempsOneDay(date.year, date.month, date.day) No repeat of code - just a different interface to the same functionality. -- Original Message -- From: "Michael F. Stemper" To: python-list@

Re: [Python-ideas] Re: New Tool Proposal

2022-05-11 Thread anthony.flury via Python-list
On 10/05/2022 15:04, Dan Stromberg wrote: On Tue, May 10, 2022 at 3:15 AM Chris Angelico wrote: > It is often the case that developer write Code in Python and then convert to a C extension module for performance regions. > > A C extension module has a lot of boiler p

Re: [docs] Reporting a Bug

2022-05-12 Thread anthony.flury via Python-list
rd 'meaning' nothing else is removed and the new string is returned. The argument passed to strip(..) method is the set of characters to be removed - so any characters in that set are removed from the start and end of the string. -- Original Message -- From: "Jeff Jeffi&qu

Re: Python & nmap

2022-05-19 Thread alister via Python-list
o upload 100 devices, I have a lan and a dhcp server just > for this work and I'd like to make a script by Python which can: > > 1) To scan the lan 2) To find which ips are "ready" > 3) To send files to all of the "ready" clients 4) After I see on the > display

Re: installing

2022-06-11 Thread Freethinker via Python-list
On 10.06.22 21:29, Grant Edwards wrote: On 2022-06-10, Yusuf Özdemir wrote: ? Your question is a bit vague. -- Grant Hahahahaha, to say the least! -- https://mail.python.org/mailman/listinfo/python-list

Re: why function throws an error?

2022-06-28 Thread Mirko via Python-list
es variables or functions from other modules. And sometimes those cases will be difficult to spot. Python is not designed for what you are trying to do. Even if you get this done, it will not help you. You can't just throw everything into a single file and then magically optimize it. Wh

Clabate: minimalistic class-based templates for Python

2022-08-02 Thread Axy via Python-list
lists from my own mail server before, and this is the only problem left to dig in. Sorry for bothering. Axy -- https://mail.python.org/mailman/listinfo/python-list

Re: Conecting to MySQL

2022-08-09 Thread Axy via Python-list
ion? Firewall usually causes connection to hang and timeout with no response. But in this case connection looks immediately refused which means either port number is wrong or mysql is not listening on 127.0.0.1. Axy -- https://mail.python.org/mailman/listinfo/python-list

Re: Humour

2022-09-06 Thread alister via Python-list
On Sun, 4 Sep 2022 02:08:20 -0700 (PDT), Ali Muhammad wrote: > Hi python devs it seems you do not have a sense of humour and I am here > to change that please I request to make it so on April 1st you change > the print function to a capital P this will be funny and people will use &

Asynchronous execution of synchronous functions

2022-09-26 Thread Axy via Python-list
h is quite difficult to dig out with modern search engines that have already rolled down to hell a decade ago. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous execution of synchronous functions

2022-09-26 Thread Axy via Python-list
lock (GIL) that prevents full parallelism. Processes work as expected, but require IPC and pickable objects in and out. yes, that became a problem. So, I revoke my question. Went out to redesign the whole approach. Thanks for reply! Axy. -- https://mail.python.org/mailman/listinfo/python-list

for -- else: what was the motivation?

2022-10-07 Thread Axy via Python-list
Hi there, this is rather a philosophical question, but I assume I miss something. I don't remember I ever used else clause for years I was with python and my expectation was it executed only if the the main body was never run. Ha-ha! I was caught by this mental trap. So, seriously, why

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
ould just return early, terminating outer loop with no other boolean logic. I have no idea why I thought so, some language might had such a semantic. Maybe my own I developed 20 years ago, but I could not invent that by myself, I definitely had some source of inspiration. Python is awesome beca

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
On 09/10/2022 05:47, Chris Angelico wrote: On Sun, 9 Oct 2022 at 15:39, Axy via Python-list wrote: Got it, thanks! Actually the reason I never used "else" was the violation of the rule of beauty "shortest block first". With if--else you can easily follow this r

Re: for -- else: what was the motivation?

2022-10-08 Thread Axy via Python-list
st: do easy and quick things first and boring and difficult ones later. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-09 Thread Axy via Python-list
you're paid for SLOC :-))) By the way, does "else" clause after affect cyclomatic complexity metric? I mean "for" loops. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 09/10/2022 03:33, Jach Feng wrote: Axy 在 2022年10月8日 星期� �上午11:39:44 [UTC+8] 的信中寫道: Hi there, this is rather a philosophical question, but I assume I miss something. I don't remember I ever used else clause for years I was with python and my expectation was it executed only if the the

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
Not sure what you mean, but a for-else without a break is quite useless. What exactly ARE you arguing here? The else is associated with the break to the exact extent that one is essential to the other's value. I'm not arguing. That was just for the record, how things are done

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 10/10/2022 12:24, Chris Angelico wrote: On Mon, 10 Oct 2022 at 21:57, Axy via Python-list wrote: Not sure what you mean, but a for-else without a break is quite useless. What exactly ARE you arguing here? The else is associated with the break to the exact extent that one is essential

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 10/10/2022 15:52, Weatherby,Gerard wrote: Core developer Raymond Hettinger explains the history starting at 15:40 https://www.youtube.com/watch?v=OSGv2VnC0go (which I found on stackoverflow https://stackoverflow.com/questions/9979970/why-does-python-use-else-after-for-and-while-loops

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
    return False     return True for node in tree.body:     check_ast(node) -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-10 Thread Axy via Python-list
On 10/10/2022 19:25, Weatherby,Gerard wrote: pylint, at least, provides a warning: fe.py:4:0: W0120: Else clause on loop without a break statement (useless-else-on-loop) I'm using flake8, it does not, alas. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: for -- else: what was the motivation?

2022-10-11 Thread Axy via Python-list
ractices eventually become notorious. There are many point of views to every feature but in general features aren't divine and worth revising even this looks disparaging. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Can you help me with this Python question?

2022-10-13 Thread Axy via Python-list
me].isnull().sum() for name in df.columns) Axy On 13/10/2022 13:44, Sarah Wallace wrote: For a python class I am taking.. In this challenge, you'll be working with a DataFrame that contains data about artworks, and it contains many missing values. Your task is to create a variable called na_su

Re: for -- else: what was the motivation?

2022-10-16 Thread Axy via Python-list
their book: "Please write in C". Same here: please speak in English. Although, if you like that idea who can stop you? In such a case I vote for ภาษาไทย Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: xml.etree and namespaces -- why?

2022-10-19 Thread Axy via Python-list
I mean, it's worth to look at BeautifulSoup source how do they do that. With BS I work with attributes exactly as you want, and I explicitly tell BS to use lxml parser. Axy. On 19/10/2022 14:25, Robert Latest via Python-list wrote: Hi all, For the impatient: Below the longish text is a

Re: xml.etree and namespaces -- why?

2022-10-19 Thread Axy via Python-list
h SVG, I used BeautifulSoup. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
if (b>dict[a]): dict[a]=b else: dict[a]=b return(dict.values()) This solution giving the answer as type odict_values. I'm not quite sure what this type is, but it seems to be a sequence/iterable/enumerable type, whatever the word is in Python. C

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
dict): if (b>dict[a]): dict[a]=b else: dict[a]=b return(sorted(dict.values())) -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-11 Thread Pancho via Python-list
On 11/11/2022 20:58, Thomas Passin wrote: On 11/11/2022 2:22 PM, Pancho via Python-list wrote: On 11/11/2022 18:53, DFS wrote: On 11/11/2022 12:49 PM, Dennis Lee Bieber wrote: On Fri, 11 Nov 2022 02:22:34 -0500, DFS declaimed the following: [(0,11), (1,1),  (2,1),   (0,1) , (1,41), (2,2

Re: Superclass static method name from subclass

2022-11-13 Thread Axy via Python-list
', other) self.additions.append(other) return self Full article: https://declassed.art/en/blog/2022/07/02/a-note-on-multiple-inheritance-in-python -- https://mail.python.org/mailman/listinfo/python-list

Re: Need max values in list of tuples, based on position

2022-11-13 Thread Pancho via Python-list
] - So now the challenge is making it a one-liner! x = [(11,1,1),(1,41,2),(9,3,12)] print(functools.reduce( lambda a,b : [max(w,c) for w,c in zip(a,b)], x, [0]*len(x[0]))) -- https://mail.python.org/mailman/listinfo/python-list

Re: Are these good ideas?

2022-11-14 Thread Axy via Python-list
to pass 6 or 7 parameters down through several layers of logic (function A calling function B calling ... ) and for results to be passed back. Nothing fancy here, we used dicts for args and results. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Are these good ideas?

2022-11-14 Thread Axy via Python-list
On 15/11/2022 04:36, Dan Stromberg wrote: On Mon, Nov 14, 2022 at 11:33 AM Axy via Python-list wrote: On 14/11/2022 17:14, Stephen Tucker wrote: > Hi, > > I have two related issues I'd like comments on. > > Issue 1 - Global Values Your "

Re: Passing information between modules

2022-11-18 Thread Axy via Python-list
n be regarded as bad. However, if nothing else works (including suggested globals.py module), then os.environ could be a better way. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Panoptisch - A way to understand your project's dependencies and find malicious packages

2022-12-08 Thread Axy via Python-list
ilman/listinfo/python-list

Announcing Clabate 0.5.0: minimalistic class-based templates for Python

2022-12-09 Thread Axy via Python-list
ight order. For dynamic content you can use class properties, and inline invocations, such as 'hello, {my_db:get_name({person_id!r})}' https://github.com/declassed-art/clabate Axy -- https://mail.python.org/mailman/listinfo/python-list

Fun with python string formatting

2022-12-18 Thread Axy via Python-list
:     {li:item 1}     {li[+]:item 2}     {li[-]:item 3} } Rendered as: * item 1 + item 2 - item 3 Quirks -- {ol:     {li:item one}     Basically, lists may contain any literal text.     In terms of python formatting this is not an error,     but that's not good for rendering.     {l

Re: Fwd: Installation hell

2022-12-19 Thread j via Python-list
I agree. Wasted too much time on last few installs. It got to the point I downloaded python-embedded, unzipped it and set the path manually for my work (needed it as part of a compiler). It ain't good enough. And I like python. jan On 18/12/2022 11:50, Jim Lewis wrote: I'm an

Re: Fwd: Installation hell

2022-12-19 Thread j via Python-list
I was unclear. I use the full path to the folder with the unzipped python-embedded. I shouldn't have said 'set'. I have complained on here before about broken installs but got indifference. An installer should install stuff correctly (leaving a working environment). If it

Re: Fast lookup of bulky "table"

2023-01-15 Thread dn via Python-list
nsert/updates. Others are about look-ups (data-retrieval). A basic RDBMS, just as a Python dict, may only offer a single key for efficient retrieval. Postgres and MySQL (for example) enable the establishment of multiple and sophisticated indices/indexes, and the aptly-named "views" of

Re: Improvement to imports, what is a better way ?

2023-01-18 Thread dn via Python-list
lem. The primary interest is to remove "burden" aka complexity. In using TDD, code is constructed module-by-module (not necessarily a Python Module). So, when it comes time to call avMedia.fetch_the_file() [sic] there is little thinking about the "avMedia" bit. The emphasis i

Re: evaluation question

2023-01-27 Thread dn via Python-list
owerful, and therefore rather dangerous in the risks it presents. Thus, seems a strange/advanced question for a "newbie" to be asking. YMMV! Do you know about the Python REPL? If you open python within a terminal, each of the three expressions/compound-statements listed will work, as d

Re: logically Boolean

2023-01-28 Thread dn via Python-list
On 29/01/2023 09.28, Chris Angelico wrote: The REAL boolean is the friends we made along the way? By REAL did you mean float - True or False? (for the FORTRAN-free: https://fortranwiki.org/fortran/show/real) -- -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: evaluation question

2023-01-31 Thread dn via Python-list
they don't dump them and make all old code suddenly cease to execute. No, but it was decided that Python 3 would have to be backwards incompatible, mainly to sort out the Unicode mess. Given that, the opportunity was taken to clean up some other mistakes as well. +1 and the move to Unicod

Re: Organizing modules and their code

2023-02-03 Thread dn via Python-list
the "D" of SOLID, ie Dependency Inversion. You may pick-up some ideas or reassurance from "Making a Simple Data Pipeline Part 1: The ETL Pattern" (https://www.codeproject.com/Articles/5324207/Making-a-Simple-Data-Pipeline-Part-1-The-ETL-Patte). Let us know how it turns-out... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Typing Number, PyCharm

2023-02-04 Thread dn via Python-list
t to think de-cluttering is a good idea! Do you know of another way to attack this/more properly? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Typing Number, PyCharm

2023-02-05 Thread dn via Python-list
rint(double(Fraction(7, 8))) /# print(double("7")) PyCharm properly complains/ *From: *Python-list on behalf of dn via Python-list *Date: *Saturday, February 4, 2023 at 9:32 PM *To: *'Python' *Subject: *Typing Number, PyCharm *** Attention: This is an external email. Use caution

Re: File write, weird behaviour

2023-02-19 Thread Axy via Python-list
gning your software this way. Axy. On 19/02/2023 14:03, Azizbek Khamdamov wrote: Example 1 (works as expected) file = open("D:\Programming\Python\working_with_files\cities.txt", 'r+') ## contains list cities # the following code adds new record to the beginning of the

Re: Tuple Comprehension ???

2023-02-21 Thread Axy via Python-list
ly) the same syntax... ( takes one arg , whch is a list ) i've been programming for many years... ( just knew to Python ) LOL, python is full of surprises. I'd definitely step into the same piece of... Someday. Of course 'Builtin functions' section explains that

Re: Tuple Comprehension ???

2023-02-21 Thread Axy via Python-list
y existing programs. Yes, consistency is a good goal. Reality is a better goal. I don't think overengineering is a good thing. Good design utilizes associativity so a person don't get amazed by inconsistency in things that expected to be similar. Axy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Line continuation and comments

2023-02-23 Thread dn via Python-list
On 22/02/2023 21.49, Robert Latest via Python-list wrote: I found myself building a complicated logical condition with many ands and ors which I made more manageable by putting the various terms on individual lines and breaking them with the "\" line continuation character. In this

Re: Line continuation and comments

2023-02-23 Thread dn via Python-list
ut prefer to trade that for 'readability'. Perhaps that came from AWS CodeWhisperer which I have since abandoned, or maybe from SonarLint (which I've just checked to discover it is not working properly...) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Why doesn't Python (error msg) tell me WHAT the actual (arg) values are ?

2023-02-23 Thread dn via Python-list
On 23/02/2023 09.05, Hen Hanna wrote: > py bug.py Traceback (most recent call last): File "C:\Usenet\bug.py", line 5, in print( a + 12 ) TypeError: can only concatenate str (not "int") to str Why doesn&#

Re: Find 6-letter words that are hidden (embedded) within

2023-02-24 Thread Pancho via Python-list
On 24/02/2023 18:34, Hen Hanna wrote: i just wrote a program, which... within[FunFunPython] finds: (funny,futon,python) ( 5- and 6- letter words ) (my program uses a Trie, but is pretty simple

<    4   5   6   7   8   9   10   11   12   13   >