Using Python on Aptana


#1



I am trying to use a program called Aptana to do some programming in Python. I am trying to do a simple import and keep getting problems


I get this error from the code below

Traceback (most recent call last):
File "C:\Users\Trevor Dammon\Documents\Aptana Studio 3 Workspace\new\new_temp__init__.py", line 6, in
print today.day
NameError: name 'today' is not defined


I really don't know what's going on please help!


from datetime import date


print today.day


#2

The code needs to be:

import datetime
print datetime.date.today()

#3

Can you explain why I no longer need to use

frome datetime import datetime


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.