How to uninstall Python3.7 in Windows using cmd ?

2020-03-27 Thread deepalee khare
Hi,

How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
/uninstall C:\Python37\python.exe But it gives me below error: enter
image description here

how do i uninstall it ?

Thanks,
Deepalee Khare
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2020-03-27 Thread Dan Campbell
Got it.  I had to set the minimum level, in the basic config, thus:

logging.basicConfig( filename = "whatthe.log", level=logging.INFO )

All set, thanks for the tip.

Regards,

DC


On Thu, Mar 26, 2020 at 5:35 PM Cameron Simpson  wrote:

> On 26Mar2020 14:02, [email protected]  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( "Test04\n" )
> >
> >, only the error log lines get sent to the file.
> >
> >How do I get info() and debug() to go to the file, as well?
>
> You do this by adjusting the logging level of your programme. The idea
> is that you can put logging calls all through your code at suitable
> levels (info, error, warning debug) and change the logging verbosity
> just by adjusting the logging level of the logger involved.
>
> So I often have a sniff around at startup in my programmes where I set
> up the logging, and default to logging.WARNING unless stderr is a
> terminal (inferring "interactive") and use logging.INFO. A command line
> switch or environment variable might be used to override these defaults.
> Having picked a level:
>
> root_logger = logging.getLogger()
> root_logger.setLevel(level)
>
> sets the level of the root logger, thus changing the verbosity.
>
> Obviously adjust if you've got a special purpose logger rather than the
> root logger.
>
> Cheers,
> Cameron Simpson 
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Grant Edwards
On 2020-03-26, Chris Angelico  wrote:

> You know what's a lot more fun? Perfect block justification, no ragged
> edges, no extra internal spaces. I'm not sure whether it's MORE
> annoying or LESS than using internal spaces, but it's certainly a lot
> more fun to write, since you have to compose on the fly.

I was about to mention that.  I've seen paragraphs written that way
and marvelled that the language still seemed natural. I've never tried
to do it myself.

--
Grant

-- 
https://mail.python.org/mailman/listinfo/python-list


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

2020-03-27 Thread dcwhatthe
On Friday, March 27, 2020 at 3:15:50 PM UTC-4, dcwhatthe wrote:
> 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" )
> 
> 
> , only the error log lines get sent to the file.
> 
> 
> How do I get info() and debug() to go to the file, as well?

Got it.  Someone named Cameron, assisted with this.  For my purposes, I just 
needed to set the minimum level (INFO) inside the basic config function.  From 
there, the logging will take place for INFO and above, i.e. INFO, DEBUG, and 
ERROR in this case:


logging.basicConfig( filename = "TestLogging_" +
 datetime.datetime.now().strftime("%Y%m%d_%H%M%S") + ".log", level = 
logging.INFO )


Thanks, Cameron.


Regards,

DC

-- 
https://mail.python.org/mailman/listinfo/python-list


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

2020-03-27 Thread Dan Campbell
Cameron, thanks.  I read something similar elsewhere, but I don't
understand what levels to set, and how many times.

Are we saying that we execute

root_logger = logging.getLogger()
root_logger.setLevel(1)  #Or some other level

, prior to running


 logging.basicConfig(...),

for each type of logging.

So like this?


root_logger = logging.getLogger()
root_logger.setLevel(1)  #Or some other level

logging.basicConfig( filename = "CheckConnectivity_error.log"  )


root_logger = logging.getLogger()
root_logger.setLevel(2)  #Or some other level

logging.basicConfig( filename = "CheckConnectivity_info.log"  )



root_logger = logging.getLogger()
root_logger.setLevel(3)  #Or some other level

logging.basicConfig( filename = "CheckConnectivity_debug.log"  )


?


Sorry, but I don't have the full context of this.


Regards,

DC





On Thu, Mar 26, 2020 at 5:35 PM Cameron Simpson  wrote:

