[Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Yogesh Tirthkar
Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


Regards,
Yogesh.
_
Technology Group | GIC Private Limited | 168 Robinson Road, #37-01, Capital 
Tower, Singapore 068912


This email from GIC may contain confidential information. Unauthorised 
communication and disclosure of any information in this email is prohibited. If 
you are not the intended recipient, please notify the sender and delete this 
email immediately.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Standard class for time *period*?

2023-03-28 Thread Loris Bennett
Dennis Lee Bieber  writes:

> On Tue, 28 Mar 2023 08:14:55 +0200, "Loris Bennett"
>  declaimed the following:
>
>>
>>No, it doesn't.  I already know about timedelta.  I must have explained
>>the issue badly, because everyone seems to be fixating on the
>>formatting, which is not a problem and is incidental to what I am really
>>interested in, namely:
>>
>>1. Is there a standard class for a 'period', i.e. length of time
>>   specified by a start point and an end point?  The start and end
>>   points could obviously be datetimes and the difference a timedelta,
>>   but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
>>   different to '2023-03-01 00:00 to 2023-03-02 00:00' even if the
>>   *duration* of both periods is the same.
>>
>>2. If such a standard class doesn't exist, why does it not exist?
>>
>
>   So far, you seem to be the only person who has ever asked for a single
> entity incorporating an EPOCH (datetime.datetime) + a DURATION
> (datetime.timedelta). You are asking for two durations of the same length
> to be considered different if they were computed from different "zero"
> references (epochs). 

I thought I was asking for two periods of the same duration to be
considered different, if they have different starting points :-)

> I don't think I've ever encountered an application
> that doesn't use a single epoch (possibly per run) with all internal
> computations using a timedelta FROM THAT EPOCH! (The exception may have
> been computing star atlases during the conversion from B1900 to J2000
> reference frames.)

But even if I have a single epoch, January 2022 is obviously different
to January 2023, even thought the duration might be the same.  I am just
surprised that there is no standard Period class, with which I could
create objects and then be able to sort, check for identity, equality of
length, amount of overlap, etc.  I suppose people just use a
datetime.datetime pair, as I have been doing so far, and tack on just
the specific bit of functionality they need.

-- 
This signature is currently under constuction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Standard class for time *period*?

2023-03-28 Thread Loris Bennett
Thomas Passin  writes:

> On 3/27/2023 11:34 AM, rbowman wrote:
>> On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote:
>> 
>>>I need to deal with what I call a 'period', which is a span of time
>>>limited by two dates, start and end.  The period has a 'duration',
>>>which is the elapsed time between start and end.  The duration is
>>>essentially a number of seconds, but in my context, because the
>>>durations are usually hours or days, I would generally want to display
>>>the duration in a format such as "dd-hh:mm:ss"
>> https://www.programiz.com/python-programming/datetime
>> Scroll down to timedelta. If '14 days, 13:55:39' isn't good enough
>> you'll
>> have to format it yourself.
>
> I second this.  timedelta should give the OP exactly what he's talking
> about.

No, it doesn't.  I already know about timedelta.  I must have explained
the issue badly, because everyone seems to be fixating on the
formatting, which is not a problem and is incidental to what I am really
interested in, namely:

1. Is there a standard class for a 'period', i.e. length of time
   specified by a start point and an end point?  The start and end
   points could obviously be datetimes and the difference a timedelta,
   but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
   different to '2023-03-01 00:00 to 2023-03-02 00:00' even if the
   *duration* of both periods is the same.

2. If such a standard class doesn't exist, why does it not exist?

Cheers,

Loris

