flebber.c...@gmail.com wrote:
I don't think I am using re.compile properly, but thought as this
would make my output an object it would be better for later, is that
correct?
#Obtain date
def ObtainDate(date):
date = raw_input("Type Date dd/mm/year: ")
re.split('[/]+', date)
date
year = date[-1
I don't think I am using re.compile properly, but thought as this would
make my output an object it would be better for later, is that correct?
#Obtain date
def ObtainDate(date):
date = raw_input("Type Date dd/mm/year: ")
re.split('[/]+', date)
date
year = date[-1]
month = date[1]
day = date[0]
On Sep 24, 7:49 am, flebber wrote:
> On Sep 24, 11:10 pm, flebber wrote:
>
>
>
> > On Sep 24, 10:58 pm, Dave Angel wrote:
>
> > > flebber.c...@gmail.com wrote:
> > > > I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
> > > > class or instructor, I am learning this myself. I ha
Okay, thanks for the advice that sounds a good place to start. I used %2.os
was an attempt to define width and precision to stop typo errors eg the
user accidentally inputing 101/09/2009 or similar error. So that the
__/__/ was adhered to.
I will go back to the start get the basics happ
flebber wrote:
On Sep 24, 11:10 pm, flebber wrote:
On Sep 24, 10:58 pm, Dave Angel wrote:
flebber.c...@gmail.com wrote:
I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
class or instructor, I am learning this myself. I have Hetlands book
"Beginning Python
Surely getting it tottally mixed up
from datetime import date
def ObtainDate(params):
date = raw_input("Type Date dd/mm/year: %2.0r%2.0r/%2.0r%2.0r/%4.0r
%4.0r%4.0r%4.0r")
print date.datetime(year-month-day)
By setting "date = raw_input(...)", you mask the datetime.date
object preventing yo
On Sep 24, 11:10 pm, flebber wrote:
> On Sep 24, 10:58 pm, Dave Angel wrote:
>
>
>
> > flebber.c...@gmail.com wrote:
> > > I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
> > > class or instructor, I am learning this myself. I have Hetlands book
> > > "Beginning Python Novice
On Sep 24, 10:58 pm, Dave Angel wrote:
> flebber.c...@gmail.com wrote:
> > I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
> > class or instructor, I am learning this myself. I have Hetlands book
> > "Beginning Python Novice to Professional and online documentation
> > books so
flebber.c...@gmail.com wrote:
I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no
class or instructor, I am learning this myself. I have Hetlands book
"Beginning Python Novice to Professional and online documentation
books so Dive into Python, python.org etc.
Using the SPE edi
I am using python 2.6.2, I haven't updated to 3.0 yet. No I have no class
or instructor, I am learning this myself. I have Hetlands book "Beginning
Python Novice to Professional and online documentation books so Dive into
Python, python.org etc.
Using the SPE editor.
I have currently only
flebber wrote:
Sorry to ask a simple question but I am a little confused how to
combine the input function and the date time module.
Simply at the start of the program I want to prompt the user to enter
the date, desirably in the format dd/mm/year.
However I want to make sure that python underst
11 matches
Mail list logo