OT: ALGOL 60 at 60

2020-05-16 Thread DL Neil via Python-list
ALGOL 60 at 60: The greatest computer language you've never used and grandaddy of the programming family tree Back to the time when tape was king By Richard Speed 15 May 2020 at 09:47 https://www.theregister.co.uk/2020/05/15/algol_60_at_60/ NB 'El Reg' is known for its irreverent and cynical vie

Re: Fwd: Unable to Install Python (3.5.0) Properly

2020-05-17 Thread DL Neil via Python-list
On 17/05/20 7:06 PM, Tarun Pathak wrote: -- Forwarded message - From: Tarun Pathak Date: Sun, May 17, 2020, 12:07 PM Subject: Unable to Install Python (3.5.0) Properly To: Dear Sir/Madam, I am trying to install Python for a while. But failed to do so. Tried with different

Re: Help with installation please

2020-05-17 Thread DL Neil via Python-list
On 18/05/20 10:52 AM, Oscar Benjamin wrote: On Sun, 17 May 2020 at 15:21, Mats Wichmann wrote: On 5/15/20 9:47 PM, Souvik Dutta wrote: I dont know if you should shift from powershell to cmd. Python kinda does not work in powershell. Powershell has a funky way of looking up programs, with th

Re: Determining index of range of values in a matrix

2020-05-19 Thread DL Neil via Python-list
On 19/05/20 6:40 AM, [email protected] wrote: Hi All, I am using python for doing the following: I have a matrix which has dimension of 174*993. Each row of the matrix has some numbers in the range of 30-30.5. I would like to determine the index of the numbers in the range of 30-30.5 in

Re: Strings: double versus single quotes

2020-05-19 Thread DL Neil via Python-list
On 20/05/20 6:26 AM, Chris Angelico wrote: On Wed, May 20, 2020 at 4:21 AM Manfred Lotz wrote: Hi there, I am asking myself if I should preferably use single or double quotes for strings? If I need a single quote in a string I would use double quotes for the whole string and vice versa. For f

Re: why no camelCase in PEP 8?

2020-05-19 Thread DL Neil via Python-list
On 20/05/20 8:49 AM, Chris Angelico wrote: On Wed, May 20, 2020 at 6:38 AM Jim wrote: On 5/19/20 1:24 PM, Chris Angelico wrote: On Wed, May 20, 2020 at 4:03 AM Schachner, Joseph wrote: And, because '_' looks sort of like a space, the individual words are more easily readable. notEveyoneT

Re: Python not running

2020-05-20 Thread DL Neil via Python-list
On 21/05/20 2:22 AM, Supriyo Roy wrote: I have installed the latest version of python which is 3.8.3. However, when I try to run a sample program, a small python icon appears on my taskbar for a split second and then disappears. Nothing else happens. Please advise me on how to get python up and r

Re: Can't run program

2020-05-20 Thread DL Neil via Python-list
On 21/05/20 7:16 AM, Dennis Lee Bieber wrote: On Tue, 19 May 2020 20:31:28 -0400, Ryan Harrington declaimed the following: Hi - I'm not the least bit technical. Trying to learn through YouTube. I've gotten exit code 1, 2, 106. Tried setting up the project interpreter and can't figure it out. T

Re: Online training June 11, 12: Docker packaging best practices for Python in production

2020-05-22 Thread DL Neil via Python-list
On 23/05/20 3:40 AM, Itamar Turner-Trauring wrote: You’re about to ship your Python application into production using Docker: your images are going to be critical infrastructure. ... *The class will take place on two mornings (US East Coast) on June 11th and 12th. You can **learn more about

Re: exiting a while loop

2020-05-22 Thread DL Neil via Python-list
On 23/05/20 4:31 AM, Grant Edwards wrote: On 2020-05-22, Peter Otten <[email protected]> wrote: If you want to terminate the script you can use exit. However exit is a function, and you have to call it exit() Actually it's an instance of _sitebuiltins.Quitter not a function. You still have

Re: Strings: double versus single quotes

2020-05-22 Thread DL Neil via Python-list
I am asking myself if I should preferably use single or double quotes for strings? ... I agree to the following: 1. Consistency is important. 2. Single quotes are less noisy. 3. Triple double quotes are to be preferred over triple single quotes. ... Of course, this is my subjective result,

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
On 23/05/20 11:03 PM, Skip Montanaro wrote: I also agree about SQL. I found that something like this: stmt = ( """select foo from bar""" """ where a = 'bag'""" """and c = 'dog'""" ) worked pretty well, served to both satisfy my brain's desire for semantic indentation (you sh

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
On 24/05/20 4:03 AM, Tim Chase wrote: On 2020-05-24 01:40, Chris Angelico wrote: On Sat, May 23, 2020 at 10:52 PM Abdur-Rahmaan Janhangeer wrote: The interpreter prefers single-quotes "single or double" 'single or double' 'not all that strongly, it doesn\'t' "not all that strongly,

