Re: OT again sorry [Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]]

2017-10-08 Thread Leam Hall
On 10/08/2017 12:43 PM, Marko Rauhamaa wrote: leam hall : "Linux" means so many things to people. Yes, but just because someone can spell it doesn't mean they can redefine it. :) Closer to home, systemd has taken a central role in the main Linux distributions. I think i

Re: OT again sorry [Re: Interactive scripts (back on topic for once) [was Re: The "loop and a half"]]

2017-10-08 Thread leam hall
On Sun, Oct 8, 2017 at 8:15 AM, Gregory Ewing wrote: > > The thing that *really* annoys me is Linux insisting on colourising > the output to a tty, since it invariably seems to pick an undreadable > colour scheme. And the case-insensitive sorting... there's a reason > Makefile starts with a capit

Re: Good virtualenv and packaging tutorials for beginner?

2017-10-04 Thread leam hall
On Wed, Oct 4, 2017 at 7:15 AM, Ben Finney wrote: > Leam Hall writes: > > > Folks on IRC have suggested using virtualenv to test code under > > different python versions. Sadly, I've not found a virtualenv tutorial > > I understand. Anyone have a link to a good

Python community "welcoming" feedback

2017-10-04 Thread Leam Hall
A while back I pointed out some challenges for the Python community's intake of new coders. Mostly focusing on IRC and the Python e-mail list. Several people have stepped up their "welcome" game and I've been very impressed with the way things are going. Great job! Leam -- https://mail.pytho

Good virtualenv and packaging tutorials for beginner?

2017-10-04 Thread Leam Hall
Folks on IRC have suggested using virtualenv to test code under different python versions. Sadly, I've not found a virtualenv tutorial I understand. Anyone have a link to a good one? The next step will be to figure out how to package a project; a good tutorial URL would be appreciated on that,

Re: Beginners and experts (Batchelder blog post)

2017-09-29 Thread leam hall
On Fri, Sep 29, 2017 at 10:52 AM, justin walters wrote: > > I got through writing all of the above without realizing that you meant you > wanted to build a > desktop application and not a web application. Though, I think the advice > is still helpful. > > Yes and no. Seriously thanks! I am at fi

Re: Beginners and experts (Batchelder blog post)

2017-09-29 Thread Leam Hall
On 09/27/2017 10:33 PM, Stefan Ram wrote: Some areas of knowledge follow, a programmer should not be ignorant in all of them: --- Stefan, this is list AWESOME! I have started mapping skills I have to the list and ways to build skills I don't have. Last night I started working on a pro

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
On 09/28/2017 04:15 AM, Paul Moore wrote: With Python, I'd say that an appreciation of the available libraries is key - both what's in the stdlib, and what's available from PyPI. That's not to say you should memorise the standard library, but rather cultivate an approach of "hmm, I'm pretty sure

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
On 09/28/2017 07:35 AM, Stefan Ram wrote: But remember that paid programmers usually do not "code", in the sense of "write a program from scratch". Most of the work is maintenance programming, where an important part of the job is to read and understand a piece of code. Coding fro

Re: Beginners and experts (Batchelder blog post)

2017-09-28 Thread Leam Hall
My question has received several helpful responses, thanks! On 09/28/2017 01:01 PM, Dennis Lee Bieber wrote: On Wed, 27 Sep 2017 12:41:24 -0400, leam hall declaimed the following: "Programmer"... or "Software Engineer"? I haven't kept up on "

Re: Beginners and experts (Batchelder blog post)

2017-09-27 Thread leam hall
On Sat, Sep 23, 2017 at 5:26 PM, Ned Batchelder wrote: > On 9/23/17 2:52 PM, Leam Hall wrote: > >> On 09/23/2017 02:40 PM, Terry Reedy wrote: >> >>> https://nedbatchelder.com//blog/201709/beginners_and_experts.html >>> >>> Great post. >>> &g

Re: Beginners and experts (Batchelder blog post)

2017-09-23 Thread Leam Hall
On 09/23/2017 02:40 PM, Terry Reedy wrote: https://nedbatchelder.com//blog/201709/beginners_and_experts.html Great post. Yup. Thanks for the link. I often have that "I bet Fred> doesn't get frustrated." thing going. Nice to know Ned bangs his head now and again. :P Leam -- https://mail.p

Re: Change project licence?

2017-09-23 Thread Leam Hall
On 09/23/2017 05:14 AM, Chris Angelico wrote: On Sat, Sep 23, 2017 at 7:07 PM, Kryptxy wrote: Thank you all! I opened a ticket about the same (on github). I got response from most of them, and all are agreeing to the change. However, one contributor did not respond at all. I tried e-mailing, bu

