performance test on python with C API interface

2024-08-20 Thread aotto1968 via Python-list
I would like to present you with a performance test where Python performs very well in relation to the NHI1 project regarding the integration of Python into C. -> results: http://thedev.nhi1.de/theLink/main/md_docs_2main_2README__PERFORMANCE.htm#README_PERFORMANCE -> project

Re: test-ignore

2024-02-18 Thread Science Researcher via Python-list
"Lawrence D'Oliveiro" wrote in message news:uqrik4$lrc1$1...@dont-email.me... On Sat, 17 Feb 2024 17:00:59 -0600, Science Researcher wrote: "Lawrence D'Oliveiro" wrote in message news:uqmbp3$3hsa6$1...@dont-email.me... If I remember correctly, I had to get the installation program

Re: test-ignore

2024-02-16 Thread Grizzy Adams via Python-list
Thursday, February 15, 2024 at 16:02, Tony Oliver via Python-list wrote: Re: test-ignore (at least in part) >On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: >> Test - ignore February 15, 2024 >> >> Test post to see if my Newsgroup post program is working. >

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
> > True, but did the poster really need to send another one to say "yes, > that worked"? > Maybe to test the bidirectionality of the gateway? 🤷 If the messages stop I think we can let it die. It's not like this sort of activity is a regular occurrence. (A bigger probl

Re: test-ignore

2024-02-15 Thread MRAB via Python-list
On 2024-02-16 00:29, Skip Montanaro via Python-list wrote: > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, bu

Re: test-ignore

2024-02-15 Thread dn via Python-list
On 16/02/24 13:29, Skip Montanaro via Python-list wrote: Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, but if the pos

Re: test-ignore

2024-02-15 Thread Skip Montanaro via Python-list
> > > Test post to see if my Newsgroup post program is working. > > Aim your test messages at alt.test, please. > I agree that basic Usenet connectivity messages should go to alt.test. It's not clear from the original post, but if the poster's aim was to see if posts

Re: test-ignore

2024-02-15 Thread Tony Oliver via Python-list
On Thursday 15 February 2024 at 21:16:22 UTC, E.D.G. wrote: > Test - ignore February 15, 2024 > > Test post to see if my Newsgroup post program is working. Aim your test messages at alt.test, please. -- https://mail.python.org/mailman/listinfo/python-list

test ignore

2024-02-15 Thread Science Researcher via Python-list
This is a test message - just ignore it -- https://mail.python.org/mailman/listinfo/python-list

Re: test ignore

2024-02-15 Thread Science Researcher via Python-list
"Science Researcher" wrote in message news:fh2dnwrca5oedvp4nz2dnzfqnpwdn...@earthlink.com... This is a test message - just ignore it That post worked as intended. -- https://mail.python.org/mailman/listinfo/python-list

test-ignore

2024-02-15 Thread E.D.G. via Python-list
Test - ignore February 15, 2024 Test post to see if my Newsgroup post program is working. -- https://mail.python.org/mailman/listinfo/python-list

Re: What is this TEST BANK stuff ?

2023-07-06 Thread Chris Angelico via Python-list
On Fri, 7 Jul 2023 at 03:33, neopolitan via Python-list wrote: > > On 6/21/23 08:37, Dan Kolis wrote: > > Why do we tolerate this spam ? > > > > this seems most likely a way to inject viruses into people's workflow. > > > > That wiped out usenet. Ahh without an explaination; ( and it woudl have to

Re: What is this TEST BANK stuff ?

2023-07-06 Thread a a via Python-list
On Wednesday, 21 June 2023 at 15:38:00 UTC+2, Dan Kolis wrote: > Why do we tolerate this spam ? > > this seems most likely a way to inject viruses into people's workflow. > > That wiped out usenet. Ahh without an explaination; ( and it woudl have to be > a good one ); what is the purpsoe of th

Re: What is this TEST BANK stuff ?

2023-07-06 Thread neopolitan via Python-list
On 6/21/23 08:37, Dan Kolis wrote: Why do we tolerate this spam ? this seems most likely a way to inject viruses into people's workflow. That wiped out usenet. Ahh without an explaination; ( and it woudl have to be a good one ); what is the purpsoe of this, why is it here ? Can it be eliminat

