Re: [Tutor] Variable change within library depending on user input.

2019-03-04 Thread Peter Otten
Harry Oneill wrote: > Hey there everybody hope your doing great. > > I was here a few months ago and got pointed in the right direction very > kindly by one of the tutors. Im a little stuck again now and have been > researching for a while and can't come up with a solution to my problem. > > The

[Tutor] Python Regular Expressions (Re.sub) Function

2019-03-04 Thread Edward Kanja
Hi there, Hope this finds you well, I'm working on a simple project to analyse data using regular expressions. I have successfully worked on a regular expression pattern that extracts data from my txt file. Unfortunately after i extract the data my output has too much of square brackets and by so d

Re: [Tutor] Python Regular Expressions (Re.sub) Function

2019-03-04 Thread Steven D'Aprano
Hi Edward, and welcome. Please remember that we're volunteers, doing this for free. Unless your problem is really interesting, you're not likely to get people volunteering to spend a long time slogging through multiple attachments, screenshots, at least five seperate attempts, etc. By the way,

Re: [Tutor] Python Regular Expressions (Re.sub) Function

2019-03-04 Thread Alan Gauld via Tutor
On 04/03/2019 08:04, Edward Kanja wrote: > ... Unfortunately after i extract the data > my output has too much of square brackets and by so doing the output cant > be well exported in a csv file. I can't see the data so can't be definitive but the number of square brackets shouldn't affect a CSV

[Tutor] My problem in simple terms

2019-03-04 Thread Edward Kanja
Hi there , Earlier i had sent an email on how to use re.sub function to eliminate square brackets. I have simplified the statements. Attached txt file named unon.Txt has the data im extracting from. The file named code.txt has the codes I'm using to extract the data.The regular expression works fin

Re: [Tutor] My problem in simple terms

2019-03-04 Thread Alan Gauld via Tutor
On 04/03/2019 11:44, Edward Kanja wrote: > Hi there , > Earlier i had sent an email on how to use re.sub function to eliminate > square brackets. I have simplified the statements. Attached txt file named > unon.Txt has the data im extracting from. Thankyou, that's much better. Although the code i

Re: [Tutor] My problem in simple terms

2019-03-04 Thread Peter Otten
Edward Kanja wrote: > Hi there , > Earlier i had sent an email on how to use re.sub function to eliminate > square brackets. I have simplified the statements. Attached txt file named > unon.Txt has the data im extracting from. The file named code.txt has the > codes I'm using to extract the data.T

[Tutor] how to get the weeks of a month

2019-03-04 Thread john fabiani
Hi everyone, I'm not exactly a newbie but I can't seem to solve this problem. I need to print out the weeks of the month - given any month and any year. For example this month would have: 3/1/2019 - 3/3/2019   # notice that this a short week 3/4/2019 - 3/10/2019 3/11/2019 - 3/17/2019 3/18/2019

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Mark Lawrence
On 04/03/2019 18:54, john fabiani wrote: Hi everyone, I'm not exactly a newbie but I can't seem to solve this problem. I need to print out the weeks of the month - given any month and any year. For example this month would have: 3/1/2019 - 3/3/2019   # notice that this a short week 3/4/2019 -

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Alan Gauld via Tutor
On 04/03/2019 18:54, john fabiani wrote: > I need to print out the weeks of the month - given any month and any year. > I'm not totally clear how you define a week. In your example the first week starts on Friday and ends on Sunday. Subsequent weeks start on Monday and run to Sunday. So, is a

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread David Rock
> On Mar 4, 2019, at 13:19, Alan Gauld via Tutor wrote: > > On 04/03/2019 18:54, john fabiani wrote: > >> I need to print out the weeks of the month - given any month and any year. > > I'm not totally clear how you define a week. > > EDIT: OK I see the comment at the end now. > >> For exampl

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread john fabiani
On 3/4/19 1:15 PM, David Rock wrote: On Mar 4, 2019, at 13:19, Alan Gauld via Tutor wrote: On 04/03/2019 18:54, john fabiani wrote: I need to print out the weeks of the month - given any month and any year. I'm not totally clear how you define a week. EDIT: OK I see the comment at the end

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread David Rock
> On Mar 4, 2019, at 15:28, john fabiani wrote: > > I knew there was a simple why to get it done! But where is it off my a day? > comparing $ cal March 2019 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

Re: [Tutor] schedulers

2019-03-04 Thread Albert-Jan Roskam
On 28 Feb 2019 15:45, nathan tech wrote: Hi there, I recently started working on a backup program, and the one big feature everyone wants in backup programs is the ability to schedule backups, right? but I'm thinking, should I do this? ==》 this might interest you: https://docs.python.org/3/

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread john fabiani
On 3/4/19 1:35 PM, David Rock wrote: On Mar 4, 2019, at 15:28, john fabiani wrote: I knew there was a simple why to get it done! But where is it off my a day? comparing $ cal March 2019 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Ben Finney
john fabiani writes: > My understanding is - a week starts on Monday and ends on Sunday. That's behaviour specific to a timezone. Which one are you using, and does your program know to consult the timezone data for when a week begins and ends? https://www.timeanddate.com/calendar/days/> --

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread David Rock
> On Mar 4, 2019, at 16:30, Ben Finney wrote: > > john fabiani writes: > >> My understanding is - a week starts on Monday and ends on Sunday. > > That's behaviour specific to a timezone. Which one are you using, and > does your program know to consult the timezone data for when a week > begin

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Alan Gauld via Tutor
On 04/03/2019 22:30, Ben Finney wrote: > john fabiani writes: > >> My understanding is - a week starts on Monday and ends on Sunday. > > That's behaviour specific to a timezone. Which one are you using, and > does your program know to consult the timezone data for when a week > begins and ends?

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread john fabiani
On 3/4/19 2:47 PM, David Rock wrote: On Mar 4, 2019, at 16:30, Ben Finney wrote: john fabiani writes: My understanding is - a week starts on Monday and ends on Sunday. That's behaviour specific to a timezone. Which one are you using, and does your program know to consult the timezone data

Re: [Tutor] how to get the weeks of a month

2019-03-04 Thread Mark Lawrence
On 04/03/2019 22:12, john fabiani wrote: On 3/4/19 1:35 PM, David Rock wrote: On Mar 4, 2019, at 15:28, john fabiani wrote: I knew there was a simple why to get it done!  But where is it off my a day? comparing $ cal   March 2019 Su Mo Tu We Th Fr Sa 1  2   3  4  5