-- 
This signature is currently under constuction.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote:
> On 3/27/2023 8:37 PM, a a wrote: 
> >> To save the tabs, right click any one of them and select the "Select All 
> >> Tabs" item. They will all highlight. Right click on one of them and 
> >> select the "Bookmark Tabs" item. A dialog box will open with an entry 
> >> lone for the Name to use (like "Tabset1") and a location - a bookmark 
> >> folder - for them to go into. CAREFUL - if you just click "Save", you 
> >> may not be able to find them. Use the dropdown arrow to save them in 
> >> one of the top level folders, like "Bookmarks Toolbars". 
> > I can select All Opened Tabs (as from the given link) 
> > and get 1,000+ Opened Tabs ( I am afraid, this is s number of all saved 
> > bookmarks in the past) 
> > I go to menu, Bookmarks, Manage Boomarks and copy Tabs 
> > 
> > and 
> > https://www.textfixer.com/html/convert-url-to-html-link.php 
> > 
> > does the job, converting text urls into clickable web links 
> > 
> > I copy the result and past into Notepad++ to save file as html 
> > 
> > and what I get is web page of clickable Opened Tabs 
> > 
> > since icon and page name are lost
> I don't understand this. You don't really have 1000 tabs open at the 
> same time, do you? If you select all the open tabs - I think you wrote 
> that you only have 50 - then you can save them as bookmarks under a 
> folder name you choose. That folder will contain the 50 open links. I 
> tried it this evening, so I know that's how it works. (It happens that 
> I'm working on my own bookmark manager just now, so I've been messing 
> around with importing, exporting, and reading the bookmark files). 
> 
> Then you can export them and import the same bookmark file into another 
> browser on another computer. Whenever you want to reopen some of those 
> tabs, you would navigate to that part of the bookmarks and open the tabs 
> you want. 
> 
> Maybe you have something else in mind? Do you want to send the links of 
> the opened tab set to someone else, but not all your bookmarks? Please 
> explain more carefully what you want to do.

Ok, I was not aware of the real number of the opened Tabs in Firefox, since I 
can jump from left to right and vice versa in real time, so the number given by 
me: 50 opened Tabs was my general estimate, but I can read the real number of 
opened Tabs from the same menu (line below) to be 1,000+

What I copy and paste into Notepad++ is 1,000+ -line file.
It's hard to verify if the above number is made of opened Tabs only or 
bookmarks are included, 
since I exactly use and keep multi Tabs opened as my live bookmarks and cache 
memory, when I work on my projects (watching, counting sunspots,   Earthquakes 
prediction in Turkey, ... )

I would like to fund the development of such smart Tabs Manager to replace 
boomarks, to let me group Tabs belonging to different projects.

It doesn't look to be complicated, if supported by the Firefox team.

Firefox 97. comes with alike functionality (when I open a new Tab)  but limited 
to 4 rows of web-page icons + names and 4 rows called: Recent activity

All I need is to replace opened Tabs by history of the Recent activity - 
default Firefox page, when I open a new Tab

It's hard to imagine, I can have 1,000+ Tabs live opened in Firefox
but I really need such feature, called in the past as: MyLifeBits by MS

So I have to ask Firefox team today  to lift 4 rows limit on web links and 4 
rows limit on the recent activity, coming with
New Tab opened


When I am busy on a project I can open 100+ web pages via search engine  in one 
day and would prefer
100+ opened Tabs to be saved in html format for the records as a reference.

Hope to get some support from Firefox team via Twitter.

Ok, smart bookmarks manager can offer the above functionality right now, so I 
go to search engine to get one.

darius

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


Re: Standard class for time *period*?

2023-03-28 Thread Dennis Lee Bieber
On Tue, 28 Mar 2023 08:14:55 +0200, "Loris Bennett"
 declaimed the following:

>
>No, it doesn't.  I already know about timedelta.  I must have explained
>the issue badly, because everyone seems to be fixating on the
>formatting, which is not a problem and is incidental to what I am really
>interested in, namely:
>
>1. Is there a standard class for a 'period', i.e. length of time
>   specified by a start point and an end point?  The start and end
>   points could obviously be datetimes and the difference a timedelta,
>   but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
>   different to '2023-03-01 00:00 to 2023-03-02 00:00' even if the
>   *duration* of both periods is the same.
>
>2. If such a standard class doesn't exist, why does it not exist?
>