Re: Fwd: installed but doesn't boot

2020-05-23 Thread DL Neil via Python-list
On 24/05/20 4:55 AM, Ben Hansen wrote: -- Forwarded message - From: Ben Hansen Date: Sat, May 23, 2020 at 11:44 AM Subject: Fwd: installed but doesn't boot To: -- Forwarded message - From: Ben Hansen Date: Fri, May 22, 2020 at 3:18 PM Subject: installed b

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
On 24/05/20 8:39 AM, Skip Montanaro wrote: May I ask why not simply like this: stmt = """ select foo from bar where a = 'bag' and c = 'dog' """ Sorry, I don't recall. I wouldn't be at all surprised that it has something to do with Emacs's Python mode behavio

Re: Strings: double versus single quotes

2020-05-24 Thread DL Neil via Python-list
On 24/05/20 5:43 PM, Frank Millman wrote: On 2020-05-23 9:45 PM, DL Neil via Python-list wrote: My habit with SQL queries is to separate them from other code, cf the usual illustration of having them 'buried' within the code, immediately before, or even part of, the query call.

Re: Strings: double versus single quotes

2020-05-24 Thread DL Neil via Python-list
On 24/05/20 8:41 PM, Frank Millman wrote: On 2020-05-24 9:58 AM, DL Neil via Python-list wrote: On 24/05/20 5:43 PM, Frank Millman wrote: On 2020-05-23 9:45 PM, DL Neil via Python-list wrote: My habit with SQL queries is to separate them from other code, cf the usual illustration of having

Re: Custom logging function

2020-05-25 Thread DL Neil via Python-list
On 26/05/20 8:26 AM, [email protected] wrote: Hi, I have a case in which I have to use custom function for logging. For example, all messages should go to stderr and end with '\r\n'. Can I somehow use standard python logging module but send all message to stderr with '\r\n' line endings?

Re: Managing plug-ins

2020-05-25 Thread DL Neil via Python-list
On 26/05/20 11:35 AM, Benjamin Schollnick wrote: Did you ever find anything that met your requirements? If not, I have a prototype that I need to build out some more… https://github.com/bschollnick/PyPlugInMgr I use it for some home grown utilities, but it needs to be fleshed out some more…

Re: Behaviour of os.path.join

2020-05-26 Thread DL Neil via Python-list
On 27/05/20 5:23 AM, BlindAnagram wrote: On 26/05/2020 16:59, Mats Wichmann wrote: On 5/26/20 8:56 AM, BlindAnagram wrote: I came across an issue that I am wondering whether I should report as an issue. If I have a directory, say: base='C:\\Documents' and I use os.path.join() as follows:

Re: Behaviour of os.path.join

