What version of IronPython are you using? This works for me w/ IronPython v1.1 and the 2.4 libs or the 2.5 libs when running with the -X:Python25 command line option.
W/ v1.1 w/o -X:Python25 I get: SyntaxError: future feature is not defined: with_statement (F:\Product\Merlin\External\Languages\IronPython20\25\Lib\calendar.py, line 8) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of edfialk Sent: Monday, April 23, 2007 1:32 PM To: [email protected] Subject: [IronPython] script for seconds in given month, year Hello, I'm looking for a way to provide month and year, and return the number of seconds in that month. My range will be roughly from 01/01/1960 to 12/31/2000 for now. I originally thought we would be working with regular Python and asked in the Python group, to which I got a great, working Python script: import calendar def seconds_in_month(month, year): nomatter, daysinmonth = calendar.monthrange(year, month) return daysinmonth * 24 * 60 * 60 Unfortunately, in IronPython the calendar module does not import: SyntaxError: unexpected token TimeEncoding (c:\Python25\Lib \calendar.py, line 510) So, does anyone happen to know of a script that could perform this in IronPython? Any help would be greatly appreciated. Thanks! -Ed _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