So far, you seem to be the only person who has ever asked for a single
entity incorporating an EPOCH (datetime.datetime) + a DURATION
(datetime.timedelta). You are asking for two durations of the same length
to be considered different if they were computed from different "zero"
references (epochs). I don't think I've ever encountered an application
that doesn't use a single epoch (possibly per run) with all internal
computations using a timedelta FROM THAT EPOCH! (The exception may have
been computing star atlases during the conversion from B1900 to J2000
reference frames.)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 06:33:44 UTC+2, Thomas Passin wrote:
> On 3/27/2023 8:37 PM, a a wrote: 
> >> To save the tabs, right click any one of them and select the "Select All 
> >> Tabs" item. They will all highlight. Right click on one of them and 
> >> select the "Bookmark Tabs" item. A dialog box will open with an entry 
> >> lone for the Name to use (like "Tabset1") and a location - a bookmark 
> >> folder - for them to go into. CAREFUL - if you just click "Save", you 
> >> may not be able to find them. Use the dropdown arrow to save them in 
> >> one of the top level folders, like "Bookmarks Toolbars". 
> > I can select All Opened Tabs (as from the given link) 
> > and get 1,000+ Opened Tabs ( I am afraid, this is s number of all saved 
> > bookmarks in the past) 
> > I go to menu, Bookmarks, Manage Boomarks and copy Tabs 
> > 
> > and 
> > https://www.textfixer.com/html/convert-url-to-html-link.php 
> > 
> > does the job, converting text urls into clickable web links 
> > 
> > I copy the result and past into Notepad++ to save file as html 
> > 
> > and what I get is web page of clickable Opened Tabs 
> > 
> > since icon and page name are lost
> I don't understand this. You don't really have 1000 tabs open at the 
> same time, do you? If you select all the open tabs - I think you wrote 
> that you only have 50 - then you can save them as bookmarks under a 
> folder name you choose. That folder will contain the 50 open links. I 
> tried it this evening, so I know that's how it works. (It happens that 
> I'm working on my own bookmark manager just now, so I've been messing 
> around with importing, exporting, and reading the bookmark files). 
> 
> Then you can export them and import the same bookmark file into another 
> browser on another computer. Whenever you want to reopen some of those 
> tabs, you would navigate to that part of the bookmarks and open the tabs 
> you want. 
> 
> Maybe you have something else in mind? Do you want to send the links of 
> the opened tab set to someone else, but not all your bookmarks? Please 
> explain more carefully what you want to do.

Ok, I can export bookmarks to html file and open it in Firefox to get
a long list of clickable urls but icon of the bookmarked web page is missing.

When I open Bookmarks as right a side-bar I can view and identify an individual 
Boomarks by icon,
so I would like Firefox Library to export Bookmarks to html file, icons 
included ;)

Since accessing opened Tabs is my default use of history in Firefox and has 
worked fine for years
I paid no special interest to bookmark opened Tabs and assign labels to 
individual bookmark.

So, generally speaking, I am happy with 1,000+ opened Tabs in Firefox , not 
being sure if this number is for real or refers to every bookmark from the 
history + opened Tabs

But definitely I need a smarter solution and approach to manage 10,000+ opened 
Tabs in Firefox in a future ;)

- I just build personal search engine resembling targets set by MyLifeBits 
Project by Microsoft in the past.

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


Re: Standard class for time *period*?

2023-03-28 Thread rbowman
On Tue, 28 Mar 2023 15:11:14 +0200, Loris Bennett wrote:


> But even if I have a single epoch, January 2022 is obviously different
> to January 2023, even thought the duration might be the same.  I am just
> surprised that there is no standard Period class, with which I could
> create objects and then be able to sort, check for identity, equality of
> length, amount of overlap, etc.  I suppose people just use a
> datetime.datetime pair, as I have been doing so far, and tack on just
> the specific bit of functionality they need.