Re: How to share class relationship representations?

2017-09-20 Thread Leam Hall
On 09/19/2017 11:16 AM, Stefan Ram wrote: leam hall writes: I'm working on designing the classes, sub-classes, and relationships in my code. What is a good visual way to represent it so it can be stored in git and shared on the list without large images or attachments? Code /is/ d

Re: Research paper "Energy Efficiency across Programming Languages: How does energy, time, and memory relate?"

2017-09-19 Thread leam hall
On Tue, Sep 19, 2017 at 2:37 PM, Stephan Houben < stephan...@gmail.com.invalid> wrote: > Op 2017-09-19, Steven D'Aprano schreef pearwood.info>: > > > There is a significant chunk of the Python community for whom "just pip > > install it" is not easy, legal or even possible. For them, if its not i

How to share class relationship representations?

2017-09-19 Thread leam hall
I'm working on designing the classes, sub-classes, and relationships in my code. What is a good visual way to represent it so it can be stored in git and shared on the list without large images or attachments? Thanks! Leam -- https://mail.python.org/mailman/listinfo/python-list

The Python-List community

2017-09-18 Thread Leam Hall
A few days ago I pointed out that this list's community had "opportunities to improve". While we still have lots of those opportunities, it is good to see several community members raise the bar in welcoming new folks into the community. Thank you for your help and positive attitude! Leam --

Re: Unicode

