Re: [Mostly OT] Feedback on Python homework using Canvas LMS

2020-03-16 Thread DL Neil via Python-list
support, or at least tolerate, Python. WebRefs: https://en.wikipedia.org/wiki/Pastebin https://pastebin.com/ https://codepen.io/ https://jsfiddle.net/ https://gist.github.com/discover or, to keep things in-house (and possibly better indexed/reusable): https://gogs.io/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: PEP Idea: Multi-get for lists/tuples and dictionaries (inspired in NumPy)

2020-03-18 Thread DL Neil via Python-list
"last_name" ] >>> fname, lname ('Frances', 'Allen') That said, I've often wished to be allowed to write: d.first_name for a dict (cf a class/object). Hmm, I feel a 'utility' coming-on - but first I'll look to see where/how such might be used in 'live' code (and be any better than the current mechanisms)... Simple collections are one thing. How would you handle the structure if one or more elements contains a second dimension? eg a list within a list/a 2D matrix (or if you must, an 'array')? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to incorporate environment from with python.

2020-03-22 Thread DL Neil via Python-list
interrogate/modify the OS environment used https://docs.python.org/3/library/os.html#os.system However, these days most prefer https://docs.python.org/3/library/subprocess.html Please read the pros-and-cons carefully! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Like c enumeration in python3 [ERRATA]

2020-03-22 Thread DL Neil via Python-list
rectly: for name, value in C.__members__.items(): -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Confusing textwrap parameters, and request for RE help

2020-03-24 Thread DL Neil via Python-list
sier on the eyes! Similarly, the mainframe legacy of punched-card input is alive-and-well in Python 'standards', which talk of a 79- or 80-character line-width. Please don't take me by the ear and wash-out my mouth with soap and water! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Confusing textwrap parameters, and request for RE help

2020-03-24 Thread DL Neil via Python-list
On 25/03/20 10:30 AM, Chris Angelico wrote: On Wed, Mar 25, 2020 at 8:04 AM DL Neil via Python-list wrote: On 23/03/20 8:00 AM, Chris Angelico wrote: When using textwrap.fill() or friends, setting break_long_words=False without also setting break_on_hyphens=False has the very strange

Re: Confusing textwrap parameters, and request for RE help

2020-03-25 Thread DL Neil via Python-list
On 25/03/20 11:57 AM, Chris Angelico wrote: On Wed, Mar 25, 2020 at 9:37 AM DL Neil via Python-list wrote: As you observe, the problem with terminal emulators is the extent of their emulation and the degree of adoption of their 'extended features'! My concern grows because of t

Re: Module import best practice

2020-03-26 Thread DL Neil via Python-list
n-answer helps, by leaving you with reading topics which will realise advice for the concerns you had/hadn't noted to-date. Now, it's time to get back to the (salt-)mines, if we expect to put (dino-)steaks on the table tonight... [https://www.youtube.com/watch?v=2s13X66BFd8] -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Module import best practice

2020-03-26 Thread DL Neil via Python-list
tkinter. I've much to learn. ;-) Know that feeling! I try to keep a note-/lab-/log-book of learning-experiences. Of course, remembering if/where I've noted topics is quite another matter... The Python-list has gone a bit quiet. I imagine many are busy trying to encourage/support co

Re: error in importing

2020-03-31 Thread DL Neil via Python-list
libraries. Please describe how you start Python. Please copy-paste all relevant code, plus the error messages received. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: questions:

2020-04-01 Thread DL Neil via Python-list
erminology. Such is a perennial question, answered many times on the Tutor discussion list and therefore accessible through those archives! Web.Refs: https://docs.python.org/3/tutorial/venv.html https://www.anaconda.com/distribution/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Problemas para ejecutar Python en windows 7

2020-04-01 Thread DL Neil via Python-list
. However, there are some translations at https://wiki.python.org/moin/SpanishLanguage -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Problemas para ejecutar Python en windows 7

2020-04-02 Thread DL Neil via Python-list
#x27;m not clear whether the "short-cut" is to access Python at the command-line, or if it is to start an application under Python. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Window and position of figure

2020-04-04 Thread DL Neil via Python-list
le of the screen, ie half of each axis is for negative values. If the vector and figure lie in positive space (for example), why include either/both negative domains? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: kill a window

2020-04-07 Thread DL Neil via Python-list
ation: plt.close( 1 ) ^ | -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Troubling running my Python

2020-04-08 Thread DL Neil via Python-list
an FAQ because Python works differently to the way many MS-Windows users expect. Try: https://docs.python.org/3/using/windows.html and let us know if you have further questions. The Python documentation is well worth investigation... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: type annotations for xpath list

2020-04-08 Thread DL Neil via Python-list
mpromising" philosophy seems non-pythonic (IMHO) - and I won't recommend anything that thinks it should make decisions because I'm too stupid (see also Apple, MSFT, Google, ...). - the latter assessment may be correct, but not IMHO. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to inheret a metaclass.

2020-04-10 Thread Greg Ewing via Python-list
't specify a metaclass. I find it peculiar that you can give a function as metaclass. Yes, it just calls whatever object you give it, which allows for various fun things. You'd be risking a lynching if you took advantage of it for anything important, though.:-) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: For Loop Invariants

