Re: Encounter issues to install Python

2019-01-06 Thread Olivier Oussou via Python-list
Hi dear Anthony,I am using Windows systeme. I have download the set up uf  python 3.6.4 (32-bit) and I can not install the software on my computer. I need your technical assistance to solve this matter and I will be glad if you do so. Best regard! OlivierMedical entomologist, Benin Le

Re: How to find files with a string

2019-01-09 Thread Brian Oney via Python-list
os.chdir(dirname) > res = {} > for i in os.listdir(dirname): > res.update(find_value(i)) > print('Filename is: ') > if __name__ == "__main__": > main() > > But there are mistakes like > C:\Users\Anton\AppData\Local\Programs\

Re: Encounter issues to install Python

2019-01-15 Thread Anthony Flury via Python-list
h disk space to install Python ? * have you actually got a 32 bit windows installation - many modern PCs are actually 64 bit now. On 06/01/2019 15:20, Olivier Oussou wrote: Hi dear Anthony, I am using Windows systeme. I have download the set up uf python 3.6.4 (32-bit) and I can not install the

ANN: A new version (0.4.4) of python-gnupg has been released. It contains a security-related change - please update to this version

2019-01-24 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released. What Changed?=This is an enhancement and security-fix release, and all users are stronglyencouraged to upgrade. Brief summary: * Fixed #108: Changed how any return value from the on_data callable is  processed

Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
Hi, I'm trying to build a debian package in offline environment (build server). To build this package, I need to ship all python dependencies as source packages and build them there. This is no problem for all, except one package that has build-time dependencies: Automat-0.70. debian/

Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
Is there any extra step I have to take? Best regards, Chris signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't run setup.py offline due to setup_requires - setup.py calls home

2019-02-11 Thread Chris Narkiewicz via Python-list
On 11/02/2019 19:30, Chris Narkiewicz via Python-list wrote: > Is there any extra step I have to take? Ok, I'll respond to myself, as this was really silly. Debian ships hopelessly obsolete pip 9.PEP 518 is supported in pip 10+. Cheers, Chris signature.asc Description: OpenPGP

Using PyArg_ParseTuple to with optional fields.

2019-02-28 Thread Anthony Flury via Python-list
[email protected] <mailto:[email protected]> *Twitter* : @TonyFlury <https://twitter.com/TonyFlury/> -- https://mail.python.org/mailman/listinfo/python-list

Extension Module for Python 3.6 +

2019-03-01 Thread Anthony Flury via Python-list
needs to build a new instance of my extension class. The documentation is pretty sparse here, and suggests using PyObject_New & PyObject_Init but gives no examples. An internet search suggests using PyObject_CallObject in some way - but the examples here are call backs to Python functions.

pydistutils.cfg injection

