Re: I'm finally disentangled from Python 2, thank you everyone

2020-12-29 Thread Cameron Simpson
On 29Dec2020 21:20, Chris Green wrote: >Well, it has taken me a while, but I now seem to have finally detached >myself from any Python 2 dependencies on my various systems. [...] >On my desktop machine it was a bit more difficult because of the Oki >scanner utility which I have asked about quite a

Re: Learning why module will not load

2020-12-29 Thread Rich Shepard
On Tue, 29 Dec 2020, Barry wrote: I do this to to debug odd import issues: $ python3.9 -v ... import six The output will show the attempts python makes to find the six module. Barry, Thank you. It's not finding six and I am rebuilding all python3 packages since almost none were build using

Re: Learning why module will not load

2020-12-29 Thread Barry
> On 29 Dec 2020, at 18:14, Rich Shepard wrote: > > Running Slackware-14.2/x86_64 and python-3.9.1. Installed are > six-1.14.0-x86_64-1_SBo and python3-six-1.13.0-x86_64-1_SBo (I don't know if > the latter is required because six is supposed to be available for python2 > and python3.) > > How

I'm finally disentangled from Python 2, thank you everyone

2020-12-29 Thread Chris Green
Well, it has taken me a while, but I now seem to have finally detached myself from any Python 2 dependencies on my various systems. Firstly may I say thank you to everyone who has helped me with this (and with other issues) here on the Python list, you are a friendly and helpful group of people.

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Chris Green
Matt Wheeler wrote: > On 29 Dec 2020, 14:48 +, Chris Green , wrote: > > I seem to have quite a lot of old python packages installed over the > > years using pip and would like, if I can. to clear some of them out. > > > > > > Is there any way to tell if a python package was installed by me > >

Re: Learning why module will not load

2020-12-29 Thread Rich Shepard
On Tue, 29 Dec 2020, Terry Reedy wrote: Packages have to be installed for a particular Python binary in order for that binary to import the package. Terry, I forgot about this as I don't often upgrade Python. Those packages apparently are not installed for that 3.9.1 binary. This will be

Re: How to uninstall python 2 package specifically?

2020-12-29 Thread Pankaj Jangid
Chris Green writes: > I have two (or maybe even three) versions of Click installed:- > > /usr/local/lib/python2.7/dist-packages/click > /usr/local/lib/python3.7/dist-packages/click > /usr/lib/python3/dist-packages/click > > I run [x]ubuntu. > > How can I uninstall those extra versions of click (w

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Matt Wheeler
On 29 Dec 2020, 14:48 +, Chris Green , wrote: > I seem to have quite a lot of old python packages installed over the > years using pip and would like, if I can. to clear some of them out. > > > Is there any way to tell if a python package was installed by me > directly using pip or was installe

Re: Learning why module will not load

2020-12-29 Thread Terry Reedy
On 12/29/2020 1:11 PM, Rich Shepard wrote: Running Slackware-14.2/x86_64 and python-3.9.1. Installed are six-1.14.0-x86_64-1_SBo and python3-six-1.13.0-x86_64-1_SBo (I don't know if the latter is required because six is supposed to be available for python2 and python3.) Packages have to be in

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Chris Green
Mats Wichmann wrote: > On 12/29/20 7:48 AM, Chris Green wrote: > > > > If there are any tools/utilities one can install to check these things > > out I'd love to know about them. > > There are some tools (on pypi naturally) for fiddling with installed > packages, but for starters try these two:

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Mats Wichmann
On 12/29/20 7:48 AM, Chris Green wrote: I seem to have quite a lot of old python packages installed over the years using pip and would like, if I can. to clear some of them out. Is there any way to tell if a python package was installed by me directly using pip or was installed from the [x]ubun

Learning why module will not load

2020-12-29 Thread Rich Shepard
Running Slackware-14.2/x86_64 and python-3.9.1. Installed are six-1.14.0-x86_64-1_SBo and python3-six-1.13.0-x86_64-1_SBo (I don't know if the latter is required because six is supposed to be available for python2 and python3.) However, python3 doesn't find either one: $ python3 Python 3.9.1 (de

Re: How to copy the entire outlook message content in python

2020-12-29 Thread Peter Pearson
On Tue, 29 Dec 2020 05:38:53 -0800 (PST), nikhil k wrote: ...[snip]... > import win32com.client as win32 > > ### Functions > def getMailBody(msgFile): > start_text = "" > end_text = "" > with open(msgFile) as f: > data=f.read() > return data[data.find(start_text):d

Re: 2 sample chi-square test

2020-12-29 Thread Peter Pearson
On Tue, 29 Dec 2020 02:52:15 -0800 (PST), Priya Singh wrote: [snip] > I have two spectra with wavelength, flux, and error on flux. I want to > find out the variability of these two spectra based on the 2 sample > Chi-square test. I am using following code: > > def compute_chi2_var(file1,file2,zemi

Why do I have both /usr/lib/python3 and /usr/lib/python3.8?

2020-12-29 Thread Chris Green
Why are there both /usr/lib/python3 and /usr/lib/python3.8 on my x[ubuntu] system? /usr/lib/python3 has just the dist-packages directory in it, /usr/lib/python3.8 has lots of individual python files in it as well as quite a number of directories. There's also a /usr/lib/python3.9 directory even

Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Chris Green
I seem to have quite a lot of old python packages installed over the years using pip and would like, if I can. to clear some of them out. Is there any way to tell if a python package was installed by me directly using pip or was installed from the [x]ubuntu repositories? 'pip list' just tells me

How to uninstall python 2 package specifically?

2020-12-29 Thread Chris Green
I have two (or maybe even three) versions of Click installed:- /usr/local/lib/python2.7/dist-packages/click /usr/local/lib/python3.7/dist-packages/click /usr/lib/python3/dist-packages/click I run [x]ubuntu. How can I uninstall those extra versions of click (which have presumably been installed b

How to copy the entire outlook message content in python

2020-12-29 Thread nikhil k
Hello All, I'm a beginner trying to achieve the below in my python script: Can anyone help me on this? I'm stuck at step2. 1. Input: A locally saved outlook mail (*.msg) path 2. Go to the path and Copy the entire body of the mail 3. Create a new mail and paste the contents into new mail 4. sen

2 sample chi-square test

2020-12-29 Thread Priya Singh
Hi all, I have two spectra with wavelength, flux, and error on flux. I want to find out the variability of these two spectra based on the 2 sample Chi-square test. I am using following code: def compute_chi2_var(file1,file2,zemi,vmin,vmax): w1,f1,e1,c1,vel1 = get_spec_vel(dir_data+file1,zem

Re: Which method to check if string index is queal to character.

2020-12-29 Thread jak
Il 29/12/2020 02:48, Bischoop ha scritto: On 2020-12-28, Mats Wichmann wrote: On 12/28/20 10:46 AM, Marco Sulla wrote: On Mon, 28 Dec 2020 at 17:37, Bischoop wrote: I'd like to check if there's "@" in a string and wondering if any method is better/safer than others. I was told on one occasi