2020-04-10 Thread DL Neil via Python-list
only_the_good_stuff( self ): yield #according to filter ... my_list = MyList( etc ) ... for a in my_list.only_the_good_stuff(): # calmly carry-on -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

My New Project : Aduct

2020-04-12 Thread J.Arun Mani via Python-list
mmunity work, meaning of open source, gives me a satisfaction. Thank you for reading till here, J Arun Mani :) -- https://mail.python.org/mailman/listinfo/python-list

Re: python

2020-04-15 Thread DL Neil via Python-list
On 15/04/20 2:05 PM, mike via Python-list wrote: I need somehelpwith Python 36-32 and 38-32 I have been using sublime text 3 asmy ide for about 1 year now and everything was fine -I tried to change to Pycharm 2020 - I was going to use sublime 3 as my IDE for python36-32 and the Pycharm2020

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

2020-04-15 Thread DL Neil via Python-list
-- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Tarjei Bærland via Python-list
ampaign=sig-email&utm_content=webmail> > <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -- https://mail.python.org/mailman/listinfo/python-list

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

2020-04-15 Thread DL Neil via Python-list
th asking the meta-level question: why am I wanting to (try to) do this, this way? Aka: is there a better way? Web-Refs: PEP 483 -- The Theory of Type Hints: https://www.python.org/dev/peps/pep-0483/ PEP 484 -- Type Hints: https://www.python.org/dev/peps/pep-0484/ New in Python 3.5: https://docs.python.org/3/whatsnew/3.5.html Typing: https://docs.python.org/3/library/typing.html?highlight=pep%20typing Using "with": https://docs.python.org/3/reference/compound_stmts.html?highlight=context%20manager#the-with-statement Typing context managers: https://docs.python.org/3/library/typing.html?highlight=context%20manager#typing.ContextManager Using context managers: https://jeffknupp.com/blog/2016/03/07/python-with-context-managers/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Helping Windows first time users