> On 26Mar2020 14:02, [email protected]  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( "Test04\n" )
> >
> >, only the error log lines get sent to the file.
> >
> >How do I get info() and debug() to go to the file, as well?
>
> You do this by adjusting the logging level of your programme. The idea
> is that you can put logging calls all through your code at suitable
> levels (info, error, warning debug) and change the logging verbosity
> just by adjusting the logging level of the logger involved.
>
> So I often have a sniff around at startup in my programmes where I set
> up the logging, and default to logging.WARNING unless stderr is a
> terminal (inferring "interactive") and use logging.INFO. A command line
> switch or environment variable might be used to override these defaults.
> Having picked a level:
>
> root_logger = logging.getLogger()
> root_logger.setLevel(level)
>
> sets the level of the root logger, thus changing the verbosity.
>
> Obviously adjust if you've got a special purpose logger rather than the
> root logger.
>
> Cheers,
> Cameron Simpson 
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Chris Angelico
On Sat, Mar 28, 2020 at 7:24 AM Grant Edwards  wrote:
>
> On 2020-03-26, Chris Angelico  wrote:
>
> > You know what's a lot more fun? Perfect block justification, no ragged
> > edges, no extra internal spaces. I'm not sure whether it's MORE
> > annoying or LESS than using internal spaces, but it's certainly a lot
> > more fun to write, since you have to compose on the fly.
>
> I was about to mention that.  I've seen paragraphs written that way
> and marvelled that the language still seemed natural. I've never tried
> to do it myself.
>

It's a linguistic exercise - kinda like fitting your thoughts into a
poetic structure. It helps if you know a *lot* of synonyms for things
:)

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Dan Stromberg
On Fri, Mar 27, 2020 at 1:23 PM Grant Edwards 
wrote:

> On 2020-03-26, Chris Angelico  wrote:
>
> > You know what's a lot more fun? Perfect block justification, no ragged
> > edges, no extra internal spaces. I'm not sure whether it's MORE
> > annoying or LESS than using internal spaces, but it's certainly a lot
> > more fun to write, since you have to compose on the fly.
>
> I was about to mention that.  I've seen paragraphs written that way
> and marvelled that the language still seemed natural. I've never tried
> to do it myself.
>

Back when I was a kid, and wordprocessors were exemplified by WordStar, I
heard about a study the conclusion of which was that aligned right edges
were harder to read - that it was better to align on the left and leave the
right ragged.

But one study doesn't establish truth.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Michael Torrie
On 3/27/20 3:28 PM, Dan Stromberg wrote:
> Back when I was a kid, and wordprocessors were exemplified by WordStar, I
> heard about a study the conclusion of which was that aligned right edges
> were harder to read - that it was better to align on the left and leave the
> right ragged.
> 
> But one study doesn't establish truth.

I've read poorly-typeset, self-published books that were really hard to
read due to the way the full justification worked out.  Not sure if
that's just due to the poor typesetting job (a word processor probably
did it), or the font, or what.  There must be some tricks that
publishers use to both justify and keep the text looking good and
readable.  At one point in the print world, the majority of what I read
is fully justified, yet still quite readable.  Even now I think most
published books I've seen recently are fully justified. These days,
seems like more and more is ragged-right, such as magazines, which is
probably due to the prevalence of digital media where it's probably
easier to generate and easier to read on small screens.
-- 
https://mail.python.org/mailman/listinfo/python-list


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

2020-03-27 Thread Cameron Simpson

On 27Mar2020 16:18, Dan Campbell  wrote:

Got it.  I had to set the minimum level, in the basic config, thus:

   logging.basicConfig( filename = "whatthe.log", level=logging.INFO )


Good, you've found the table of predefined logging levels in the module 
docs then?


You'll notice that they are spaced apart by 10; in principle one can 
choose levels between them. Kind of irrelevant if nothing logs at such 
an intermediate level, but...


