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

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: 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

Re: Newline (NuBe Question)

2023-11-26 Thread 'DL Neil' via Python-list
Avi, On 11/27/2023 4:15 PM, avi.e.gr...@gmail.com wrote: Dave, Back on a hopefully more serious note, I want to make a bit of an analogy with what happens when you save data in a format like a .CSV file. Often you have a choice of including a header line giving names to the resulting columns,

Re: Newline (NuBe Question)

2023-11-26 Thread DL Neil via Python-list
On 11/27/2023 10:04 AM, Peter J. Holzer via Python-list wrote: On 2023-11-25 08:32:24 -0600, Michael F. Stemper via Python-list wrote: On 24/11/2023 21.45, avi.e.gr...@gmail.com wrote: Of course, for serious work, some might suggest avoiding constructs like a list of lists and switch to using

Re: Newline (NuBe Question)

2023-11-26 Thread DL Neil via Python-list
On 11/27/2023 1:08 AM, Roel Schroeven via Python-list wrote: I prefer namedtuples or dataclasses over tuples. They allow you to refer to their fields by name instead of index: student.gpa is much clearer than student[2], and makes it less likely to accidentally refer to the wrong field. +1

Re: Newline (NuBe Question)

2023-11-26 Thread DL Neil via Python-list
On 11/27/2023 12:48 AM, Chris Angelico via Python-list wrote: On Sun, 26 Nov 2023 at 21:08, Michael F. Stemper via Python-list wrote: On 24/11/2023 21.45, avi.e.gr...@gmail.com wrote: Grizz[l]y, I think the point is not about a sorted list or sorting in general It is about reasons why

Re: Printing dict value for possibly undefined key

2023-11-25 Thread DL Neil via Python-list
On 11/25/2023 3:31 AM, Loris Bennett via Python-list wrote: Hi, I want to print some records from a database table where one of the fields contains a JSON string which is read into a dict. I am doing something like print(f"{id} {d['foo']} {d['bar']}") However, the dict does not always

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:python-list@python.org>> wrote: > > On 1/2/21 6:35 AM, Bob van der Poel wrote: > > Found it! > > Well done! > > >

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

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 >

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:python-list@python.org>> wrote: On 05/12/2020 07:57, Arthur R. Ott wrote: ... >     Microsoft Windows [Version 10.0.19042.630] >     (c) 2020 Microsoft Corporation. All

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: 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

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)?

Re: Need a Dynamic vlookup using python

2020-07-11 Thread DL Neil via Python-list
On 11/07/20 8:34 PM, narenchund...@gmail.com 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

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: 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, narenchund...@gmail.com 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

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, narenchund...@gmail.com 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

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

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*)*

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, narenchund...@gmail.com 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

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, narenchund...@gmail.com 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: 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

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

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 &qu

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 opportunities

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

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)

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

Friday Finking: Beyond implementing Unicode

2020-06-12 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

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, zljubi...@gmail.com 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

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, zljubi...@gmail.com 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: 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

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

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

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

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: 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

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

2020-06-06 Thread DL Neil via Python-list
On 6/06/20 9:36 AM, zljubi...@gmail.com 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

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

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.

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

Re: Format Logfile Name with logging.ini