2020-04-15 Thread DL Neil via Python-list
ncouraging fashion. (see also the Python Foundation's several diversity, inclusion, and other principles) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2020-04-17 Thread DL Neil via Python-list
here', but the other attempts to be 'secure' (in several definitions of the word). Web.Refs: http://mypy-lang.org/ https://www.python.org/dev/peps/pep-0401/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: python read line by line and keep indent

2020-04-17 Thread DL Neil via Python-list
/mailman/listinfo/python-list

Re: Floating point problem

2020-04-18 Thread DL Neil via Python-list
?good, old days, a Computer Science course would almost certainly involve some "Numerical Analysis", when such issues would be discussed. Not sure that many institutions offer such, these days... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Floating point problem

2020-04-18 Thread DL Neil via Python-list
ussed. Not sure that many institutions offer such, these days... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Issues regarding the download

2020-04-18 Thread DL Neil via Python-list
://mail.python.org/mailman/listinfo/tutor -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Springer released free ebooks (epub and pdf)

2020-04-18 Thread DL Neil via Python-list
id' content, cf 'Dummies Guide' casual: https://www.reddit.com/r/Python/comments/g2yfml/springer_released_free_ebooks_epub_and_pdf/ -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Why is a generator expression called a expression?

2020-04-20 Thread DL Neil via Python-list
, b = 1, 2 Which is why a single element/expression tuple must be expressed with a comma. Yet, things become slightly confusing when an empty pair of parentheses defines an empty tuple. You will find these definitions (and so much more) in the Python Reference Manual amongst the Python docs. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: RFC: For Loop Invariants

2020-04-20 Thread Tony Flury via Python-list
d it seems that this is far better than fiddling with the for loop syntax. -- 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
-- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

python and numpy

2020-04-21 Thread Derek Vladescu via Python-list
I’ve just begun a serious study of using Python as an aspiring programmer/data scientist. Can someone please walk me through how to download Python, SO THAT I will be able to import numpy? Thanks, Derek Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

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: How to test the data type of a variable

2020-04-23 Thread DL Neil via Python-list
brary/functions.html#isinstance (If this is the wrong group for this question, what group should I use.) We're happy to help. There is a Python-Tutor group which is a good 'home' for beginners or new-converts to Python... -- 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
or: ... print( "Officer, it wasn't me - honest!" ) ... Officer, it wasn't me - honest! >>> or just-for-fun: >>> try: ... n / d ... except ( ZeroDivisionError, TypeError ): ... print( "I'm sorry, Dave. I'm afraid I can't do that." ) ... I'm sorry, Dave. I'm afraid I can't do that. -- 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
... 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?

2020-04-24 Thread DL Neil via Python-list
ble, by changing one line, to re-direct the log to wherever you would like - including the above! Python library: https://docs.python.org/3/library/logging.html Logging (testing): https://docs.pytest.org/en/latest/logging.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-04-24 Thread DL Neil via Python-list
d easily be re-directed. On the other hand: YAGNI!) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-04-24 Thread DL Neil via Python-list
From the above, I'm wondering if a custom exception might be applicable. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-04-25 Thread DL Neil via Python-list
le, change!") The policy file is a JSON file and could have different categories. Each category defines a policy for a certain directory tree. Comand line args could overwrite directory names, as well as user and group. Or if for example a directory is not specified in the JSON file I am required to specify it via command line. Otherwise no check can take place. default": { "match_perms": "644", "match_permsd": "755", "match_permsx": "755", "owner": "manfred", "group": "manfred" } Won't a directory-path be required, to tie 'policy' to 'tree'? Is that enough feedback to help you take a few more steps? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Problems

2020-04-26 Thread DL Neil via Python-list
4. That’s an error. The requested URL was not found on this server. That’s all we know. >>> -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Problems

2020-04-26 Thread DL Neil via Python-list
ctrons became considerably excited!) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-04-26 Thread DL Neil via Python-list
mple I have changed the check() method in the Policy class to get called like this: def check(self, fpath, user, group, mode): This means I can test the checks and its result without requiring any external test data. Thanks a lot to all for your help. 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 fancy) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Bug in the urljoin library

2020-04-28 Thread Moro, Andrea via Python-list
presente messaggio. -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to avoid a global variable

2020-04-29 Thread Tony Flury via Python-list
def foo(i): foo.bar += i foo.bar = 5 --Jach And as you have shown - foo.bar is effectively a global variable - just one with a qualified name :-) -- Tony Flury -- https://mail.python.org/mailman/listinfo/python-list

Re: What user-defined request error levels are recommended?

2020-04-30 Thread Ed Leafe via Python-list
error, you could use a 4xx code. However, I would prefer to use the standard codes, and add a custom header with more information on the issue. -- Ed Leafe -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test?

2020-05-01 Thread DL Neil via Python-list
ve your overall programming skills. Once your expertise, in both Python and the testing tool, matures; you will be better placed to survey the opportunities and to choose the best alternative for you and your applications... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to avoid a global variable

2020-05-01 Thread DL Neil via Python-list
icity and power justifying the reasons they were given to us, they would become second-nature to code AND to read! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

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 h

Re: Function to avoid a global variable

2020-05-01 Thread DL Neil via Python-list
ple) training, generator functions (and async-gen-func-s) already offer this (without the static-statement) def gen( args ): counter = 0 while counter < max_depth: yield counter counter will retain its value ("maintain state") between iterations. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

OT-Comic: Tabs vs Spaces

2020-05-02 Thread DL Neil via Python-list
/listinfo/python-list

Docs - beyond tabs, spaces, PEPs...

2020-05-02 Thread DL Neil via Python-list
keeping-up with new developments in the language, and providing documentation for different purposes. Possibilities for wider community involvement? https://pyfound.blogspot.com/2020/04/cpython-documentation-next-5-years.html -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

The '-c' CLI option removes just the command str.

2020-05-05 Thread Simon Forman via Python-list
-c "import sys; print(sys.argv)" [] Or it leaves them both in: $ python -c "import sys; print(sys.argv)" ['-c', 'import sys; print(sys.argv)'] What do you think? Warm regards, ~Simon -- https://mail.python.org/mailman/listinfo/python-list