Re: What is this TEST BANK stuff ?

2023-06-21 Thread Grant Edwards via Python-list
On 2023-06-21, Chris Angelico via Python-list wrote: > On Thu, 22 Jun 2023 at 02:54, Dan Kolis via Python-list > wrote: >> >> Why do we tolerate this spam ? >> >> this seems most likely a way to inject viruses into people's workflow. >> >> That wiped out usenet. Ahh without an explaination; ( and

Re: What is this TEST BANK stuff ?

2023-06-21 Thread Chris Angelico via Python-list
On Thu, 22 Jun 2023 at 02:54, Dan Kolis via Python-list wrote: > > Why do we tolerate this spam ? > > this seems most likely a way to inject viruses into people's workflow. > > That wiped out usenet. Ahh without an explaination; ( and it woudl have to be > a good one ); what is the purpsoe of thi

What is this TEST BANK stuff ?

2023-06-21 Thread Dan Kolis via Python-list
Why do we tolerate this spam ? this seems most likely a way to inject viruses into people's workflow. That wiped out usenet. Ahh without an explaination; ( and it woudl have to be a good one ); what is the purpsoe of this, why is it here ? Can it be eliminated ? Regards, Dan -- https://mail.p

Re: test

2023-03-07 Thread dn via Python-list
On 08/03/2023 11.48, Jim Byrnes wrote: haven't received anything from the list for quite awhile. Got no response when I tried to contact the administrator. ACK -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

test

2023-03-07 Thread Jim Byrnes
haven't received anything from the list for quite awhile. Got no response when I tried to contact the administrator. -- https://mail.python.org/mailman/listinfo/python-list

Re: Tkinter module test: widget class not inserted in application frame

2022-06-18 Thread Rich Shepard
On Sat, 18 Jun 2022, Peter J. Holzer wrote: There is a comma (U+002C) here ... And a dot (U+002E) here. That was a typo when I wrote the message. And I usually add a space after commas and surrounding equal signs, all for easier reading. Thank you, Rich -- https://mail.python.org/mailman/lis

Re: Tkinter module test: widget class not inserted in application frame