2020-05-30 Thread DL Neil via Python-list
On 30/05/20 4:52 AM, connor.r.no...@gmail.com 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:

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

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: [{

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: 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

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: 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: Custom logging function

2020-05-25 Thread DL Neil via Python-list
On 26/05/20 8:26 AM, zljubi...@gmail.com 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: 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: 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. I like

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

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

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: 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

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: 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 <__pete...@web.de> 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

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: 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.

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

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.

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

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, swaroop.sahoo...@gmail.com 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: 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

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

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

Re: Help with installation please

2020-05-15 Thread DL Neil via Python-list
On 15/05/20 4:18 PM, Jhoana Kacheva Melissa Joseph wrote: Hello, I downloaded python 3.8 in my windows, I selected the box for the path but when I try to run it in powershell it brought me to app store to get it again. Please advise if the following reference is accurate, and works for you:

Re: php to python code converter

2020-05-15 Thread DL Neil via Python-list
On 15/05/20 12:58 AM, Jon Ribbens via Python-list wrote: On 2020-05-14, MRAB wrote: Look at the date of the original post. It says "8 May 2009". That's over 11 years ago! Since then, Google Code has ceased to exist. Disgraceful, all URLs should continue to work for at least as long as this

Re: Not able use installed modules

2020-05-08 Thread DL Neil via Python-list
On 7/05/20 4:15 PM, Music lover wrote: Hello python team, I have installed the latest version of python from your site. Then I successfully installed some modules like :- numpy , pandas, matplotlib from command prompt. But I am not able to use them while programing in python Idle.

Re: OT-Comic: Tabs vs Spaces

2020-05-02 Thread DL Neil via Python-list
On 3/05/20 9:07 AM, Chris Angelico wrote: On Sun, May 3, 2020 at 6:33 AM DL Neil via Python-list wrote: Is this the way to write Python Enhancement Proposals (PEPs)? eg https://www.python.org/dev/peps/pep-0008/#indentation TabError: inconsistent use of tabs and spaces in indentation https

Docs - beyond tabs, spaces, PEPs...

2020-05-02 Thread DL Neil via Python-list
To make-up to those people who frowned at the earlier OT-Comic post... There are changes in-the-wind, in the way Python should/could be documented. Currently, there is a difficulty in 'scaling' the documentation to cope with the growing range of language user-types, as well as keeping-up

OT-Comic: Tabs vs Spaces

2020-05-02 Thread DL Neil via Python-list
Is this the way to write Python Enhancement Proposals (PEPs)? eg https://www.python.org/dev/peps/pep-0008/#indentation TabError: inconsistent use of tabs and spaces in indentation https://www.geeksaresexy.net/2020/05/01/the-tab-club-comic/ -- Regards, =dn --

Re: Function to avoid a global variable

2020-05-01 Thread DL Neil via Python-list
On 2/05/20 12:00 PM, Bob van der Poel wrote: I still think that the use of a keyword like "static" would be easiest. def foo(arg): static counter = 0 counter += 1 if counter ... And in this case static just means that it's a variable only readable inside foo() and it should

Re: Function to avoid a global variable

2020-05-01 Thread DL Neil via Python-list
On 2/05/20 11:30 AM, Chris Angelico wrote: On Sat, May 2, 2020 at 9:14 AM DL Neil via Python-list wrote: On 28/04/20 7:36 PM, Chris Angelico wrote: "Best"? Not sure about that. Functions are first-class objects in Python, so a function *is* a callable object. You don't have

Re: Function to avoid a global variable

2020-05-01 Thread DL Neil via Python-list
On 28/04/20 7:36 PM, Chris Angelico wrote: "Best"? Not sure about that. Functions are first-class objects in Python, so a function *is* a callable object. You don't have to create a custom class with a call method just to be able to attach attributes to your function. ChrisA Using a mutable

Re: How to test?

2020-05-01 Thread DL Neil via Python-list
Given your replies, 'now' might be a good time to take a look at Pytest, and see how you could use it to help build better code - by building tested units/functions which are assembled into ever-larger tested-units... (there is a range of choice/other testing aids if Pytest doesn't take your

Re: How to test?

2020-04-27 Thread DL Neil via Python-list
If I have understood correctly, the objective is to check a dir-tree to ensure that specific directory/file-permissions are in-effect/have not been changed. The specifications come from a .JSON file and may be over-ridden by command-line arguments. Correct? Yes. How to test this in the best

Re: Python Problems

2020-04-26 Thread DL Neil via Python-list
On 27/04/20 11:29 AM, Mats Wichmann wrote: On 4/26/20 2:06 AM, helal uddin wrote: https://drive.google.com/open?id=1DCciLNPkARXnVIHFhXmijRTbFEC9Xsa- Please visit this link to see my problem I'm facing some problems to installlibraries like 'torch library' My Operating System is Windows 10

Re: Python Problems

2020-04-26 Thread DL Neil via Python-list
On 26/04/20 8:06 PM, helal uddin wrote: https://drive.google.com/open?id=1DCciLNPkARXnVIHFhXmijRTbFEC9Xsa- Please visit this link to see my problem I'm facing some problems to installlibraries like 'torch library' My Operating System is Windows 10 64bit. <<< 404. That’s an error. The

Re: How to test?

2020-04-25 Thread DL Neil via Python-list
On 25/04/20 7:53 PM, Manfred Lotz wrote: On Sat, 25 Apr 2020 18:41:37 +1200 DL Neil wrote: On 25/04/20 5:16 PM, Manfred Lotz wrote: On Fri, 24 Apr 2020 19:12:39 -0300 Cholo Lennon wrote: On 24/4/20 15:40, Manfred Lotz wrote: I have a command like application which checks a directory

Re: How to test?

2020-04-25 Thread DL Neil via Python-list
On 25/04/20 5:16 PM, Manfred Lotz wrote: On Fri, 24 Apr 2020 19:12:39 -0300 Cholo Lennon wrote: On 24/4/20 15:40, Manfred Lotz wrote: I have a command like application which checks a directory tree for certain things. If there are errors then messages will be written to stdout. How to test

Re: How to test?

2020-04-24 Thread DL Neil via Python-list
May I point-out that the above may not be the best approach. Rather than using screen-prints to report errors, another method is to utilise "logging" to collect such data - so that there is always a formal record (regardless of user behavior). During 'production' the information could be

Re: How to test?

2020-04-24 Thread DL Neil via Python-list
On 25/04/20 6:40 AM, Manfred Lotz wrote: I have a command like application which checks a directory tree for certain things. If there are errors then messages will be written to stdout. How to test this in the best way? One idea was for the error situations to write messages to files and then

Re: How to test the data type of a variable

2020-04-23 Thread DL Neil via Python-list
... Is there a way to see all of the groups? Yes! Follow the link at the bottom of this email msg. Then follow the link at the bottom of this list's web-page ... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test the data type of a variable

2020-04-23 Thread DL Neil via Python-list
On 24/04/20 1:24 PM, Deac-33 Lancaster wrote: I'm aware that you can find the type of a variable with type(var) But are there Boolean operators in Python3.8 to test the data type, e.g. is_floate(var) is_string(var) etc. ? There is also a 'pythonic' answer (what is the 'Python way'?)

Re: How to test the data type of a variable

2020-04-23 Thread DL Neil via Python-list
On 24/04/20 1:24 PM, Deac-33 Lancaster wrote: I'm aware that you can find the type of a variable with type(var) But are there Boolean operators in Python3.8 to test the data type, e.g. is_floate(var) is_string(var) etc. ? You are close!

Re: news.bbs.nz is spewing duplicates to comp.lang.python

2020-04-23 Thread DL Neil via Python-list
Have tracked-down and communicated with the site owner/operator. He advised a loop-back problem which has now been blocked. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting the dependencies of a function from a library

2020-04-20 Thread DL Neil via Python-list
On 21/04/20 9:40 AM, elisha hollander wrote: I have a python library with a function. This function call some other functions, classes and variable from the library (and those functions and classes call other ones, etc)... Can I automatically create a file with all of the dependencies (and

Re: Why is a generator expression called a expression?

2020-04-20 Thread DL Neil via Python-list
On 20/04/20 9:19 PM, Chris Angelico wrote: On Mon, Apr 20, 2020 at 6:51 PM Veek M wrote: The docs state that a expression is some combination of value, operator, variable and function. Also you cannot add or combine a generator expression with a value as you would do with 2 + 3 + 4. For

Springer released free ebooks (epub and pdf)

2020-04-18 Thread DL Neil via Python-list
Springer (publisher) has released a bunch of eBook versions of Python text-books, free to download (.PDF and/or .EPUB), in support of COVID-19 stay-at-homes. This sub-list features texts for all 'levels' of mastery, and published between 2014 and 2019/20. They tend to be 'solid' content, cf

Re: Issues regarding the download

2020-04-18 Thread DL Neil via Python-list
On 18/04/20 6:20 PM, MRIDULA GUPTA wrote: Hi, I am a new user and I am facing difficulty using the app. everytime I click on the app the windows open which tell me either to modify the app or repair it or uninstall it. I did my level best but still I am facing problems installing it. please look

Re: Floating point problem

2020-04-18 Thread DL Neil via Python-list
a computer behave so differently? Please don't top-post - (human) conversations are normally question followed by answer, not the other way around! Computers use binary, not decimal - asked and answered (see previous first response, below) On Sat, 18 Apr, 2020, 7:02 pm DL Neil via Python

Re: Floating point problem

2020-04-18 Thread DL Neil via Python-list
On 19/04/20 1:07 AM, Souvik Dutta wrote: I have one question here. On using print(f"{c:.32f}") where c= 2/5 instead of getting 32 zeroes I got some random numbers. The exact thing is 0.40002220446049250313 Why do I get this and not 32 zeroes? Approximating decimal numbers as binary

Re: python read line by line and keep indent

2020-04-17 Thread DL Neil via Python-list
On 18/04/20 11:10 AM, hnasr9...@gmail.com wrote: I am reading a Python file and find an specific line, replace a text and then write back to the file. When I check back the file, I am getting indent error. How to fix this issue. Please make it easier for us (volunteers giving-up our free

Re: What variable type is returned from Open()?

2020-04-17 Thread DL Neil via Python-list
On 18/04/20 4:18 AM, dcwhat...@gmail.com wrote: Yes,personal preference is definitely a factor and a bias, in these matters. But aside from trying to make it easier for future A.I. to figure out what the heck we humans were doing, it also makes a difference in how the IDE interpets the code.

Re: Helping Windows first time users

2020-04-15 Thread DL Neil via Python-list
On 16/04/20 3:34 PM, Dennis Lee Bieber wrote: On Wed, 15 Apr 2020 19:23:43 +0100, Barry Scott declaimed the following: I post some suggestion to improve the Python installer for Windows to better sign post users on the next steps.

Re: What variable type is returned from Open()?

2020-04-15 Thread DL Neil via Python-list
On 16/04/20 1:55 AM, dcwhat...@gmail.com wrote: As much as possible, I make use of optional type hints. So if I know a function returns an integer, then I use this_number_i : int = GetThisNumber() But there's no 'file' type, so I'm not sure what to use as the type for the return value of an

Re: DLL file was not loading everytime when pandas was use to run

2020-04-15 Thread DL Neil via Python-list
On 15/04/20 6:47 PM, ajayrpan...@hotmail.com wrote: Whenever I try to run any file in which pandas was import it was showing that dll file is not loaded Please copy-paste the *exact* error message. Are you aware of the Python-Tutor list? https://mail.python.org/mailman/listinfo/tutor --

  1   2   3   >