Re: Can a print overwrite a previous print ?

2020-05-08 Thread Sir Real via Python-list
it/s] print('abcdef', end='\r'); print('ghi', end='') -- https://mail.python.org/mailman/listinfo/python-list

Re: Not able use installed modules

2020-05-08 Thread DL Neil via Python-list
o solve different possible problems, to which I can add - Are you using an import statement? - Does the error occur after the import? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: php to python code converter

2020-05-14 Thread Jon Ribbens via Python-list
/info.cern.ch/hypertext/WWW/TheProject.html ;-) -- https://mail.python.org/mailman/listinfo/python-list

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

Re: Help with installation please

2020-05-15 Thread DL Neil via Python-list
: https://docs.python.org/3/using/windows.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

OT: ALGOL 60 at 60

2020-05-16 Thread DL Neil via Python-list
the world unite! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2020-05-17 Thread DL Neil via Python-list
e for Python-learners to ask questions. You do not state the Operating System in-use. So, presuming MS-Windows, please advise if the following reference is accurate, and works for you: https://docs.python.org/3/using/windows.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with installation please

2020-05-17 Thread DL Neil via Python-list
vel - and we should use that to update/improve the docs... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Determining index of range of values in a matrix

2020-05-19 Thread DL Neil via Python-list
to contain dicts) as a 2D data-structure. A list has no constraint, and no expectation that each 'row' has the same number of columns. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-19 Thread DL Neil via Python-list
anaged to make it as far as C in my alphabet skills, but yes, maybe SQL influences) @Chris: are you on the night-shift? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Missing python curses functions?

2020-05-19 Thread Alan Gauld via Python-list
() case? Is anyone other than me still even using Python curses? :-) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list

Re: why no camelCase in PEP 8?

2020-05-19 Thread DL Neil via Python-list
y readable. notEveyoneThinksReadingCamelCaseIsEasy. Me: "What does casels mean?" Chris Angelico Shortens Every Long-name Savagely ? Significantly ? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-19 Thread Alan Gauld via Python-list
om/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list

Re: Missing python curses functions?

2020-05-20 Thread Alan Gauld via Python-list
I can create an attr_get(win)->int function in Python... -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos -- https://mail.python.org/mailman/listinfo/python-list

Solved: Re: Missing python curses functions?

2020-05-20 Thread Alan Gauld via Python-list
On 19/05/2020 20:53, Alan Gauld via Python-list wrote: > One of the functions discussed that does not appear to have > a Python equivalent is attr_get() which gets the current > attributes. OK, Using inch() I've written the following function: def attr_get(win): ""

Re: Python not running

2020-05-20 Thread DL Neil via Python-list
running. Thank you in advance. Regards. Please advise if the following reference is accurate, and works for you: https://docs.python.org/3/using/windows.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't run program

2020-05-20 Thread DL Neil via Python-list
ng reference is accurate, and works for you: https://docs.python.org/3/using/windows.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

exiting a while loop

2020-05-22 Thread John Yeadon via Python-list
exit n += 1 print("\n", n, "terms are required.") -- https://mail.python.org/mailman/listinfo/python-list

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

2020-05-22 Thread DL Neil via Python-list
ythonista. Wishing it goes well... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: exiting a while loop

2020-05-22 Thread DL Neil via Python-list
You still have to call it. ;) Which definition (may) make it 'worse' (when compared with "break"): doesn't exit() also close the application-window under some OpSys (if not all) - which would 'disappear' the output before it could be read? -- Regards =dn -- h

Re: Strings: double versus single quotes

2020-05-22 Thread DL Neil via Python-list
/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
odule, makes it easy to locate a 'class' of code dealing with particular data and/or carrying-out particular functions - much as you might for classes and/or libraries. Oh, and a further benefit: (further to "inherited", above) it becomes easier to avoid the massive tangles caused by trying to mix the conventions for indenting multi-line SQL code, with those for Python! -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
ns don't 'exist'. (which makes me wonder why code reviews have never queried the point, or registered that I might seem to be behaving inconsistently...) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Fwd: installed but doesn't boot

2020-05-23 Thread DL Neil via Python-list
Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Strings: double versus single quotes

2020-05-23 Thread DL Neil via Python-list
t to read and debug. (see also: earlier post mentioning separation of languages/code) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

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
system interfaces https://docs.python.org/3/library/os.html stderr is the default destination for logging Logging HOWTO https://docs.python.org/3/howto/logging.html https://docs.python.org/3/library/logging.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Managing plug-ins

