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]
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 understands the time
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
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.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
On Sep 24, 10:58 pm, Dave Angel da...@ieee.org 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
On Sep 24, 11:10 pm, flebber flebber.c...@gmail.com wrote:
On Sep 24, 10:58 pm, Dave Angel da...@ieee.org 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
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 you
flebber wrote:
On Sep 24, 11:10 pm, flebber flebber.c...@gmail.com wrote:
On Sep 24, 10:58 pm, Dave Angel da...@ieee.org 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
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
On Sep 24, 7:49 am, flebber flebber.c...@gmail.com wrote:
On Sep 24, 11:10 pm, flebber flebber.c...@gmail.com wrote:
On Sep 24, 10:58 pm, Dave Angel da...@ieee.org 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
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]
12 matches
Mail list logo