It's called Unix time...  Convert the seconds into whatever you want. 
-- 
https://mail.python.org/mailman/listinfo/python-list


found older version of python in my command prompt

2023-03-28 Thread pranavbhardwaj773
    

    

   Sent from [1]Mail for Windows

   Dear sir,

     I am Pranav Bhardwaj and I am facing issue regarding python
   version. When I try to open python in my command prompt, I see there is
   very older version in it that is python 2.7.13 as a default version. I
   want to switch my default version to the latest version in my command
   prompt. Plese help me how can I do this.

    

References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


Aw: Re: Standard class for time *period*?

2023-03-28 Thread Karsten Hilbert
> No, it doesn't.  I already know about timedelta.  I must have explained
> the issue badly, because everyone seems to be fixating on the
> formatting, which is not a problem and is incidental to what I am really
> interested in, namely:
>
> 1. Is there a standard class for a 'period', i.e. length of time
>specified by a start point and an end point?  The start and end
>points could obviously be datetimes and the difference a timedelta,
>but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
>different to '2023-03-01 00:00 to 2023-03-02 00:00' even if the
>*duration* of both periods is the same.

Not that I know, within the constraints of the standard library.

However:

class CalendarPeriod:
   def __init__(self, start, end):
  self.start = start
  self.end = end

?

For this to be *useful* more needs need to be explained. Until then - YAGNI.

Karsten

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


Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin

On 3/28/2023 8:47 AM, a a wrote:

Ok, I can export bookmarks to html file and open it in Firefox to get
a long list of clickable urls but icon of the bookmarked web page is missing.

When I open Bookmarks as right a side-bar I can view and identify an individual 
Boomarks by icon,
so I would like Firefox Library to export Bookmarks to html file, icons 
included 😉

Since accessing opened Tabs is my default use of history in Firefox and has 
worked fine for years
I paid no special interest to bookmark opened Tabs and assign labels to 
individual bookmark.

So, generally speaking, I am happy with 1,000+ opened Tabs in Firefox , not 
being sure if this number is for real or refers to every bookmark from the 
history + opened Tabs

But definitely I need a smarter solution and approach to manage 10,000+ opened 
Tabs in Firefox in a future 😉


I think you had better start using another name for this thread, if it 
continues.


The HTML export file will contain the icons, but the HTML elements do 
not provide for showing them.


I can't imagine how you can find anything among nor navigate through 
1000 open tabs, let alone 10,000 in the future. I would think the memory 
usage would be impossibly high.  So I hope you are mostly using the 
history and do not really have that many tabs open at once!


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


Re: Standard class for time *period*?

2023-03-28 Thread Grant Edwards
On 2023-03-28, Dennis Lee Bieber  wrote:

> So far, you seem to be the only person who has ever asked for a
> single entity incorporating an EPOCH (datetime.datetime) + a
> DURATION (datetime.timedelta).

It seems to me that tuple of two timdate objects (start,end) is the
more obvious representation, but it's six of one and a horse of the
same color.

If one really needs it to be a class, then it woulnd't be much more
than a dozen or two lines of code...

--
Grant

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


Re: [Request for Assistance] To uninstall python installed in other user profile (Win 10)

2023-03-28 Thread Thomas Passin

On 3/28/2023 12:56 AM, Yogesh Tirthkar wrote:

Hi Team,

Could you please advise on the scenario in windows 10 machine : Where we need 
to uninstall/remove python from user profile A (installed by user A in its own 
profile folder) - via an admin user or system account.

Currently when we try to uninstall it via admin/system account - it displays 
that the python product is not installed for this user (admin/system).

Appreciate your assistance.


It depends on where the Python installation is located, but I would just 
delete the entire folder tree at %APPDATA%\Python\Python3xxx.


If Python was installed for all users, its main set of files will 
probably be in "c:\Program Files" and Window's "Add or Remove" page 
should remove it.