2020-05-27 Thread DL Neil via Python-list
... Again, a pathname is never inherently a directory or a file. See previous contribution: until YOU define YOUR arena of operations, it will be difficult to select the correct tool or library - or for others to assist you. If dealing with strings (which happen to look as if they are fil

Re: Access an object to which being bound

2020-05-27 Thread DL Neil via Python-list
@AR, On 28/05/20 8:41 AM, Chris Angelico wrote: On Thu, May 28, 2020 at 6:27 AM Abdur-Rahmaan Janhangeer wrote: Thanks, Actually i want to keep a reference from B to all A instantiated like in the case of z I have class A and i want to call class B via A You can have def x(self, *args, *

Re: Constructing mime image attachment

2020-05-28 Thread DL Neil via Python-list
On 28/05/20 11:48 PM, Joseph L. Casale wrote: I have some json encoded input for nodemailer (https://nodemailer.com/message/embedded-images) where the path key is a string value which contains the base64 encoded data such as: { html: 'Embedded image: ', attachments: [{ filen

Re: Python with text editor

2020-05-30 Thread DL Neil via Python-list
On 30/05/20 7:42 PM, Preetha M wrote: Hello. Thank you for responding to my previous mail. Can someone tell me how to connect python to sublime text 3. Whenever I select python and type the code, it does not work when I press ctrl+B. Please tell. ST is an editor/IDE which is not Python-specifi

Re: Format Logfile Name with logging.ini

2020-05-30 Thread DL Neil via Python-list
On 30/05/20 4:52 AM, [email protected] wrote: In an effort to clean up my python logging practices when creating libraries, I have begun reading into "Advanced Logging" and converting my logging practices into logging configuration `.ini` files: [link](https://docs.python.org/3.4/howto/

Re: Unsubscribe to python list

2020-06-03 Thread DL Neil via Python-list
On 4/06/20 4:59 PM, Meet Agrawal wrote: I want to unsubscribe from python list and would like to stop recieving mails from the same. At the bottom of your request (as reflected), this, and all over messages to the list is an administration link. At the foot of that web-page you will find a s

Re: Issues with Python

2020-06-03 Thread DL Neil via Python-list
On 4/06/20 2:22 PM, Kelley Hudson wrote: Keep getting an error when trying to us Python with Pycharm. I uninstalled it but this was the error I received. Sent from [1]Mail for Windows 10 References Visible links 1. https://go.microsoft.com/fwlink/?LinkId=550

Friday Finking: Imports, Namespaces, Poisoning, Readability

2020-06-04 Thread DL Neil via Python-list
How do you prefer to balance all of the above when import-ing? Python offers a number of options for importing modules, eg import module, ... from importable import object, ... most of which can be augmented with the "as preferred_name" syntax. (ignoring the much-reviled "*" (import ev

Re: Can I have a class with property named "from"

2020-06-05 Thread DL Neil via Python-list
On 6/06/20 9:36 AM, [email protected] wrote: Hi, if I define class like this one: class abc: def __init__(self): self._from = None @property def from(self): return self._from @from.setter def from(self, value): self._from = value I get

Re: Button press event - event handling and picking: IndexError: list index out of range

2020-06-07 Thread DL Neil via Python-list
On 8/06/20 7:06 AM, Caledonian26 wrote: ... However, I keep getting the error: IndexError: list index out of range. Could anyone give me a helping hand as to where I am going wrong? When things go wrong, Python tries to be helpful by providing a "traceback". Please copy-paste the entire tra

Re: Button press event - event handling and picking: IndexError: list index out of range

2020-06-07 Thread DL Neil via Python-list
On 8/06/20 10:38 AM, MRAB wrote: On 2020-06-07 23:24, DL Neil via Python-list wrote: On 8/06/20 7:06 AM, Caledonian26 wrote: ... However, I keep getting the error: IndexError: list index out of range. Could anyone give me a helping hand as to where I am going wrong? When things go wrong

Re: repair modify uninstall

2020-06-10 Thread DL Neil via Python-list
On 10/06/20 11:26 PM, Silvia Aminul wrote: I tried installing Python for windows 10 (the latest version of python for windows ) And after downloading and trying to launch it keeps saying repair modify uninstall I tried looking for solution and it was suggested I might have do

Re: Turning pygame apps into add-ons

2020-06-10 Thread DL Neil via Python-list
On 11/06/20 1:32 AM, elisha hollander wrote: I have a folder with my pygame apps, I want to build a program to have a nice interface to access those apps from, I want it to be like an actual computer, so, I need it to open the apps as rect of something not as external apps. Is there a way to do i

Re: Syntax Help

2020-06-10 Thread DL Neil via Python-list
On 11/06/20 4:56 AM, John Weller wrote: I am trying to learn python. Looking at an example on the web I found this line: def plot(*args, **kwargs): What do the stars mean? The Python "docs" are (surprisingly, for this day-and-age) comprehensive. Try https://docs.python.org/3/tutorial/control

Re: Syntax Help

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 12:13 AM, Terry Reedy wrote: On 6/11/2020 6:03 AM, John Weller wrote: I have been able to find answers to most problems by Googling but couldn't work out a suitable query for this one. That is why I and others have made the Symbols index as complete as possible.  If anything think

Re: Typing, how come that :int is not ensuring int parameter?

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 8:51 AM, [email protected] wrote: Hi, If I run this code: class Property: def __init__(self, var: int): self.a: int = var @property def a(self): return self.__a @a.setter def a(self, var: int): if var > 0 and var % 2 == 0:

Re: Typing, how come that :int is not ensuring int parameter?

2020-06-11 Thread DL Neil via Python-list
On 12/06/20 9:32 AM, [email protected] wrote: OK, as I can see nothing is enforced but I can use mypy and tests for the purpose. Exactly! Well done - Python uses 'duck typing' and thus when the Typing module was added, it became an option. As mentioned elsewhere, it provides "hints" at 'co

Friday Finking: Beyond implementing Unicode

2020-06-11 Thread DL Neil via Python-list
Unicode has given us access to a wealth of mathematical and other symbols. Hardware and soft-/firm-ware flexibility enable us to move beyond and develop new 'standards'. Do we have opportunities to make computer programming more math-familiar and/or more logically-expressive, and thus easier to

Re: pyinstaller

2020-06-12 Thread DL Neil via Python-list
On 13/06/20 3:09 AM, Robin Becker wrote: On 11/06/2020 16:39, Grant Edwards wrote: the hands of the developer.  I suppose the OP could quit and stand on the street corner with a cardboard sign: I would love to do that :) Of possible interest to folk interested in this thread: Recently came a

Re: Python database compatibility

2020-06-12 Thread DL Neil via Python-list
On 13/06/20 8:49 AM, Siddharth Joshi wrote: I am new in Python world and would like to use it for one of the our purpose . Before that, I would like to ask if Python has compatibility with ENSCRIBE database . Enscribe database (file structured) is the native database of HP NonStop (Tandem) serve

Re: change surface

2020-06-13 Thread DL Neil via Python-list
On 13/06/20 10:40 PM, Bischoop wrote: I'm playing with pygame, https://bpa.st/6GOQ Not sure what is wrong here that object moves but draws another surface. (not sure how many will click on a link like that - best to copy-paste code into (text) email message) The most usual reason for 'l

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
On 13/06/20 4:47 AM, Terry Reedy wrote: On 6/12/2020 2:03 AM, DL Neil via Python-list wrote: Unicode has given us access to a wealth of mathematical and other symbols. Hardware and soft-/firm-ware flexibility enable us to move beyond and develop new 'standards'. Do we have opport

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
On 13/06/20 5:11 AM, Dennis Lee Bieber wrote: On Fri, 12 Jun 2020 18:03:55 +1200, DL Neil via Python-list declaimed the following: There is/was a language called "APL" (and yes the acronym means "A Programming Language", and yes it started the craze, through "B&q

Re: Friday Finking: Beyond implementing Unicode

2020-06-16 Thread DL Neil via Python-list
There was a recent thread on python-ideas discussing this.  It started with arrow characters.  There have been others. Am pleased to hear that it's neither 'new' nor 'way out there'... Am not subscribed to that list. Went looking for its archives, but failed - there's no "ideas" on (https://

Re: problem at the time of using editor

2020-06-18 Thread DL Neil via Python-list
On 18/06/20 10:20 PM, Sourav Kundu wrote: when I am using the editor to write a long program and trying to run it the python command line showing it syntax error Of possible interest:- Why SuperHELP for Python? | pssst Search domain p-s.co.nz/wordpress/why-superhelp-for-python/p-s.co.nz/wordpr

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread DL Neil via Python-list
On 29/06/20 3:04 AM, [email protected] wrote: When I run the python code I should be able to open my Excel and when I click on one Excel cell I should have my datepicker widget popped up and I should be able to select any date from my datepicker widget as my Excel cell value Tried below

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-06-28 Thread DL Neil via Python-list
On 29/06/20 6:01 AM, [email protected] wrote: Datepicker is returning two different types. before date change its and after change its Well done! When it is printed, the date probably makes sense (to us), and the debug-print has given you the opportunity to make sure the data is exa

Re: i don't understand this python class

2020-06-29 Thread DL Neil via Python-list
On 30/06/20 5:14 AM, joseph pareti wrote: I have piece of code with constructs as follows: *class* *SentimentNetwork**:* *def* __init__*(*self*,* reviews*,* labels*,* hidden_nodes *=* 10*,* learning_rate *=* 0.1*):* np*.*random*.*seed*(*1*)* self*.*init_network*(**len**(*s

Re: Data structures and Algorithms

2020-06-30 Thread DL Neil via Python-list
On 1/07/20 1:18 AM, Richard Damon wrote: On 6/30/20 8:26 AM, Cameron Simpson wrote: On 30Jun2020 10:52, satyaprasad wrote: Hi, I am currently in learning process of python have been worked on some desktop application using pyqt . I want improve my DSA area but i searched so many videos mot sur

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-07-04 Thread DL Neil via Python-list
On 5/07/20 5:20 AM, [email protected] wrote: I am trying to assign a widget to an excel cell. Convertion wont help me.Thanks That's true - and false! Unfortunately, these posts have revealed little about you and your level of understanding of Python specifically, and computer programmi

Re: Assign Excel cell value from Datepicker widget Selection using Python

2020-07-06 Thread DL Neil via Python-list
On 5/07/20 5:20 AM, [email protected] wrote: I am trying to assign a widget to an excel cell. Convertion wont help me.Thanks If you are following this post, you may be interested to view:- Using Widgets in Jupyter Notebook (Video) July 5, 2020 in the Mouse vs Python series. Whilst I have

Re: Questioning the effects of multiple assignment

2020-07-08 Thread DL Neil via Python-list
On 8/07/20 10:19 PM, Peter J. Holzer wrote: On 2020-07-08 12:26:06 +1200, dn via Python-list wrote: OTOH, using a tuple doesn't prevent the function from mutating mutable arguments: #!/usr/bin/python3 def f(*a): a[0]["new"] = 2 v = { "old": 1} f(v) print(v) prints «{'old': 1, 'new': 2}».

Re: Need a Dynamic vlookup using python

2020-07-11 Thread DL Neil via Python-list
On 11/07/20 8:34 PM, [email protected] wrote: Any suggestions please Clarify the requirements, rather than starting with a 'solution'. Communicate the constraints, eg what is already in-place. "vlookup" has particular meaning in worksheet/spreadsheet packages. Is that what you are usin

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
On 12/07/20 8:13 AM, Peter J. Holzer wrote: On 2020-07-11 09:54:33 +1200, dn via Python-list wrote: Questions: Is the idea of limiting the number of parameters passed across an interface a real concern or somewhat an affectation? Is three, five, seven, ... a valid limit (or warning-signal)? D

Re: Friday Finking: Limiting parameters

2020-07-11 Thread DL Neil via Python-list
On 12/07/20 9:46 AM, Christman, Roger Graydon wrote: I'll preface this by saying I am a programming instructor who still teaches from the ivory tower, so may not necessarily reflect actual practice in industry. ...in which case I will preface my response by saying that one of the virtues of th

Re: Local access to a file, How To ?

2020-07-28 Thread DL Neil via Python-list
On 29/07/2020 08:56, Steve wrote: I have a python program that reads and writes to files that are all within the folder that contains the python program. There is now a second python program that is to be run to compile information in said files. I am having difficulty trying to call the local

Re: Fw: See example

2020-12-04 Thread DL Neil via Python-list
On 05/12/2020 09:17, Dan Stromberg wrote: On Fri, Dec 4, 2020 at 12:01 PM dn via Python-list mailto:[email protected]>> wrote: On 05/12/2020 07:57, Arthur R. Ott wrote: ... >     Microsoft Windows [Version 10.0.19042.630] >     (c) 2020 Microsoft Corporation. All right

Re: Funny error message

2020-12-31 Thread DL Neil via Python-list
On 1/1/21 11:46 AM, Bob van der Poel wrote: > When I run python from the command line and generate an error I get the > following: > > Python 3.8.5 (default, Jul 28 2020, 12:59:40) > [GCC 9.3.0] on linux > Type "help", "copyright", "credits" or "license" for more information. z > /home/bob/.l

Re: Funny error message

2021-01-01 Thread DL Neil via Python-list
On 1/2/21 6:35 AM, Bob van der Poel wrote: > Found it! Well done! >> I had the proper urllib3 installed. But, in my .local/lib/ a previous >> version was installed. Removing .local/lib/python3.8 has resolved the >> problem. >> >> Anyone hazard a guess as to why I had a .local tre

Re: Funny error message

2021-01-01 Thread DL Neil via Python-list
On 1/2/21 9:39 AM, Bob van der Poel wrote: > > > On Fri, Jan 1, 2021 at 12:17 PM DL Neil via Python-list > mailto:[email protected]>> wrote: > > On 1/2/21 6:35 AM, Bob van der Poel wrote: > > Found it! > > Well done! > > > &

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread DL Neil via Python-list
On 12/6/23 03:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration program and used by lots of programs which display the va

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread DL Neil via Python-list
Apologies: neglected suggested web.refs: https://datagy.io/python-environment-variables/ https://pypi.org/project/json_environ/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: making your own DirEntry.

2023-12-22 Thread DL Neil via Python-list
Antoon, On 12/23/23 01:00, Antoon Pardon via Python-list wrote: I am writing a program that goes through file hierarchies and I am mostly using scandir for that which produces DirEntry instances. At times it would be usefull if I could make my own DirEntry for a specific path, however when I t

<    1   2   3