2019-03-11 Thread Chris Narkiewicz via Python-list
Hi, I'm trying to build a Python application in Launchpad and I'm currently having some issues with distutils. The build on Launchpad is constrained by 2 things: 1) the builder is isolated from network. 2) must be fully open source (can't ship pre-built binaries). I vend

Text Similarity/Comparison Question

2019-03-26 Thread David Lynch via Python-list
I thought I would solicit some advice as I'm a recent text analyst using Python. Thank you in advance. Kenneth R Adams Compliance Technology and Analytics TAS -Text Analytics as a Service Wells Fargo & Co. | 401 South Tryon Street, Twenty-sixth Floor | Charlotte, NC 28202

RE: Generating generations of files

2019-04-30 Thread Avi Gross via Python-list
n, many systems have allowed huge file names including with multiple periods as in open_me.tar.gz. So looking at the VMS model may not be as helpful for trying to come up with a way for a Python program to maintain a sequence of file names. VMS support for version numbers was coded widely within the

Re: PYTHON equivalents of BITAND and BITSHIFT of MATLAB

2019-05-01 Thread Brian Oney via Python-list
On Wed, 2019-05-01 at 10:35 -0700, [email protected] wrote: > Hi, > > I have the following line from a MATLAB program with FCF (format: UInt_16) as > input: > > ftype = bitand(FCF, 7) > typeBits = bitshift(FCF, -9) > subtype = bitand(typeBits, 7) > > I wrote t

Re: CAD Application

2019-05-06 Thread Brian Oney via Python-list
FreeCAD is written in Python. It has a python interpreter. -- https://mail.python.org/mailman/listinfo/python-list

Building a statically linked Python, and pip

2019-05-07 Thread Simon Michnowicz via Python-list
Dear Group, I need to build a statically linked Python that has pip. I built a version following the instructions at https://wiki.python.org/moin/BuildStatically but pip was not present in the binary directory afterwards. I downloaded get-pip.py but when I tried to install it I get an error

Re: Automate extract domain

2019-05-12 Thread Jon Ribbens via Python-list
ou mean just the top level? In which case you can just do fullname.rsplit(".", 1)[-1]. If you mean "the registrable domain" (such as example.com, example.co.uk, etc) then you will need to look at https://publicsuffix.org/ -- https://mail.python.org/mailman/listinfo/python-list

ANN: distlib 0.2.9 released on PyPI

2019-05-14 Thread Vinay Sajip via Python-list
uggestions for improvements,please give some feedback using the issue tracker! [3] Regards, Vinay Sajip [1] https://pypi.org/project/distlib/0.2.9/[2] https://distlib.readthedocs.io/en/latest/overview.html#change-log-for-distlib[3] https://bitbucket.org/pypa/distlib/issues/new -- https://mail.python.org/mailman/listinfo/python-list

Why Python has no equivalent of JDBC of Java?

2019-05-19 Thread Marco Sulla via Python-list
I programmed in Python 2 and 3 for many years, and I find it a fantastic language. Now I'm programming in Java by m ore than 2 years, and even if I found its code much more boilerplate, I admit that JDBC is fantastic. One example over all: Oracle. If you want to access an Oracle DB from P

Re: Why Python has no equivalent of JDBC of Java?

2019-05-20 Thread Marco Sulla via Python-list
On Mon, 20 May 2019 at 17:32, Thomas Jollans wrote: > Python has a the "Python Database API" (DB API 2.0) > https://www.python.org/dev/peps/pep-0249/ > So why Oracle need instantclient for using cx_Oracle? They say they use DB-API: > *cx_Oracle* is a Python extension modu

Re: PEP 594 cgi & cgitb removal

2019-05-23 Thread Jon Ribbens via Python-list
apache, or (local only) even CGIHTTPServer.py. I don't know what the > current hotness in httpd's is though. nginx is the current hotness. CGI has not been hotness since the mid 90s. -- https://mail.python.org/mailman/listinfo/python-list

RE: More CPUs doen't equal more speed

2019-05-23 Thread Avi Gross via Python-list
erminal or command windows and in each one start a python interpreter by hand running the same program which gets one of the file lists and works on it. Some may finish way ahead of others, of course. If anything they do writes to shared resources such as log files, you may want to be careful. And t

Re: PEP 594 cgi & cgitb removal

2019-05-24 Thread Jon Ribbens via Python-list
far as I can tell, it's just a script to automatically upload bits of code into various cloud providers, none of which use CGI. -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP 594 cgi & cgitb removal

2019-05-25 Thread Jon Ribbens via Python-list
On 2019-05-25, Michael Torrie wrote: > On 05/24/2019 04:27 AM, Jon Ribbens via Python-list wrote: >> Sorry, in what sense do you mean "Serverless is CGI"? >> >> As far as I can tell, it's just a script to automatically upload >> bits of code into vari

Re: Why Python has no equivalent of JDBC of Java?

2019-06-16 Thread Marco Sulla via Python-list
y 2019 at 03:42, Chris Angelico wrote: > From the sound of > things, the choice of database back end has already been made, and the > Python script just has to cope. Otherwise, PostgreSQL would be an > entirely better alternative. > Yes it's that the problem. Well I lo

Subprocess

2019-06-17 Thread Douglas Beard via Python-list
Error: IDLE's Subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall is blocking the connection.python has been working fine until today. I used the python repair but no luck. it does not seem my firewall is blocking. please help -- https://

Re: How do you insert an item into a dictionary (in python 3.7.2)?

2019-06-28 Thread Jon Ribbens via Python-list
'value3'} >> >> What if I wanted to add a value2 in the middle of value1 and value3? > > Dicts are not ordered. If you need that use an OrderedDict > (https://docs.python.org/3.7/library/collections.html#collections.OrderedDict) This is no longer true from Python 3

Re: Handle foreign character web input

2019-06-29 Thread Alan Meyer via Python-list
store and index everything as utf-8, or transliterate some or all strings to 7 bit US ASCII. You may have to perform the same processing on input search strings. I have not used it myself but there is a Python port of a Perl module by Sean M. Burke called Unidecode. It will transliterate non

Re: Handle foreign character web input

2019-06-29 Thread Jon Ribbens via Python-list
e some way to get 'Ronngren' to match the other >> possible foreign spellings? > > Ehh... probably not. That's a human problem, not a programming > one. Best of luck. And yet there are many programs which attempt to solve it. The Python module 'unidecode&#x

Re: Do I need a parser?

2019-06-29 Thread Alan Meyer via Python-list
. So here is my problem: I have this open source project for the scientific community were i want to duplicate an old MS-DOS application written in Fortran. I don't have the source code. The idea is to re-write the software in Python. Originally, the old application would would need to i

Cannot delete or modify

2019-07-09 Thread Hla Kyi via Python-list
Dear Sir / Madam,     I have subscribed mailing Python-list.    I have installed and used " Python 3.7.2". I try to modify or uninstall it. Please see the attached screen shot.    Please help me how to uninstall and modify. Best Regards. Kyi - Modify.jpg49kB python-list-requ...@

load extention spatialite in sqlite on windows

2019-07-10 Thread MICHAEL LANE via Python-list
Hi, I tried to reproduce this(https://geoalchemy-2.readthedocs.io/en/latest/spatialite_tutorial.html) in windows. How can I do that? I'm using Windows 10, my project use Pyramid Framework with Python 3.6.8. Even though I put the dll file in a directory defined in %PATH% or try with/wi

Problem to delete or modify

2019-07-10 Thread Hla Kyi via Python-list
Dear Sir/ Madam,     1. I try to modify, some of the check boxes can not be selected.    2. I try to uninstall, "successfully uninstall" message is come out. When I exit it "if you have any problem, please contact  [email protected] " message is come out.     I instal

Problem to delete or modify Python program and to read "signature.asc"

2019-07-11 Thread Hla Kyi via Python-list
Dear Sir/ Madam,     1. I try to modify, some of the check boxes can not be selected.    2. I try to uninstall, "successfully uninstall" message is come out. When I exit it "if you have any problem, please contact  [email protected] " message is come out.     I instal

Re: How to execute shell command in Python program?

2019-07-20 Thread Chris Narkiewicz via Python-list
immicks. If you want to feed the command from stdin, this becomes a bit more complicated as you need to start a subprocess and use PIPE to feed it. Cheers, Chris Narkiewicz signature.asc Description: OpenPGP digital signature -- https://mail.python.org/mailman/listinfo/python-list

Re: Proper shebang for python3

2019-07-20 Thread Brian Oney via Python-list
oids dynamic linking. > > In my case, that's why I compile my own version of > languages and daily use utilities to live outside the OS. I get absolutely > predicable behavior irrespective of my distro and whatever backleveled cruft > it has laying around. I _know_ every version

Re: Proper shebang for python3

2019-07-21 Thread Brian Oney via Python-list
ranges things. The "env -" is aimed at "clean" daemon or install >> environments. You can do subtler or less intrusive things in other >> settings. >> > >I took a look and found that Fedora 30 and Debian Jessie both use >hard-wired paths for pytho

Difference between os.path.isdir and Path.is_dir

2019-07-25 Thread Maksim Fomin via Python-list
" > >>> os.path.isdir(dummy) > > False > >>> Path(dummy).is_dir() > > True > > > or was it overlooked? > > with kind regards, > -gdg > > ----- > > https://mail.python.org/mailm

Re: [Python-ideas] Fwd: Re: PEP: add a `no` keyword as an alias for `not`

2019-08-02 Thread Andrew Barnert via Python-list
n_votes(votes)) if no >= total//2: # etc. I even found an actual example of the equivalent in some C++ code I had on my hard drive: if (no == ask(…)) { // … } In Python, that would be: if no == ask(…): Also, even if that weren’t a problem, this would be

Re: if bytes != str:

2019-08-04 Thread Jon Ribbens via Python-list
tf-8') > return s > -- > > I've the following confusion on the above code: > > Why should use `if bytes != str:' here? I mean, this will always return > True, IMO. It's a Python 2 v Python 3 test. I would suggest that the following would be

Re: _unquote

2019-08-04 Thread Jon Ribbens via Python-list
higher up in the file you mention in order to find where it's imported: from six.moves.urllib.parse import urlparse, unquote as _unquote So it's 'six.moves.urllib.parse.unquote'... Look up the package 'six' on pypi to find its documentation: https://pypi.org/project/six/ -- https://mail.python.org/mailman/listinfo/python-list

Re: Please help me

2019-08-06 Thread Brian Oney via Python-list
On Mon, 2019-08-05 at 21:10 +0430, arash kohansal wrote: > Hello ive just installed python on my pc and ive already check the > path > choice part but microsoft visual code can not find it and it does not > have > the reload item Check out: https://code.visualstudio.com/docs/langu

How do i execute some code when I have subscribed to a topic with a message payload for mqtt in python?

2019-08-08 Thread Spencer Du via Python-list
Ok so here is some code below. How do I write an if code block to execute some commands when I subscribe to the topic: microscope/light_sheet_microscope/UI and which has a message which is a device type published to it. I want to execute some code to check if the device has a python file in the

Re: How do i execute some code when I have subscribed to a topic with a message payload for mqtt in python?

2019-08-08 Thread Spencer Du via Python-list
hed to it. I want to execute some code to check if the > device has a python file in the currently directory because each device also > relates to a python file. If the file exists then import the file into the > python program else print an error message. If I need to use on_subscribe >

Re: Web framework for static pages

2019-08-12 Thread Brian Oney via Python-list
On August 12, 2019 9:14:55 AM GMT+02:00, morphex wrote: >Hi. > >What frameworks are there for generating static web pages in Python? I have used: https://github.com/Frozen-Flask/Frozen-Flask It's pretty simple. Develop with flask and then "freeze" it. I am lo

ANN: A new version (0.4.5) of python-gnupg has been released.

2019-08-12 Thread Vinay Sajip via Python-list
A new version of the Python module which wraps GnuPG has been released. What Changed?= This is an enhancement and bug-fix release, and all users are encouraged toupgrade. Brief summary: * Fixed #107: Improved documentation. * Fixed #112: Raised a ValueError if a gnupghome is specified

Re: Web framework for static pages

2019-08-12 Thread Jon Ribbens via Python-list
be entirely served by for example Apache. If it's really that small then it sounds like what you are looking for is known as a "text editor". -- https://mail.python.org/mailman/listinfo/python-list

Re: Web framework for static pages

2019-08-13 Thread Jon Ribbens via Python-list
developer - as a user you just use the Liquid templating system, which is more-or-less identical to Django's. -- https://mail.python.org/mailman/listinfo/python-list

Re: Web framework for static pages

2019-08-13 Thread Jon Ribbens via Python-list
ot;malformed". Just use HTML 5, and indeed you should check your code to ensure it is pure, perfect and well-formed. -- https://mail.python.org/mailman/listinfo/python-list

Re: Web framework for static pages

2019-08-13 Thread Brian Oney via Python-list
L HTML 5? Is it the >ability >to write websites using a text editor only what makes web companies >continue the malformed input cycle, or is it legacy websites? > >-Morten It's all text. Or do you have a better suggestion? What is wrong with templates? -- https://mail.python.org/mailman/listinfo/python-list

How do I decouple these two modules?

2019-08-28 Thread Spencer Du via Python-list
ght_sheet_microscope/UI") def on_message(self, mqttc, userdata, message): msg = str(message.payload.decode("utf-8")) print("File which you want to import(with .py extension)") print("message topic=", message.topic) print("message qos=", message.qos) print("message retain flag=", message.retain) def run(self): self.connect("broker.hivemq.com", 1883, 60) Thanks Spencer -- https://mail.python.org/mailman/listinfo/python-list

unable to to install paython

2019-08-28 Thread Alemu Geletew via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

Re: open, close

2019-08-31 Thread Max Zettlmeißl via Python-list
or less equal to a "finally" clause which closes the file descriptor. So as long as the Python runtime environment functions properly, it will be closed. Your second statement on the other hand, is more or less equivalent to: f = open("foo.txt") lines = f.readlines() Close won&#

Re: open, close

2019-09-01 Thread Max Zettlmeißl via Python-list
se from such simple examples. After all, if all the program does is process one file and shut down afterwards, this would not be an aspect to worry about. -- https://mail.python.org/mailman/listinfo/python-list

PYTHON DIDNT DETECTED

2019-09-01 Thread АРТЁМ БОЗАДЖИ via Python-list
Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined and more  C:\Users\VeNoMD>python -v import _frozen_importlib # frozen import _imp # builtin import '_thread' # import '_warnings' # import '_weakref&#

Re: "Edit With Python" option missing

2019-09-01 Thread DL Neil via Python-list
Hi Aakash, On 31/08/19 8:54 PM, Akash verma wrote: "Edit With Python" option missing from message context when right clicked with mouse . There are two stages to working with a Python program: editing the source-code, and executing the program. For the first, most use a text edit

How to create list for stuff inside mqtt and GUI?.

2019-09-01 Thread Spencer Du via Python-list
== 0: print("Connected to broker") else: print("Connection failed") # mqttc.subscribe("microscope/light_sheet_microscope/UI") def on_message(self, mqttc, userdata, message): msg = str(message.payload.decode("utf-8")) print("message recieved= " + msg) # print("File which you want to import(with .py extension)") print("message topic=", message.topic) print("message qos=", message.qos) print("message retain flag=", message.retain) def run(self): self.connect("broker.hivemq.com", 1883, 60) Thanks. -- https://mail.python.org/mailman/listinfo/python-list

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread DL Neil via Python-list
is is "list_of_devices.txt": test1,test2 Each name refers to a python file. My interpretation is that you want to read a file (list_of_devices.txt) and this file contains names of other files and you want to read those files as well and do something with them (read or print or whatever)

Re: How to remove a string from a txt file?

2019-09-04 Thread DL Neil via Python-list
far? How to identify the beginning of the sub-string to be removed? How to identify the end of the sub-string? How does one "remove a string" AND "kept in this format"? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Formatting floating point

2019-09-04 Thread DL Neil via Python-list
On 5/09/19 5:12 AM, Dave via Python-list wrote: ... My question is why, and where do I find a reliable source of information on formatting numbers?  Not interested in replacement values like '{} {}'.format(1, 2). Agreed: there's ton(ne)s of information 'out there&

Re: Finding lines in .txt file that contain keywords from two different set()

2019-09-08 Thread DL Neil via Python-list
ignores, when it should. Then expand to having multiple records, so that you can see what happens when some files correlate, and some don't. ie take a large problem and break it down into smaller units. This is a "top-down" method. An alternate design approach (which works

WedWonder: Scripts and Modules

2019-09-11 Thread DL Neil via Python-list
w often (per SO, quoted above) this causes anything from a pause to complete consternation amongst Python neophytes. In my own case, I accepted it as a "Pythonic" idiom, adopted its use in my scripts, and moved on. Until I adopted unittest/pytest and took-on the closer definitions of

Re: WedWonder: Scripts and Modules

2019-09-11 Thread DL Neil via Python-list
On 12/09/19 8:43 AM, Chris Angelico wrote: On Thu, Sep 12, 2019 at 6:34 AM DL Neil via Python-list wrote: In this day-and-age do you have a script in live/production-use, which is also a module? What is the justification/use case? Yes, absolutely. It's the easiest way to share

Re: Email messages from grouped email using IMAPClient in Python.

2019-09-11 Thread DL Neil via Python-list
So, second debug would be to remove the 'UNSEEN' criteria and observe any difference. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: WedWonder: Scripts and Modules

2019-09-11 Thread DL Neil via Python-list
this. However, I'll make a note to test... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: WedWonder: Scripts and Modules

2019-09-12 Thread DL Neil via Python-list
This is an very interesting idea - you're way ahead of me on this! Would it be fair to describe these as more Python for systems programming/system administration, than an application for (simple) users? (what other kind is there???) Consider: if you write a package, would it have a _

Re: WedWonder: Scripts and Modules

2019-09-12 Thread DL Neil via Python-list
On 12/09/19 8:22 PM, Barry Scott wrote: On 11 Sep 2019, at 21:24, DL Neil via Python-list wrote: In this day-and-age do you have a script in live/production-use, which is also a module? What is the justification/use case? (discounting distutils and similar installation tools, or unit

Friday Finking: 'main-lines' are best kept short

2019-09-12 Thread DL Neil via Python-list
I'm probably back to 50~60 lines (yes, these old eyes prefer a larger font - cue yet more cheeky, age-ist comments coming from my colleagues...) Likely I have also picked-up and taken-to-heart the *nix mantra of code doing 'one job, and doing it well' (and hence the

Re: OT: Using a fake Gmail address is probably not a good idea

2019-09-16 Thread Max Zettlmeißl via Python-list
On Mon, Sep 16, 2019 at 1:56 PM Skip Montanaro wrote: > Mails for someone here who goes by the handle "ast" with a fake > address of [email protected] keep landing in my Gmail spam folder. I > suspect the same is true for all people subscribed to python-list who > use Gmai

Re: python is bugging

2019-09-21 Thread Brian Oney via Python-list
defined above its position. Please follow the tutorial. https://docs.python.org/3/tutorial/index.html -- https://mail.python.org/mailman/listinfo/python-list

Re: python is bugging

2019-09-21 Thread DL Neil via Python-list
original question: Is the (loop) code actually indented? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

HELP NEEDED application error 0xc000005

2019-09-25 Thread arshad ali via Python-list
Note: Forwarded message attached -- Original Message -- From: "arshad ali"[email protected] To: [email protected] Subject: HELP NEEDED application error 0xc05--- Begin Message --- Respected sir, In my laptop with windows 7 ultimate 64 bit, when py

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread DL Neil via Python-list
On 26/09/19 9:14 PM, RobH wrote: I have some sample/demo python code for scrolling and outputting text onto a 16x2 lcd display. I would like to put my own message or text outputting to the lcd on 2 lines. I have tried using lcd.message('my message',1) and lcd.message('my me

Re: NEWBIE: how to get text onto 2 lines on a 16x2 lcd display

2019-09-26 Thread DL Neil via Python-list
On 27/09/19 7:21 AM, RobH wrote: On 26/09/2019 17:51, Dennis Lee Bieber wrote: On Thu, 26 Sep 2019 11:58:15 +0100, RobH declaimed the following: ... Check out this guide for info on using character LCDs with the CircuitPython library: https://learn.adafruit.com/character-lcds/python

Interesting performance question

2019-09-29 Thread Anthony Flury via Python-list
I have just noticed an oddity : Using python 3.6 building a tuple like this : my_tuple = tuple([x*x for x in range(1,1000)]) is about 1/3 quicker than     my_tuple = tuple(x*x for x in range(1,1000)) Measurements : $  python3 -m timeit 'my_tuple = tuple([x*x for x in range(1

pathlib

2019-09-29 Thread DL Neil via Python-list
touch before.file $ python3 Python 3.7.4 (default, Jul 9 2019, 16:48:28) [GCC 8.3.1 20190223 (Red Hat 8.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib >>> p = pathlib.Path( "b

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
the discussion, I'd like to re-read the docs with that in-mind, first... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I think it should not. The term "concrete" is applied to Path(), PosixPath(), and WindowsPath() - whereas the

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
9904293) ### f2 is a path which represents a real-world file though ### where have we seen those numbers before? > It still represents the path to the file, not the file itself, and if > you move something over it, it will see the new file. I like this description. Thanks! That said, maybe pathlib should have stuck with paths/PurePaths, and we should have something else (logically separate, but closely-related) which manipulates the files themselves? (preferably OO, and tidying-up/offering an alternative to the morass of os, os.path, sys, shutil, and ?others) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 1/10/19 1:40 AM, Barry Scott wrote: On 30 Sep 2019, at 12:51, Dan Sommers <[email protected]> wrote: On 9/30/19 4:28 AM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I

Re: pathlib

2019-09-30 Thread DL Neil via Python-list
On 1/10/19 3:21 AM, Dan Sommers wrote: On 9/30/19 8:40 AM, Barry Scott wrote:  >> On 30 Sep 2019, at 12:51, Dan Sommers <[email protected]> wrote:  >> On 9/30/19 4:28 AM, Barry Scott wrote:  >>>> On 30 Sep 2019, at 05:40, DL Neil via Python-list

Re: pathlib

2019-10-01 Thread DL Neil via Python-list
mean to be combative or confrontational, but I think that this fuzziness/inconsistency is at or near the root of the differing expectations. Yes, see earlier comment about "confusion" - in both the minds of learners/newcomers and those who are 'experienced'. There was an intere

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 2/10/19 12:52 AM, Rhodri James wrote: On 01/10/2019 06:03, DL Neil via Python-list wrote: On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I think it should not. The term

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 6:25 AM, Barry Scott wrote: On 2 Oct 2019, at 09:14, DL Neil via Python-list mailto:[email protected]>> wrote: On 2/10/19 12:52 AM, Rhodri James wrote: On 01/10/2019 06:03, DL Neil via Python-list wrote: On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, D

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 3:07 AM, Rhodri James wrote: On 02/10/2019 09:14, DL Neil via Python-list wrote: That said, it is one of the ways that a path can be shown to transition from some 'pure' state to become 'concrete'. However, A.N.Other has suggested that I might be mis-applying

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 12:42 AM, Dan Sommers wrote: On 10/2/19 4:14 AM, DL Neil via Python-list wrote: In the case that sparked this enquiry, and in most others, there is no need for a path that doesn't actually lead somewhere. The paths that are used, identify files, open them, rename them, c

Re: from ./.. import

2019-10-04 Thread Jon Ribbens via Python-list
import Color > from .level import Level > > I just cannot figure out why they using the ``from ./.. import'' to > import modules. Why wouldn't they be? That's how you import things from the current/parent package. -- https://mail.python.org/mailman/listinfo/python-list

Re: Formatting floating point

2019-10-07 Thread DL Neil via Python-list
On 8/10/19 4:04 AM, boffi wrote: DL Neil writes: Agreed: there's ton(ne)s of information 'out there', much of it old, eg Python2, "formatter" (deprecated since v3.4) ? are you referring to the `string.Formatter`[*] class? $ python Python 3.7.4 (defau

Re: How to handle '-' in the 'from' part in a "from import" statement?

2019-10-07 Thread DL Neil via Python-list
try to get around them, sooner or later you'll 'forget' and trip yourself up. Recommend your first idea! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to handle '-' in the 'from' part in a "from import" statement?

2019-10-08 Thread DL Neil via Python-list
Typically, you have a "setup" step which installs (in some way) a "distribution". This step usually ensures that you can use "normal" Python import syntax to access all associated packages. The "setup" step is typically performed with "python set

Re: How to handle '-' in the 'from' part in a "from import" statement?

2019-10-08 Thread DL Neil via Python-list
On 9/10/19 2:46 PM, Chris Angelico wrote: On Wed, Oct 9, 2019 at 12:36 PM DL Neil via Python-list wrote: ... (Or just using pip to install directly from GitHub, although not everyone knows that that's possible.) Come on, you just knew I was going to ask how... -- Regards =dn --

Re: How to handle '-' in the 'from' part in a "from import" statement?

2019-10-08 Thread DL Neil via Python-list
org/mailman/listinfo/python-list

Instantiating sub-class from super

2019-10-14 Thread DL Neil via Python-list
https://mail.python.org/mailman/listinfo/python-list

Re: Instantiating sub-class from super

2019-10-14 Thread DL Neil via Python-list
its class. Python 3.7.3 (default, Apr  8 2019, 22:20:19) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class Person: ...  pass ... >>> class Male(Person

Re: Instantiating sub-class from super

2019-10-15 Thread DL Neil via Python-list
On 16/10/19 12:38 AM, Rhodri James wrote: On 14/10/2019 21:55, DL Neil via Python-list wrote: ... It seemed better (at the design-level) to have Man( Person ) and Woman( Person ) sub-classes to contain the pertinent attributes, source more detailed and specific questions, and collect such

Re: Instantiating sub-class from super

2019-10-15 Thread DL Neil via Python-list
On 16/10/19 1:55 PM, duncan smith wrote: On 15/10/2019 21:36, DL Neil wrote: On 16/10/19 12:38 AM, Rhodri James wrote: On 14/10/2019 21:55, DL Neil via Python-list wrote: ... So, yes, the "label" is unimportant - except to politicians and statisticians, who want precise answers

Re: Instantiating sub-class from super

2019-10-18 Thread DL Neil via Python-list
On 16/10/19 6:33 PM, Frank Millman wrote: On 2019-10-14 10:55 PM, DL Neil via Python-list wrote: Is there a technique or pattern for taking a (partially-) populated instance of a class, and re-creating it as an instance of one of its sub-classes? Here is a link to an article entitled

Re: Instantiating sub-class from super

2019-10-18 Thread DL Neil via Python-list
estionnaire and from Python - but this is roughly how it was explained to me) still apply, and sadly, may in-fact be considerably complicated by any medical processes that may have contributed to a transition. So what if a person has both ovaries and testes? It is better to keep all options o

Re: Instantiating sub-class from super

2019-10-18 Thread DL Neil via Python-list
On 17/10/19 7:52 AM, MRAB wrote: On 2019-10-16 19:43, duncan smith wrote: On 16/10/2019 04:41, DL Neil wrote: On 16/10/19 1:55 PM, duncan smith wrote: On 15/10/2019 21:36, DL Neil wrote: On 16/10/19 12:38 AM, Rhodri James wrote: On 14/10/2019 21:55, DL Neil via Python-list wrote: ... So

Re: Instantiating sub-class from super

2019-10-18 Thread DL Neil via Python-list
ib, for example). If someone takes *my* code and tries to run it on MS-Win Python, they'll soon find-out! That said, I'm not expecting to publish any results with the expectation of world-domination... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Black

2019-10-21 Thread DL Neil via Python-list
hould not confuse outward appearance with (inner) competence. Then again, notice my (optional) parentheses here, and how there's no spaces 'inside' them - which do appear in my Python. Inconsistency is a human condition. We are not machines. A tool is something which will make one&#

<    39   40   41   42   43   44   45   46   47   48   >