If it was installed just for User A, then the "Add or Remove" page will 
find it if run from User A's account.  If for some reason User A will 
not or cannot cooperate, the admin could change User A's password and 
then run "Add or Remove".  Of course the admin would not be able to 
change the pw back, but if User A is not cooperating maybe that wouldn't 
matter.


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


Re: Standard class for time *period*?

2023-03-28 Thread Thomas Passin

On 3/28/2023 12:13 PM, Grant Edwards wrote:

On 2023-03-28, Dennis Lee Bieber  wrote:


So far, you seem to be the only person who has ever asked for a
single entity incorporating an EPOCH (datetime.datetime) + a
DURATION (datetime.timedelta).


It seems to me that tuple of two timdate objects (start,end) is the
more obvious representation, but it's six of one and a horse of the
same color.

If one really needs it to be a class, then it woulnd't be much more
than a dozen or two lines of code...


I think it would be more than that.  The OP said

"But even if I have a single epoch, January 2022 is obviously different
to January 2023, even thought the duration might be the same.  I am just
surprised that there is no standard Period class, with which I could
create objects and then be able to sort, check for identity, equality of
length, amount of overlap, etc.  I suppose people just use a
datetime.datetime pair, as I have been doing so far, and tack on just
the specific bit of functionality they need."

A class could be devised to have methods to do those things, but it 
would take some thought to be sure if they all made sense.  Take 
sorting, for example.  Are two "Periods" really comparable?  Can we have 
complete ordering  here?  "Identity" too would have to be carefully 
defined, and then a __eq__ method could be implemented.  And so on.


It would take more than 10 or 20 lines, I would think.  But the hard 
work of figuring out exactly what is wanted and what even makes sense to 
implement needs to be done first.


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


Re: Standard class for time *period*?

2023-03-28 Thread Grant Edwards
On 2023-03-28, Thomas Passin  wrote:
> On 3/28/2023 12:13 PM, Grant Edwards wrote:
>> On 2023-03-28, Dennis Lee Bieber  wrote:
>> 
>>> So far, you seem to be the only person who has ever asked for a
>>> single entity incorporating an EPOCH (datetime.datetime) + a
>>> DURATION (datetime.timedelta).
>> 
>> It seems to me that tuple of two timdate objects (start,end) is the
>> more obvious representation, but it's six of one and a horse of the
>> same color.
>> 
>> If one really needs it to be a class, then it woulnd't be much more
>> than a dozen or two lines of code...
>
> I think it would be more than that.  The OP said

You're right. I had forgotten about a few of the operations mentioned,
so it might take a bit more than a couple dozen line, but not _that_
much more. The hard part would be defining those operations, and as
the OP says, it doesn't seem to me like there is an obvious definition
for many of them.

If there's no obvious common definition for what a class is supposed
to do, then there can't really be a standard one...

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


Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread a a
On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote:
> On 3/28/2023 8:47 AM, a a wrote: 
> > Ok, I can export bookmarks to html file and open it in Firefox to get 
> > a long list of clickable urls but icon of the bookmarked web page is 
> > missing. 
> > 
> > When I open Bookmarks as right a side-bar I can view and identify an 
> > individual Boomarks by icon,
> > so I would like Firefox Library to export Bookmarks to html file, icons 
> > included 😉
> > 
> > Since accessing opened Tabs is my default use of history in Firefox and has 
> > worked fine for years 
> > I paid no special interest to bookmark opened Tabs and assign labels to 
> > individual bookmark. 
> > 
> > So, generally speaking, I am happy with 1,000+ opened Tabs in Firefox , not 
> > being sure if this number is for real or refers to every bookmark from the 
> > history + opened Tabs 
> >
> > But definitely I need a smarter solution and approach to manage 10,000+ 
> > opened Tabs in Firefox in a future 😉 
> 
> I think you had better start using another name for this thread, if it 
> continues. 
> 
> The HTML export file will contain the icons, but the HTML elements do 
> not provide for showing them. 
> 
> I can't imagine how you can find anything among nor navigate through 
> 1000 open tabs, let alone 10,000 in the future. I would think the memory 
> usage would be impossibly high. So I hope you are mostly using the 
> history and do not really have that many tabs open at once!