For example, I define for myself a TRACE value between INFO and WARNING, 
and a trace() call which logs at that level (like the predefined 
warning() function logs at logging.WARNING level). I often find my info 
calls are too verbose, and the warnings are only for badness, so I have 
a kind of intermediate call for "high level" far less frequent logs.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Dan Sommers
On Fri, 27 Mar 2020 15:46:54 -0600
Michael Torrie  wrote:

> On 3/27/20 3:28 PM, Dan Stromberg wrote:

> > Back when I was a kid, and wordprocessors were exemplified by
> > WordStar, I heard about a study the conclusion of which was that
> > aligned right edges were harder to read - that it was better to
> > align on the left and leave the right ragged.

I remember WordStar, and its text editor cousin WordMaster.

> > But one study doesn't establish truth.

> I've read poorly-typeset, self-published books that were really hard
> to read due to the way the full justification worked out.  Not sure if
> that's just due to the poor typesetting job (a word processor probably
> did it), or the font, or what.  There must be some tricks that
> publishers use to both justify and keep the text looking good and
> readable ...

Ask Donald Knuth why he invented TeX, and why math is enclosed in
literal $ (U+0024) characters.  ;-)

Also, there are word processors and there are word processors.  From an
aesthetics perspective, TeX has been producing beautiful printed pages
(and pairs and sequences of pages) for decades, Word still didn't the
last time I looked (maybe 8 or 10 years ago?), and there are dozens or
more in between.

> ... At one point in the print world, the majority of what I read is
> fully justified, yet still quite readable.  Even now I think most
> published books I've seen recently are fully justified. These days,
> seems like more and more is ragged-right, such as magazines, which is
> probably due to the prevalence of digital media where it's probably
> easier to generate and easier to read on small screens.

If content producers did their job well, a 2540 pixel per inch printed
page, a desktop 72 or 96 pixel per inch display screen, and a handheld
320 pixel per inch screen would all be optimized separately (through one
sort of style sheet mechanism or another).  But these days, they spend
more time and money on ads and SEO than typesetting.

Dan

-- 
“Atoms are not things.” – Werner Heisenberg
Dan Sommers, http://www.tombstonezero.net/dan
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to uninstall Python3.7 in Windows using cmd ?

2020-03-27 Thread boB Stepp
On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
 wrote:
>
> Hi,
>
> How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
> /uninstall C:\Python37\python.exe But it gives me below error: enter
> image description here
>
> how do i uninstall it ?
>
You appear to be using a version of Windows.  You can uninstall Python
like you would most other programs, using the built-in functionality
provided by Windows.  For instance in Win10 you can go to the Start
Menu, then settings and there is a section for handling Apps.  Find
Python in the list of Apps, click on it and you will get
repair/uninstall links.  Earlier versions of Windows are similarly
done.

HTH!


-- 
boB
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to uninstall Python3.7 in Windows using cmd ?

2020-03-27 Thread Souvik Dutta
Control panel is still alive. So just using it would be better. Go to
control panel. Then click uninstall a program. Then find python in the list
and double click on it to uninstall.

On Sat, 28 Mar, 2020, 6:07 am boB Stepp,  wrote:

> On Fri, Mar 27, 2020 at 1:22 PM deepalee khare
>  wrote:
> >
> > Hi,
> >
> > How to Uninstall Python3.7.3 using cmd ? i tried using cmd: Msiexec
> > /uninstall C:\Python37\python.exe But it gives me below error: enter
> > image description here
> >
> > how do i uninstall it ?
> >
> You appear to be using a version of Windows.  You can uninstall Python
> like you would most other programs, using the built-in functionality
> provided by Windows.  For instance in Win10 you can go to the Start
> Menu, then settings and there is a section for handling Apps.  Find
> Python in the list of Apps, click on it and you will get
> repair/uninstall links.  Earlier versions of Windows are similarly
> done.
>
> HTH!
>
>
> --
> boB
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list