2020-05-25 Thread DL Neil via Python-list
… If you’re interested feel free to take a look. Thanks. Am on-the-road at present, but will take a look... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-26 Thread DL Neil via Python-list
aries offer 'helper functions' or seek to be "accepting"/forgiving in accepting argument-data. However, this does not (necessarily) imply a "rule". Another "implementation detail"? (this time in your favor/to your liking) If indeed you're seeking a path that is terminated by the separator character, you need to do what you did in the first example - join an empty string at the end (this is documented). The terminating separator _usually_ isn't needed. Sadly, sometimes it appears to be... Another 'implementation detail' which copes with 'edge cases'. This one has caught me too! [so, not that 'intelligent' after all? (joke)] -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Behaviour of os.path.join

2020-05-27 Thread DL Neil via Python-list
e, and given that it satisfies your stated spec, you could "define...however you want" and make the decision without reference to 'the rest of us'. Once you have coded your solution, which you could then use as 'sample code', please feel free to suggest a bug-fix which describes:- - the problem-set, - the scenario(s) in which it is a problem, - the problems of your solution (as coded), and - your idea for a more elegant, Pythonic, solution. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Access an object to which being bound

2020-05-27 Thread DL Neil via Python-list
ks( Link ) NB in this scenario it is only necessary to register once - all of the links at-once, cf registering each link as it is itself instantiated. Also, that each Link() object is not aware that it is/will be 'registered'! Later, when it is necessary to carry-out the same action on each of the objects, we can use the register's iterator/generator (as above). Critique/other ideas welcome... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Constructing mime image attachment

2020-05-28 Thread DL Neil via Python-list
on Standard Library modules for Internet Handling offer suitable facilities, eg base64 or mimetypes? https://docs.python.org/3/library/netdata.html -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Python with text editor

2020-05-30 Thread DL Neil via Python-list
(current) project: main menu > Tools > BuildSystem > Python3 (assumption!). Once done (configured), always remembered! Thereafter, when you select Build (ctrl+b), ST will know that it is working on a Python 'build'... -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Format Logfile Name with logging.ini

2020-05-30 Thread DL Neil via Python-list
se-and-repeat. Something like: Make unique file name https://code.activestate.com/recipes/577200-make-unique-file-name/ -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: [RELEASE] Python 3.9.0b1 is now available for testing

2020-06-01 Thread Joseph Jenne via Python-list
ous levels of optimization. I have experienced slowdowns from source built python of the same version as the distribution python even when using some optimization flags with the configure script. This appears to be normal behavior and is not cause for concern about the performance of python 3.9.0b1 -- Joseph Jenne -- https://mail.python.org/mailman/listinfo/python-list

Re: Trouble with version 3.8

2020-06-01 Thread Jim Parinisi via Python-list
-- https://mail.python.org/mailman/listinfo/python-list

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: Issues with Python

2020-06-03 Thread DL Neil via Python-list
to the current project? -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

Friday Finking: Imports, Namespaces, Poisoning, Readability

2020-06-04 Thread DL Neil via Python-list
tps://docs.python.org/3/reference/import.html * if you believe that, I have a bridge from Brooklyn available at an absolute bargain price... (https://nycwalks.com/blog/the-brooklyn-bridge-if-you-believe-that-i-have-a-bridge-in-brooklyn-to-sell-to-you/) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Can't download Pygame and Pgzero

2020-06-05 Thread Lily Sararat via Python-list
ter on the same problem.  I really need to get this sorted so my kid can spend his summer break mastering the coding. Brgs, -- https://mail.python.org/mailman/listinfo/python-list

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

2020-06-05 Thread DL Neil via Python-list
ly fails to convey its full meaning, eg a student might be enrolled_since, or "zljubisic" has been paid an higher salary rate_from. As such, 'expanding' its name would likely improve readability, comprehension, and thus code-quality! (I'm with the "ick" when it comes to 'artificial' name-mangling) -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

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

2020-06-07 Thread DL Neil via Python-list
o show you the exact value of the list index. Thus, giving you a pointer/where to back-track, to find the source of the problem... The longer answer: learning to use a debugger or a 'visual' IDE/web-tool. -- Regards =dn -- https://mail.python.org/mailman/listinfo/python-list

<    33   34   35   36   37   38   39   40   41   42   >