I am a plain guy, so if Firefox counted 1,000+ opened Tabs, I can be surprised, 
but have no idea how to check that number.

You are exactly right, icon URI and icon data come with saved opened Tabs,
a single example below.

So I am going to ask Firefox team to offer
export to html, modified to have :
icon, name of web page, url address
to appear in a single row (feature already supported by Firefox, when you open 
new Tab
and click: enter URL or search string - input field,
you get such list
List is limited in size for the reasons unknown to me, but feature works fine.

--
So would prefer a horizontal list of opened Tabs
by htmlized, vertical list of the same opened Tabs,
featuring:
icon, name of web-site, URL address

Thank you for your excellent support

darius


"https://www.nasa.gov/feature/goddard/2017/nasas-sdo-watches-a-sunspot-turn-toward-earth";
 add_date="1499899506" last_modified="1499899507" 
icon_u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aQ8jyKjD6ewy3Khuwp4zJXg0MQSLZgykdKpRqu+KLedw5EQB+ojVGGG/jlRUIHncEBgfHQiEhwEFlMGKSrFlxwV85Q5FiS4Ic1GAKdESqidORqZsxXufn0J5TePdGFMLwjL74bmvd2gBfcrKVI8HO2VI/ira+fmbaZg4qrtyz5/25+Ll/9qPjPS+SI4Nxq9XHcP4J0hTe3IRQ9kmc/l4hIU0l4yL3x5HbcZi9LaXI9BDmp71MvD2m6g8nY196/agYeBgxPeMwez3DyK0vBDzas6ix7Be6L30dXAWCzxkwZnvZOLLrDwI5AlsqXhuW3KSZsqZtbPcbUHctYAhdfUUl1vcCFmi5glY/0Yq0kd3Vw5popT589/uQ7TVgD4JIXjpvYMYOygaUnUd

Re: Standard class for time *period*?

2023-03-28 Thread dn via Python-list

1. Is there a standard class for a 'period', i.e. length of time
   specified by a start point and an end point?  The start and end
   points could obviously be datetimes and the difference a timedelta,
   but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
   different to '2023-03-01 00:00 to 2023-03-02 00:00' even if the
   *duration* of both periods is the same.


But even if I have a single epoch, January 2022 is obviously different
to January 2023, even thought the duration might be the same.  I am just
surprised that there is no standard Period class, with which I could
create objects and then be able to sort, check for identity, equality of
length, amount of overlap, etc.  I suppose people just use a
datetime.datetime pair, as I have been doing so far, and tack on just
the specific bit of functionality they need.


The request for a "standard class" has probably been answered.

Please give a use-case example to help outline the problem to be solved...

eg if the Apple-picking season starts in January and runs for some 
weeks, and the Pear-picking season starts in February (etc), then 
calculation will reveal if one team of pickers can do both jobs or if 
two teams will be needed. If a list of tasks is to be displayed/printed, 
then it would be useful to list both, but in chronological order - 
perhaps by start-date.
(this idea of possible application fails to illustrate a rationale for 
some of the functionality listed, above, but you get the idea of how to 
give us the idea...)


In a custom-class, an __eq__( self, other, ) may be defined to consider 
any single or combination of attributes of the two classes. So, 
roll-your-own may not be that difficult - although anything involving 
time-calculations is wont to open a can-of-worms...


--
Regards,
=dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: found older version of python in my command prompt

2023-03-28 Thread Barry


> On 28 Mar 2023, at 16:44, pranavbhardwaj...@gmail.com wrote:
> 
> 
> 
>
> 
>   Sent from [1]Mail for Windows
> 
>   Dear sir,
> 
> I am Pranav Bhardwaj and I am facing issue regarding python
>   version. When I try to open python in my command prompt, I see there is
>   very older version in it that is python 2.7.13 as a default version. I
>   want to switch my default version to the latest version in my command
>   prompt. Plese help me how can I do this.

Uninstall python 2.7 in the usual windows way.
Download python 3.11 from python.org and run the installer.

In a cmd terminal window run py.exe and you should get the python prompt.

Barry
> 
>
> 
> References
> 
>   Visible links
>   1. https://go.microsoft.com/fwlink/?LinkId=550986
> -- 
> https://mail.python.org/mailman/listinfo/python-list

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


Re: Numpy, Matplotlib crash Python 3.8 Windows 7, 32-bit - can you help ?

2023-03-28 Thread Thomas Passin

On 3/28/2023 1:50 PM, a a wrote:

On Tuesday, 28 March 2023 at 18:12:40 UTC+2, Thomas Passin wrote:

On 3/28/2023 8:47 AM, a a wrote:

Ok, I can export bookmarks to html file and open it in Firefox to get
a long list of clickable urls but icon of the bookmarked web page is missing.

When I open Bookmarks as right a side-bar I can view and identify an individual 
Boomarks by icon,
so I would like Firefox Library to export Bookmarks to html file, icons 
included 😉

Since accessing opened Tabs is my default use of history in Firefox and has 
worked fine for years
I paid no special interest to bookmark opened Tabs and assign labels to 
individual bookmark.

So, generally speaking, I am happy with 1,000+ opened Tabs in Firefox , not 
being sure if this number is for real or refers to every bookmark from the 
history + opened Tabs

But definitely I need a smarter solution and approach to manage 10,000+ opened 
Tabs in Firefox in a future 😉


I think you had better start using another name for this thread, if it
continues.

The HTML export file will contain the icons, but the HTML elements do
not provide for showing them.

I can't imagine how you can find anything among nor navigate through
1000 open tabs, let alone 10,000 in the future. I would think the memory
usage would be impossibly high. So I hope you are mostly using the
history and do not really have that many tabs open at once!



I am a plain guy, so if Firefox counted 1,000+ opened Tabs, I can be surprised, 
but have no idea how to check that number.

You are exactly right, icon URI and icon data come with saved opened Tabs,
a single example below.

So I am going to ask Firefox team to offer
export to html, modified to have :
icon, name of web page, url address
to appear in a single row (feature already supported by Firefox, when you open 
new Tab
and click: enter URL or search string - input field,
you get such list
List is limited in size for the reasons unknown to me, but feature works fine.


You should be aware that the HTML format for bookmarks is a standard 
developed back in the day by Netscape. It goes back to the early 1990s, 
I think. The FF folks will not be modifying it, since all browsers know 
how to generate it and consume it, and who knows how many software 
packages consume it.  No one can afford to have a change, even one 
that's supposed to be harmless, inadvertently break software that's 
worked for years.


They are going to need a lot of persuading.

Maybe there's something else they would be willing and able to do.  But 
you can expect that any proposed new feature will probably need to have 
some strong support.  Raymond Chen at Microsoft has written how each new 
feature proposal starts off with -100 points.  Only if the advantages 
get the score up above zero can the feature have any chance of getting 
adopted - and then it has to compete with other potential features that 
have their own scores.




--
So would prefer a horizontal list of opened Tabs
by htmlized, vertical list of the same opened Tabs,
featuring:
icon, name of web-site, URL address

Thank you for your excellent support


You're welcome.

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


RE: found older version of python in my command prompt

2023-03-28 Thread Mike Dewhirst
The quickest and dirtiest fix is to edit your %path% variable in windows. 
Remove all python versions you don't want from the path and Windows won't find 
them.You can then just delete the unwanted python directories.That doesn't 
remove any old dll files in secret locations but this is a dirty 
fix.--(Unsigned mail from my phone)
 Original message From: pranavbhardwaj...@gmail.com Date: 
29/3/23  02:43  (GMT+10:00) To: Python-list@python.org Subject: found older 
version of python in my command prompt            Sent from [1]Mail for Windows 
  Dear sir,     I am Pranav Bhardwaj and I am facing issue 
regarding python   version. When I try to open python in my command prompt, I 
see there is   very older version in it that is python 2.7.13 as a default 
version. I   want to switch my default version to the latest version in my 
command   prompt. Plese help me how can I do this.    References   Visible 
links   1. https://go.microsoft.com/fwlink/?LinkId=550986-- 
https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


recent-files

2023-03-28 Thread g...@uol.com.br
   In Python 3.11.2,  the recent-files list keeps always increasing because
   it is impossible to edit the list; the corresponding .txt file has
   disappeared.
   Please help!

   Giorgio Gambirasio
   g...@uol.com.br

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


Re: recent-files

2023-03-28 Thread Mats Wichmann

On 3/28/23 16:39, g...@uol.com.br wrote:

In Python 3.11.2,  the recent-files list keeps always increasing because
it is impossible to edit the list; the corresponding .txt file has
disappeared.
Please help!


Please explain what you're asking about. What recent-files list? Python 
itself has no such concept.



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


Re: Standard class for time *period*?

2023-03-28 Thread Cameron Simpson

On 28Mar2023 08:05, Dennis Lee Bieber  wrote:
	So far, you seem to be the only person who has ever asked for a 
	single

entity incorporating an EPOCH (datetime.datetime) + a DURATION
(datetime.timedelta).


But not the only person to want one. I've got a timeseries data format 
where (within a file) time slots are represented as a seconds offset, 
and the file has an associated epoch starting point. Dual to that is 
that a timeslot has an offset from the file start, and that is 
effectively a (file-epoch, duration) notion.


I've got plenty of code using that which passes around UNIX timestamp 
start/stop pairs. Various conversions happen to select the appropriate 
file (this keeps the files of bounded size while supporting an unbounded 
time range).


Even a UNIX timestamp has an implied epoch, and therefore kind of 
represents that epoch plus the timestamp as a duration.


I'm not sure I understand Loris' other requirements though. It might be 
hard to write a general thing which was also still useful.


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


Re: What kind of "thread safe" are deque's actually?

2023-03-28 Thread Greg Ewing via Python-list

On 28/03/23 2:25 pm, Travis Griggs wrote:

Interestingly the error also only started showing up when I switched from 
running a statistics.mean() on one of these, instead of what I had been using, 
a statistics.median(). Apparently the kind of iteration done in a mean, is more 
conflict prone than a median?


It may be a matter of whether the GIL is held or not. I had a look
at the source for deque, and it doesn't seem to explicitly do
anything about locking, it just relies on the GIL.

So maybe statistics.median() is implemented in C and statistics.mean()
in Python, or something like that?

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


Re: What kind of "thread safe" are deque's actually?

2023-03-28 Thread Chris Angelico
On Wed, 29 Mar 2023 at 16:56, Greg Ewing via Python-list
 wrote:
>
> On 28/03/23 2:25 pm, Travis Griggs wrote:
> > Interestingly the error also only started showing up when I switched from 
> > running a statistics.mean() on one of these, instead of what I had been 
> > using, a statistics.median(). Apparently the kind of iteration done in a 
> > mean, is more conflict prone than a median?
>
> It may be a matter of whether the GIL is held or not. I had a look
> at the source for deque, and it doesn't seem to explicitly do
> anything about locking, it just relies on the GIL.
>
> So maybe statistics.median() is implemented in C and statistics.mean()
> in Python, or something like that?
>

Both functions are implemented in Python, but median() starts out with
this notable line:

data = sorted(data)

which gives back a copy, iterated over rapidly in C. All subsequent
work is done on that copy.

The same effect could be had with mean() by taking a snapshot using
list(q) and, I believe, would have the same effect (the source code
for the sorted() function begins by calling PySequence_List).

In any case, it makes *conceptual* sense to do your analysis on a copy
of the queue, thus ensuring that your stats are stable. The other
threads can keep going while you do your calculations, even if that
means changing the queue.

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