2017-09-17 Thread leam hall
Matt wrote: Hi Leam- > > Targeting Python 2.6 for deployment on RHEL/CentOS 6 is a perfectly > valid use case, and after the recent discussions in multiple threads > (your "Design: method in class or general function?" and INADA Naoki's > "People choosing Python 3"), I doubt it would be very usefu

Re: Unicode

2017-09-17 Thread leam hall
On Sun, Sep 17, 2017 at 3:27 PM, Peter Otten <__pete...@web.de> wrote: > leam hall wrote: > > > Doesn't seem to work. The failing code takes the strings as is from the > > database. it will occasionally fail when a name comes up that uses > > a non-ascii chara

Re: Unicode

2017-09-17 Thread leam hall
On Sun, Sep 17, 2017 at 9:13 AM, Peter Otten <__pete...@web.de> wrote: > Leam Hall wrote: > > > On 09/17/2017 08:30 AM, Chris Angelico wrote: > >> On Sun, Sep 17, 2017 at 9:38 PM, Leam Hall wrote: > >>> Still trying to keep this Py2 and Py3 c

Re: Unicode

2017-09-17 Thread Leam Hall
On 09/17/2017 08:30 AM, Chris Angelico wrote: On Sun, Sep 17, 2017 at 9:38 PM, Leam Hall wrote: Still trying to keep this Py2 and Py3 compatible. The Py2 error is: UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 8: ordina

Unicode (was: Old Man Yells At Cloud)

2017-09-17 Thread Leam Hall
On 09/17/2017 07:25 AM, Steve D'Aprano wrote: On Sun, 17 Sep 2017 08:03 pm, Leam Hall wrote: I'm still trying to figure out how to convert a string to unicode in Python 2. A Python 2 string is a string of bytes, so you need to know what encoding they are in. Let's assume you

Re: Old Man Yells At Cloud

2017-09-17 Thread Leam Hall
Hmm... scratch the "young" and "Javascripters". Why lump them together since I bet it's just a vocal few? Better to have said "people who don't want to really learn the new language". On 09/17/2017 06:03 AM, Leam Hall wrote: Different view, I guess. I

Re: Old Man Yells At Cloud

2017-09-17 Thread Leam Hall
Different view, I guess. I'm glad all the young Javascripters have that issue. As an old guy trying to re-learn more python it gives me an advantage. I'm usually interested in the best thislanguage-native way to do something. Doing so makes me learn the language faster and tends to generate bet

Re: the core values of the Python "platform"

2017-09-13 Thread leam hall
On Wed, Sep 13, 2017 at 9:08 AM, Darin Gordon wrote: > Bryan Cantrill gave an interesting talk recently at a Node conference about > "platform values" [1]. The talk lead me to think about what the core values > of the Python "platform" are and I thought it would be good to ask this > question of

Re: "tkinter"

2017-09-13 Thread leam hall
On Wed, Sep 13, 2017 at 8:28 AM, Stefan Ram wrote: > I presume that "tkinter" is intended to be pronounced > "logically": > > T K inter (tee kay inter /ti keI In t%/) > > . But it would be faster to pronounce it > > T kinter (tee kinter /ti kIn t%/) > > . So far I've only ever read it, ne

Re: Python dress

2017-09-12 Thread Leam Hall
On 09/12/2017 04:00 PM, Ben Finney wrote: Larry Martell writes: https://svahausa.com/collections/shop-by-interest-1/products/python-code-fit-flare-dress (And if any guys want to wear this, there's nothing wrong with that.) Boo, the code is not PEP 8 conformant :-) If it weren't for the bad

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread leam hall
On Tue, Sep 12, 2017 at 8:28 AM, Steve D'Aprano wrote: > On Tue, 12 Sep 2017 09:20 pm, Leam Hall wrote: > > > But if someone comes onto the list, or IRC, and says they need to stay > > on Python 2 then please drop the dozens of e-mails and comments about > > upg

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread Leam Hall
On 09/12/2017 08:28 AM, Steve D'Aprano wrote: On Tue, 12 Sep 2017 09:20 pm, Leam Hall wrote: But if someone comes onto the list, or IRC, and says they need to stay on Python 2 then please drop the dozens of e-mails and comments about upgrading. [...] My recent experience with some peo

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread Leam Hall
Steve, Thank you very much. I appreciate your wisdom and support. Leam -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread Leam Hall
On 09/12/2017 07:27 AM, Chris Angelico wrote: On Tue, Sep 12, 2017 at 9:20 PM, Leam Hall wrote: Hey Chris, This is an area the Python community can improve on. Even I would encourage someone new to Python and wanting to do webdev to use Python 3. But if someone comes onto the list, or IRC

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-12 Thread Leam Hall
On 09/12/2017 12:29 AM, Chris Angelico wrote: On Tue, Sep 12, 2017 at 1:42 PM, Paul Rubin wrote: Chris Angelico writes: students learning Python *today* ... they're learning Python 3. I'm not so sure of that. I do know a few people currently learning Python, and they're using Python 2. W

Re: People choosing Python 3

2017-09-11 Thread leam hall
On Mon, Sep 11, 2017 at 8:00 AM, Pavol Lisy wrote: > > > Which part of third party ecosystem surrounding Python 3 is not (and > could not be any time soon) sufficiently mature? > -- > > yum, twisted. -- https://mail.python.org/mailman/listinfo/python-list

Re: Design: method in class or general function?

2017-09-11 Thread leam hall
On Mon, Sep 11, 2017 at 7:48 AM, Stefan Ram wrote: > Leam Hall writes: > >Haven't read the GoF book. Last time I checked it said "this is only > >useful if you know Java" > > In the edition of 1997, some design patterns are accompanied > with example

Re: Design: method in class or general function?

2017-09-11 Thread Leam Hall
On 09/11/2017 03:30 AM, Peter Otten wrote: Leam Hall wrote: Okay Peter, I took your idea and mangled it beyond recognition. There's a design constraint I hadn't mentioned: an instance of Character should be able to have multiple careers. Also, an instance can be created from scratc

Re: Design: method in class or general function?

2017-09-10 Thread Leam Hall
On 09/08/2017 03:06 AM, Peter Otten wrote: leam hall wrote: On Thu, Sep 7, 2017 at 8:16 AM, Steve D'Aprano wrote: On Thu, 7 Sep 2017 07:20 pm, Leam Hall wrote: OOP newbie on Python 2.6. Python 2.6 is ancient, and is missing many nice features. You should consider using the l

Re: [Tutor] beginning to code

2017-09-10 Thread leam hall
I will add my +1 to the careful editing of code. Python's use of white space is pretty good once you get used to it. My Ruby code looks a lot like my Python code. :) Leam -- https://mail.python.org/mailman/listinfo/python-list

Python in Perspective

2017-09-10 Thread Leam Hall
y'all, My god-kids and their proginators lost most everything because of Harvey. I spent much of yesterday worrying about a friend who had gone quiet as he evacuated his family ahead of Irma. Please keep Python in perspective. Whether we use 1.5 or 4rc1 is a lot less critical than using Pyth

Re: People choosing Python 3

2017-09-10 Thread Leam Hall
On 09/10/2017 04:19 AM, Chris Warrick wrote: On 10 September 2017 at 09:30, Marko Rauhamaa wrote: INADA Naoki : I can't wait Python 3 is the default Python of Red Hat, and "python" command means Python 3 on Debian and Ubuntu. I can't wait till Python 3 is available on Red Hat. Python 3.4

Re: Using Python 2

2017-09-08 Thread leam hall
On Fri, Sep 8, 2017 at 6:35 PM, Christopher Reimer < christopher_rei...@icloud.com> wrote: > > On Sep 8, 2017, at 6:57 AM, Ned Batchelder > wrote: > > > > What is it that CompSci folks want that developers don't > > want, that ruined Python 3? > > Long-winded debates about obscure language featur

Re: Not appending ("lib") to sys.path breaks tests.

2017-09-08 Thread Leam Hall
On 09/08/2017 05:41 PM, Ian Kelly wrote: I'm confused about where the character_tools import is made. If that's within a module in the lib package, it should be fine. It looks like it's failing to find the lib package. Since you removed the "lib" directory from sys.path, does its parent direc

Not appending ("lib") to sys.path breaks tests.

2017-09-08 Thread Leam Hall
A kind soul pointed out that my code uses a sys.path.append("lib") to get files to be imported: sys.path.append("lib") from character_tools import * He noted that having an __init__.py in lib and using: from .character_tools import * Should be sufficient for "please do

Re: Using Python 2

2017-09-08 Thread Leam Hall
Various responses in no particular order: On 09/08/2017 09:57 AM, Ned Batchelder wrote: I've heard a lot of FUD about the Python 3 transition, but this one is new to me.  What is it that CompSci folks want that developers don't want, that ruined Python 3? It's not FUD if it's true. Calling it

Re: Using Python 2

2017-09-08 Thread Leam Hall
On 09/08/2017 06:40 AM, Marko Rauhamaa wrote: Leam Hall : However, those millions of servers are running Python 2.6 and a smaller number running 2.7. At least in the US market since Red Hat Enterprise Linux and its derivatives run 2.6.6 (RHEL 6) or 2.7.5 (RHEL 7). Not sure what Python SuSE uses

Using Python 2 (was: Design: method in class or general function?)

2017-09-08 Thread Leam Hall
On 09/08/2017 05:45 AM, Chris Angelico wrote: On Thu, Sep 7, 2017 at 11:31 PM, Ben Finney wrote: leam hall writes: I've wrestled with that discussion for a while and Python 3 loses every time. The context of the thread you started was that you are a *newcomer* to Python. Now yo

Re: Design: method in class or general function?

2017-09-08 Thread Leam Hall
On 09/08/2017 03:06 AM, Peter Otten wrote: I'm pleading "method" as it allows per-class implementation. Peter, as always you are a wealth of information! I have some extra time today to digest your notes and visualize tap dancing Marines. Thank you! -- https://mail.python.org/mailman/listin

Re: Design: method in class or general function?

2017-09-07 Thread leam hall
On Thu, Sep 7, 2017 at 8:16 AM, Steve D'Aprano wrote: > On Thu, 7 Sep 2017 07:20 pm, Leam Hall wrote: > > > OOP newbie on Python 2.6. > > Python 2.6 is ancient, and is missing many nice features. You should > consider > using the latest version, 3.6. > I'v

Design: method in class or general function?

2017-09-07 Thread Leam Hall
OOP newbie on Python 2.6. I create instances of Character class with an attribute dict of 'skills'. The 'skills' dict has the name of a skill as the key and an int as a value. The code adds or modifies skills before outputting the Character. Is it better design to have a Character.method tha

Re: doctest random output?

2017-08-28 Thread Leam Hall
On 08/28/2017 11:40 AM, Dennis Lee Bieber wrote: ... a bunch of good stuff ... I'm (re-)learning python and just trying make sure my function works. Not at the statistical or cryptographic level. :) Thanks! Leam -- https://mail.python.org/mailman/listinfo/python-list

doctest random output?

2017-08-28 Thread Leam Hall
Is this a good way to test if random numeric output? It seems to work under Python 2.6 and 3.6 but that doesn't make it 'good'. ### Code import random def my_thing(): """ Return a random number from 1-6 >>> 0 < my_thing() <=6 True >>> 6 < my_thing() False """ return random.randi

Re: SQLObject 3.4.0

2017-08-05 Thread leam hall
#I'm pleased to announce version 3.4.0, the first stable release of branch #3.4 of SQLObject. # # #What's new in SQLObject #=== # #* Python 2.6 is no longer supported. The minimal supported version is # Python 2.7. Is there a particular reason to eliminate RHEL 6 (Python 2.6)

Re: PyYaml not using Yaml 1.2?

2017-08-04 Thread leam hall
On Fri, Aug 4, 2017 at 11:52 AM, Skip Montanaro wrote: > > Getting in to Ansible and back into Python. Ansible uses pyyaml which > says > > it parses yaml version 1.1. Is there a reason it doesn't do yaml version > > 1.2? > > Nobody's done the work? Note that on the PyPI page: > > https://pypi.py

PyYaml not using Yaml 1.2?

2017-08-04 Thread leam hall
Getting in to Ansible and back into Python. Ansible uses pyyaml which says it parses yaml version 1.1. Is there a reason it doesn't do yaml version 1.2? Thanks! Leam -- https://mail.python.org/mailman/listinfo/python-list