Re: Profiler showing path dependency?

2020-03-26 Thread Chengcheng Xiang
Hi, Our tool can help with this: https://github.com/devopspp/pyliveupdate/blob/master/README.md#profiler. It can output a flamegraph and a per-path call summary. Feel free to check it out and let me know if there is any questions. -CC On Friday, March 13, 2020 at 4:52:51 PM UTC-7, Go Luhng wr

RE: Module import best practice

2020-03-26 Thread Rich Shepard
On Thu, 26 Mar 2020, Schachner, Joseph wrote: I can only tell you my preference. I prefer that Python modules be as self-contained as possible, because "global" is within a module; to share between modules you have to import something, as you know. Joseph, This makes good sense. I don't know

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Peter J. Holzer
On 2020-03-25 16:09:24 -0400, Richard Damon wrote: > On 3/25/20 3:52 PM, Peter J. Holzer wrote: > > If anything, I think it was fixed-width fonts which contributed to the > > decline of hyphenation: With a fixed-width font you can't get a proper > > justification anyway, and if your right margin is

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Grant Edwards
On 2020-03-26, Peter J. Holzer wrote: >> Actually, fixed width fonts are easy to justify, you just add additional >> space between words through the line. > > Yes. It's easy to do it wrong and impossible to do it right :-) > > (BTDT) > > The problem is that you can only insert an integral number

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Richard Damon
On 3/26/20 3:20 PM, Grant Edwards wrote: > On 2020-03-26, Peter J. Holzer wrote: >>> Actually, fixed width fonts are easy to justify, you just add additional >>> space between words through the line. >> Yes. It's easy to do it wrong and impossible to do it right :-) >> >> (BTDT) >> >> The problem

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Grant Edwards
On 2020-03-26, Richard Damon wrote: >> [...] nobody in their right mind would actually >> want to generate real output that way. > > Back in the day it was FREQUENTLY done, in part to show off, anyone > could type with a typewriter and get jagged right margins, but with a > computer you could get

Re: Module import best practice

2020-03-26 Thread DL Neil via Python-list
Rich, On 26/03/20 9:09 AM, Rich Shepard wrote: I'm writing an application using Python3 and Tkinter. The views/ directory contain multiple modules, including one called commonDlgs.py. This contains classes (such as those for validating data entry) used by all the data entry views. Some classe

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Chris Angelico
On Fri, Mar 27, 2020 at 7:44 AM Grant Edwards wrote: > > On 2020-03-26, Richard Damon wrote: > > >> [...] nobody in their right mind would actually > >> want to generate real output that way. > > > > Back in the day it was FREQUENTLY done, in part to show off, anyone > > could type with a typewri

How come logging.error writes to a file, but not logging.debug or logging.info?

2020-03-26 Thread dcwhatthe
Hi, When we run logging.basicConfig( filename = "TestLogging_" + datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log" ) , and then logging.error( "Test01\n" ) logging.debug("Test02\n") logging.info("Test03\n") logging.error( "Test04\n" )

Re: Module import best practice

2020-03-26 Thread Rich Shepard
On Fri, 27 Mar 2020, DL Neil via Python-list wrote: My personal approach is to follow 'the Zen of Python' and prefer "explicit" over "implicit". (it helps beginners, as well as us old-fogies whose minds cannot retain things for very long) DL, That was my original approach. I see little poin

Re: How come logging.error writes to a file, but not logging.debug or logging.info?

2020-03-26 Thread Cameron Simpson
On 26Mar2020 14:02, dcwhat...@gmail.com wrote: When we run logging.basicConfig( filename = "TestLogging_" + datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log" ) , and then logging.error( "Test01\n" ) logging.debug("Test02\n") logging.info("Test03\n") logging.error( "T

Re: Module import best practice

2020-03-26 Thread DL Neil via Python-list
I'm not a professional coder. I'm an environmental consultant and I use a I take it all back then... No! No need to feel apologetic, the Python community works hard to be inclusive - which I take to include levels of expertise, not merely countering the various "-isms". variety of tools de