2022-06-18 Thread Peter J. Holzer
On 2022-06-17 19:47:38 -0700, Rich Shepard wrote: > On Fri, 17 Jun 2022, Dennis Lee Bieber wrote: > > > > ContactNameInput, 'lname', > > > ContactNameInput, 'fname', > > This works if a tk.labelframe is where the widget is placed. In my case, as > MRAB taught me, the prope

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, Dennis Lee Bieber wrote: ContactNameInput, 'lname', ContactNameInput, 'fname', This works if a tk.labelframe is where the widget is placed. In my case, as MRAB taught me, the proper syntax is self,'lname'... self.'fname'... Thanks,

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Dennis Lee Bieber
On Fri, 17 Jun 2022 09:19:59 -0700 (PDT), Rich Shepard declaimed the following: >I'm not seeing the error source in a small tkinter module I'm testing. > >The module code: >--- >import tkinter as tk >from tkinter import ttk > >import common_classes as cc > >class ConactNameInput(tk.Frame)

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, MRAB wrote: This: self.inputs['Last name'] = cc.LabelInput( ContactNameInput, 'lname', input_class = ttk.Entry, input_var = tk.StringVar() ) should be this: self.inputs['Last name'] = cc.LabelInput(

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB
On 2022-06-17 18:06, Rich Shepard wrote: On Fri, 17 Jun 2022, MRAB wrote: You haven't shown the code for common_classes.LabelInput, but I'm guessing that the first argument should be the parent. [snip] You're passing in the _class_ ConactNameInput, but I'm guessing that it should be an _ins

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
On Fri, 17 Jun 2022, MRAB wrote: You haven't shown the code for common_classes.LabelInput, but I'm guessing that the first argument should be the parent. Here's the LabelInput class: class LabelInput(tk.Frame): """ A widget containing a label and input together. """ def __init__(self,

Re: Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread MRAB
On 2022-06-17 17:19, Rich Shepard wrote: I'm not seeing the error source in a small tkinter module I'm testing. The module code: --- import tkinter as tk from tkinter import ttk import common_classes as cc class ConactNameInput(tk.Frame): def __init__(self, parent, *args, **kwarg

Tkinter module test: widget class not inserted in application frame

2022-06-17 Thread Rich Shepard
I'm not seeing the error source in a small tkinter module I'm testing. The module code: --- import tkinter as tk from tkinter import ttk import common_classes as cc class ConactNameInput(tk.Frame): def __init__(self, parent, *args, **kwargs): super().__init__(parent, *args,

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
Am 08.06.22 um 19:57 schrieb De ongekruisigde: On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: On 2022-06-09 at 04:15:46 +1000, Chris Angelico wrote: If you insist: >>> s = 'nm-iodine:x:996:57::/var/empty:/run/current-system/sw/bin/nologin'

Re: How to test characters of a string

2022-06-09 Thread Christian Gollwitzer
Am 09.06.22 um 07:50 schrieb Dave: Hi, I’ve found you also need to take care of multiple disk CD releases. These have a format of “1-01 Track Name” “2-02 Trackl Name" Meaning Disk 1 Track1, Disk 2, Track 2. Also A and B Sides (from Vinyl LPs) “A1-Track Name” “B2-Track Name” Side A, Track

Re: How to test characters of a string

2022-06-09 Thread Avi Gross via Python-list
2022 2:50 am Subject: Re: How to test characters of a string Hi, I’ve found you also need to take care of multiple disk CD releases. These have a format of “1-01 Track Name” “2-02  Trackl Name" Meaning Disk 1 Track1, Disk 2, Track 2. Also A and B Sides (from Vinyl LPs) “A1-Track Name” “B

Re: How to test characters of a string

2022-06-08 Thread Dave
Hi, I’ve found you also need to take care of multiple disk CD releases. These have a format of “1-01 Track Name” “2-02 Trackl Name" Meaning Disk 1 Track1, Disk 2, Track 2. Also A and B Sides (from Vinyl LPs) “A1-Track Name” “B2-Track Name” Side A, Track 1, etc. Cheers Dave > On 8 Jun 202

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2022-06-09 at 04:15:46 +1000, > Chris Angelico wrote: > >> On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote: >> > >> > On 2022-06-09 at 03:18:56 +1000, >> > Chris Angelico wr

Re: How to test characters of a string

2022-06-08 Thread Dennis Lee Bieber
On Wed, 8 Jun 2022 01:53:26 + (UTC), Avi Gross declaimed the following: > >So is it necessary to insist on an exact pattern of two digits followed by a >space?  > > >That would fail on "44 Minutes", "40 Oz. Dream", "50 Mission Cap", "50 Ways to >Say Goodbye", "99 Ways to Die"  > >It looks

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, 2qdxy4rzwzuui...@potatochowder.com <2qdxy4rzwzuui...@potatochowder.com> wrote: > On 2022-06-08 at 08:07:40 -, > De ongekruisigde wrote: > >> Depending on the problem a regular expression may be the much simpler >> solution. I love them for e.g. text parsing and use them all the

Re: How to test characters of a string

2022-06-08 Thread 2QdxY4RzWzUUiLuE
On 2022-06-09 at 04:15:46 +1000, Chris Angelico wrote: > On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > On 2022-06-09 at 03:18:56 +1000, > > Chris Angelico wrote: > > > > > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > > > > >

Re: How to test characters of a string

2022-06-08 Thread Chris Angelico
On Thu, 9 Jun 2022 at 04:14, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2022-06-09 at 03:18:56 +1000, > Chris Angelico wrote: > > > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > > > On 2022-06-08 at 08:07:40 -, > > > De ongekruisigde wrote: > > > > >

Re: How to test characters of a string

2022-06-08 Thread 2QdxY4RzWzUUiLuE
On 2022-06-09 at 03:18:56 +1000, Chris Angelico wrote: > On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > > > On 2022-06-08 at 08:07:40 -, > > De ongekruisigde wrote: > > > > > Depending on the problem a regular expression may be the much simpler > > > solution. I

Re: How to test characters of a string

2022-06-08 Thread Chris Angelico
On Thu, 9 Jun 2022 at 03:15, <2qdxy4rzwzuui...@potatochowder.com> wrote: > > On 2022-06-08 at 08:07:40 -, > De ongekruisigde wrote: > > > Depending on the problem a regular expression may be the much simpler > > solution. I love them for e.g. text parsing and use them all the time. > > Unrival

Re: How to test characters of a string

2022-06-08 Thread 2QdxY4RzWzUUiLuE
On 2022-06-08 at 08:07:40 -, De ongekruisigde wrote: > Depending on the problem a regular expression may be the much simpler > solution. I love them for e.g. text parsing and use them all the time. > Unrivaled when e.g. parts of text have to be extracted, e.g. from lines > like these: > >

Re: How to test characters of a string

2022-06-08 Thread Barry Scott
> > >> On 8 Jun 2022, at 00:07, MRAB wrote: >> >> On 2022-06-07 21:23, Dave wrote: >>> Thanks a lot for this! isDigit was the method I was looking for and >>> couldn’t find. >>> I have another problem related to this, the following code

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, Christian Gollwitzer wrote: > Am 07.06.22 um 23:01 schrieb Christian Gollwitzer: > >>> In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket' >>> > > that RE does match what you intended to do, but not exactly what you > wrote in the OP. that would be '^\d\d.' start with exactly two

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, Dave wrote: > I hate regEx and avoid it whenever possible, I’ve never found something that > was impossible to do without it. I love regular expressions and use them where appropriate. Saves tons of code and is often much more readable than the pages of code required to do the sam

Re: How to test characters of a string

2022-06-08 Thread De ongekruisigde
On 2022-06-08, dn wrote: > On 08/06/2022 10.18, De ongekruisigde wrote: >> On 2022-06-08, Christian Gollwitzer wrote: >>> Am 07.06.22 um 21:56 schrieb Dave: It depends on the language I’m using, in Objective C, I’d use isNumeric, just wanted to know what the equivalent is in Python. >>

Re: How to test characters of a string

2022-06-07 Thread Avi Gross via Python-list
Amazing how some people bring out the heavy artillery, first! LOL! If the question was how to remove any initial digits and perhaps whitespace in a string, it is fairly easy to do without any functions to test if there are digits before the title. I mean look at initial characters and move

Re: How to test characters of a string

2022-06-07 Thread MRAB
3 tags using eyed3, this part seems to work and I get expected values in this case myTitleName (Track name) is set to “Deadlock Holiday” and myCompareFileName is set to “01 Deadlock Holiday” (File Name with the Track number prepended). The is digit test works and myCompareFileName is set to “Deadlock Holiday”, so they should match, right? OT, but are you sure about that name? Isn't it "Dreadlock Holiday" (by 10cc)? [snip] -- https://mail.python.org/mailman/listinfo/python-list

Re: How to test characters of a string

2022-06-07 Thread Dave
I hate regEx and avoid it whenever possible, I’ve never found something that was impossible to do without it. > On 8 Jun 2022, at 00:49, dn wrote: > > On 08/06/2022 10.18, De ongekruisigde wrote: >> On 2022-06-08, Christian Gollwitzer wrote: >>> Am 07.06.22 um 21:56 schrieb Dave: It depen

Re: How to test characters of a string

2022-06-07 Thread dn
On 08/06/2022 10.18, De ongekruisigde wrote: > On 2022-06-08, Christian Gollwitzer wrote: >> Am 07.06.22 um 21:56 schrieb Dave: >>> It depends on the language I’m using, in Objective C, I’d use isNumeric, >>> just wanted to know what the equivalent is in Python. >>> >> >> Your problem is also a t

Re: How to test characters of a string

2022-06-07 Thread Dave
rotfl! Nice one! > On 8 Jun 2022, at 00:24, 2qdxy4rzwzuui...@potatochowder.com wrote: > > On 2022-06-07 at 23:07:42 +0100, > Regarding "Re: How to test characters of a string," > MRAB wrote: > >> On 2022-06-07 21:23, Dave wrote: >>> Thanks a

Re: How to test characters of a string

2022-06-07 Thread Dave
t;> I have another problem related to this, the following code uses the code you >> just sent. I am getting a files ID3 tags using eyed3, this part seems to >> work and I get expected values in this case myTitleName (Track name) is set >> to “Deadlock Holiday” and myCompareFil

Re: How to test characters of a string

2022-06-07 Thread dn
It depends on the language I’m using, in Objective C, I’d use isNumeric, just wanted to know what the equivalent is in Python. If you know the answer why don’t you just tell me and if you don’t, don’t post! >>> >>> People ask home work questions here and we try to teach

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-08, Christian Gollwitzer wrote: > Am 07.06.22 um 21:56 schrieb Dave: >> It depends on the language I’m using, in Objective C, I’d use isNumeric, >> just wanted to know what the equivalent is in Python. >> > > Your problem is also a typical case for regular expressions. You can > crea

Re: How to test characters of a string

2022-06-07 Thread Christian Gollwitzer
Am 07.06.22 um 23:01 schrieb Christian Gollwitzer: In [3]: re.sub(r'^\d+\s*', '', s) Out[3]: 'Trinket' that RE does match what you intended to do, but not exactly what you wrote in the OP. that would be '^\d\d.' start with exactly two digits followed by any character. Christian -

Re: How to test characters of a string

2022-06-07 Thread Christian Gollwitzer
Am 07.06.22 um 21:56 schrieb Dave: It depends on the language I’m using, in Objective C, I’d use isNumeric, just wanted to know what the equivalent is in Python. Your problem is also a typical case for regular expressions. You can create an expression for "starts with any number of digits pl

Re: How to test characters of a string

2022-06-07 Thread 2QdxY4RzWzUUiLuE
On 2022-06-07 at 23:07:42 +0100, Regarding "Re: How to test characters of a string," MRAB wrote: > On 2022-06-07 21:23, Dave wrote: > > Thanks a lot for this! isDigit was the method I was looking for and > > couldn’t find. > > > > I have another problem rel

Re: How to test characters of a string

2022-06-07 Thread MRAB
values in this case myTitleName (Track name) is set to “Deadlock Holiday” and myCompareFileName is set to “01 Deadlock Holiday” (File Name with the Track number prepended). The is digit test works and myCompareFileName is set to “Deadlock Holiday”, so they should match, right? OT, but are you

Re: How to test characters of a string

2022-06-07 Thread 2QdxY4RzWzUUiLuE
On 2022-06-08 at 07:29:03 +1000, Chris Angelico wrote: > On Wed, 8 Jun 2022 at 07:24, Barry wrote: > > > > > > > > > On 7 Jun 2022, at 22:04, Dave wrote: > > > > > > It depends on the language I’m using, in Objective C, I’d use isNumeric, > > > just wanted to know what the equivalent is in Py

Re: How to test characters of a string

2022-06-07 Thread Dave
A, ok will do, was just trying to be a brief as possible, will post more fully in future. > On 7 Jun 2022, at 23:29, Chris Angelico wrote: > > On Wed, 8 Jun 2022 at 07:24, Barry wrote: >> >> >> >>> On 7 Jun 2022, at 22:04, Dave wrote: >>> >>> It depends on the language I’m using, in

Re: How to test characters of a string

2022-06-07 Thread Chris Angelico
On Wed, 8 Jun 2022 at 07:24, Barry wrote: > > > > > On 7 Jun 2022, at 22:04, Dave wrote: > > > > It depends on the language I’m using, in Objective C, I’d use isNumeric, > > just wanted to know what the equivalent is in Python. > > > > If you know the answer why don’t you just tell me and if yo

Re: How to test characters of a string

2022-06-07 Thread Barry
t;> Dave wrote: >>> >>> I’m new to Python and have a simple problem that I can’t seem to find >>> the answer. >> >>> I want to test the first two characters of a string to check if the >>> are numeric (00 to 99) and if so remove the fist th

Re: How to test characters of a string

2022-06-07 Thread Dave
>>> I have another problem related to this, the following code uses the code >>> you just sent. I am getting a files ID3 tags using eyed3, this part seems >>> to work and I get expected values in this case myTitleName (Track name) is >>> set to “Deadlock Holid

Re: How to test characters of a string

2022-06-07 Thread Dave
to this, the following code uses the code you >> just sent. I am getting a files ID3 tags using eyed3, this part seems to >> work and I get expected values in this case myTitleName (Track name) is set >> to “Deadlock Holiday” and myCompareFileName is set to “01 Deadlock Holiday” &g

Re: How to test characters of a string

2022-06-07 Thread Dave
022-06-07 at 21:35:43 +0200, > Dave wrote: > >> I’m new to Python and have a simple problem that I can’t seem to find >> the answer. > >> I want to test the first two characters of a string to check if the >> are numeric (00 to 99) and if so remove the fist thr

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
rk > and I get expected values in this case myTitleName (Track name) is set to > “Deadlock Holiday” and myCompareFileName is set to “01 Deadlock Holiday” > (File Name with the Track number prepended). The is digit test works and > myCompareFileName is set to “Deadlock Holiday”,

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-07, Stefan Ram wrote: > Dave writes: >>Example: if "05 Trinket" I want "Trinket" > > We're not supposed to write complete solutions, Okay, wasn't aware of this group policy; will keep it in mind. -- You're rewriting parts of Quake in *Python*? MUAHAHAHA -- https://mail.python.

Re: How to test characters of a string

2022-06-07 Thread 2QdxY4RzWzUUiLuE
On 2022-06-07 at 21:35:43 +0200, Dave wrote: > I’m new to Python and have a simple problem that I can’t seem to find > the answer. > I want to test the first two characters of a string to check if the > are numeric (00 to 99) and if so remove the fist three chars from the > str

Re: How to test characters of a string

2022-06-07 Thread Dave
(Track name) is set to “Deadlock Holiday” and myCompareFileName is set to “01 Deadlock Holiday” (File Name with the Track number prepended). The is digit test works and myCompareFileName is set to “Deadlock Holiday”, so they should match, right? However the if myCompareFileName != myTitleName

Re: How to test characters of a string

2022-06-07 Thread De ongekruisigde
On 2022-06-07, Dave wrote: > Hi, > > I’m new to Python and have a simple problem that I can’t seem to find the > answer. > > I want to test the first two characters of a string to check if the are > numeric (00 to 99) and if so remove the fist three chars from the string.

Re: How to test characters of a string

2022-06-07 Thread dn
On 08/06/2022 07.35, Dave wrote: > Hi, > > I’m new to Python and have a simple problem that I can’t seem to find the > answer. > I want to test the first two characters of a string to check if the are > numeric (00 to 99) and if so remove the fist three chars from the string.

How to test characters of a string

2022-06-07 Thread Dave
Hi, I’m new to Python and have a simple problem that I can’t seem to find the answer. I want to test the first two characters of a string to check if the are numeric (00 to 99) and if so remove the fist three chars from the string. Example: if “05 Trinket” I want “Trinket”, but “Trinket” I

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Tobiah
Why not just have scripts that echo out the various sets of test data you are interested in? That way, Popen would always be your interface and you wouldn't have to make two cases in the consumer script. In other words, make program that outputs test data just like your main data source pr

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 11/03/2022 om 10:11 schreef Roel Schroeven: Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following:    Job ID: 9431211    Cluster: curta    User/Group: build/staff    State: COMPLETED (exit code 0)    Nodes: 1    Cores per node: 8    CPU

Re: How to test input via subprocess.Popen with data from file

2022-03-11 Thread Roel Schroeven
Op 10/03/2022 om 13:16 schreef Loris Bennett: Hi, I have a command which produces output like the following: Job ID: 9431211 Cluster: curta User/Group: build/staff State: COMPLETED (exit code 0) Nodes: 1 Cores per node: 8 CPU Utilized: 01:30:53 CPU Efficiency: 83.63% of

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Dieter Maurer
Loris Bennett wrote at 2022-3-11 07:40 +0100: > ... I want to test the parsing ... >Sorry if I was unclear but my question is: > >Given that the return value from Popen is a Popen object and given that >the return value from reading a file is a single string or maybe a list &g

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Loris Bennett
ng subprocess.Popen and accessing the >>contents via Popen.stdout. However, for testing purposes I want to save >>various possible outputs of the command as text files and use those as >>inputs. > > What do you want to test? the parsing? the "popen" interaction? >

Re: How to test input via subprocess.Popen with data from file

2022-03-10 Thread Dieter Maurer
ses I want to save >various possible outputs of the command as text files and use those as >inputs. What do you want to test? the parsing? the "popen" interaction? You can separately test both tasks (I, at your place, would do this). For the parsing test, it is not relevant that th

How to test input via subprocess.Popen with data from file

2022-03-10 Thread Loris Bennett
format should I use to pass data to the actual parsing function? I could in both production and test convert the entire input to a string and pass the string to the parsing method. However, I could use something like test_input_01 = subprocess.Popen( ["cat test_input_0

Re: How to test for maildir 'folder' in Python?

2022-01-23 Thread Barry
ages. I'm trying to convert it from mbox to >>> maildir (as I now store my mail in maildir format). >>> >>> So I need to test whether a point I have reached in the hierarchy is a >>> maildir mailbox or not. Using mbox format it's easy because '

Re: How to test for maildir 'folder' in Python?

2022-01-23 Thread Chris Green
il in maildir format). > > > > So I need to test whether a point I have reached in the hierarchy is a > > maildir mailbox or not. Using mbox format it's easy because 'folders' > > are directories and mailboxes are files. However with maildir the > > &

Re: How to test for maildir 'folder' in Python?

2022-01-23 Thread Chris Green
Cameron Simpson wrote: > On 22Jan2022 21:26, Chris Green wrote: > >So I need to test whether a point I have reached in the hierarchy is a > >maildir mailbox or not. Using mbox format it's easy because 'folders' > >are directories and mailboxes are files.

Re: How to test for maildir 'folder' in Python?

2022-01-23 Thread Barry Scott
> On 22 Jan 2022, at 21:26, Chris Green wrote: > > I have a script that walks a quite deep tree of mail messages to find > and archive old messages. I'm trying to convert it from mbox to > maildir (as I now store my mail in maildir format). > > So I need to t

Re: How to test for maildir 'folder' in Python?

2022-01-22 Thread Cameron Simpson
On 22Jan2022 21:26, Chris Green wrote: >So I need to test whether a point I have reached in the hierarchy is a >maildir mailbox or not. Using mbox format it's easy because 'folders' >are directories and mailboxes are files. However with maildir the >'folders'

How to test for maildir 'folder' in Python?

2022-01-22 Thread Chris Green
I have a script that walks a quite deep tree of mail messages to find and archive old messages. I'm trying to convert it from mbox to maildir (as I now store my mail in maildir format). So I need to test whether a point I have reached in the hierarchy is a maildir mailbox or not. Using

Re: some problems for an introductory python test

2021-08-20 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle > declaimed the following: > > Giganews seems to have just vomited up three days worth of traffic... > >>Dennis Lee Bieber writes: >> >>> >>> Granted, the fact that the Amiga used a shared common address spa

Re: some problems for an introductory python test

2021-08-19 Thread Hope Rouselle
Chris Angelico writes: > On Tue, Aug 17, 2021 at 3:51 AM Hope Rouselle > wrote: >> >> Chris Angelico writes: >> >> Wow, I kinda feel the same as you here. I think this justifies >> >> perhaps >> >> using a hardware solution. (Crazy idea?! Lol.) >> > >> > uhhh Yes. Very crazy idea. Can

Re: some problems for an introductory python test

2021-08-16 Thread Dennis Lee Bieber
On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle declaimed the following: Giganews seems to have just vomited up three days worth of traffic... >Dennis Lee Bieber writes: > >> >> Granted, the fact that the Amiga used a shared common address space for >> all running applications ma

Re: some problems for an introductory python test

2021-08-16 Thread Abhiram R
site in Python! Happy to provide more tips wrt this if required. Regards Abhi R <http://abhiramr.com> On Tue, Aug 10, 2021 at 2:56 AM Hope Rouselle wrote: > I'm looking for questions to put on a test for students who never had > any experience with programming, but have l

Re: some problems for an introductory python test

2021-08-16 Thread Chris Angelico
On Tue, Aug 17, 2021 at 3:51 AM Hope Rouselle wrote: > > Chris Angelico writes: > >> Wow, I kinda feel the same as you here. I think this justifies perhaps > >> using a hardware solution. (Crazy idea?! Lol.) > > > > uhhh Yes. Very crazy idea. Can't imagine why anyone would ever > > thin

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Grant Edwards writes: > On 2021-08-12, Hope Rouselle wrote: > >>> OS/2 had all kinds of amazing features (for its time). [...] Plus, >>> it had this fancy concept of "extended attributes"; on older >>> systems (like MS-DOS's "FAT" family), a file might be Read-Only, >>> Hidden, a System file, or

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Hope Rouselle writes: [...] >> Granted you may have to restrict some features if [...] > > To let students use the entire language feels a bit weird in the sense > that the group goes in so many different directions. It definitely put > teachers in a position they have to be --- I don't know th

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Chris Angelico writes: > On Fri, Aug 13, 2021 at 2:15 AM Hope Rouselle wrote: >> >> Chris Angelico writes: >> >> > History lesson! >> > >> > Once upon a time, IBM and Microsoft looked at what Intel was >> > producing, and went, hey, we need to design an operating system that >> > can take advan

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Wed, 11 Aug 2021 09:27:38 -0300, Hope Rouselle > declaimed the following: >> >>I wouldn't. This is all Python-stuff. The course chooses a language >>like Python, but it is not trying to teach Python --- it is trying to >>teach computer programming, that is, strat

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Chris Angelico writes: > On Thu, Aug 12, 2021 at 9:23 AM Dennis Lee Bieber > wrote: [...] >> I was spoiled by the Amiga variant of REXX. Most current >> implementations (well, Regina is the only one I've looked at) can just pass >> command to the default shell. The Amiga version took

Re: some problems for an introductory python test

2021-08-16 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Thu, 12 Aug 2021 06:15:28 +1000, Chris Angelico > declaimed the following: > >>The default command interpreter and shell on OS/2 was fairly primitive >>by today's standards, and was highly compatible with the MS-DOS one, >>but it also had the ability to run REXX sc

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 5:52 am, Grant Edwards wrote: I think what he's talking about is allowing the user to attach arbitrary _metadata_ to the file ... IOW, something similar to the > "resource fork" that MacOS used to have. The resource fork was used for more than just metadata, it was often the entire

Re: some problems for an introductory python test

2021-08-12 Thread Greg Ewing
On 13/08/21 11:42 am, Cameron Simpson wrote: 2: It took me a while to see, but this is a type annotiation. Interestingly, it seems to be parsed as a form of assignment with a missing RHS. >>> from ast import parse, dump >>> dump(parse("if0: print('yes!')")) "Module(body=[AnnAssign(target=Name(

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 12Aug2021 12:09, Hope Rouselle wrote: >Chris Angelico writes: >> [...] Plus, it had this fancy >> concept of "extended attributes"; on older systems (like MS-DOS's >> "FAT" family), a file might be Read-Only, Hidden, a System file, or >> needing to be Archived, and that was it - but on HPFS, y

Re: some problems for an introductory python test

2021-08-12 Thread Cameron Simpson
On 11Aug2021 09:11, Hope Rouselle wrote: >Greg Ewing writes: >> That may not be doing what you think it's doing. Consider also >> > if0: print('yes!') >> yes! > >So, yes, that's puzzling. > 0 == False >True if0: print("yes") >yes if(0): print("yes") > > >What's going on th

Re: some problems for an introductory python test

2021-08-12 Thread Dennis Lee Bieber
On Fri, 13 Aug 2021 04:41:42 +1000, Chris Angelico declaimed the following: >Yeah. It was a strange choice by today's standards, but back then, >most of my GUI programs were written in REXX. > >https://en.wikipedia.org/wiki/VX-REXX >http://www.edm2.com/0206/vrexx.html > There was a librar

Re: some problems for an introductory python test

2021-08-12 Thread Grant Edwards
On 2021-08-12, MRAB wrote: > >> Windows never had filesystems that supported metadata like OS/2 and >> MacOS did. The registry was an ugly hack that attempted (very poorly) >> to make up for that lack of metadata. >> > FYI, NTFS does support Alternate Data Streams. That is interesting -- and it

  1   2   3   4   5   6   7   8   9   10   >