[issue1046] HTMLCalendar.formatyearpage not behaving as documented

2007-08-28 Thread inefab

New submission from inefab:

The function HTMLCalendar.formatyearpage in module calendar takes at
most 5 arguments (year, month, css, encoding) whereas documentation
(http://docs.python.org/lib/module-calendar.html) says it takes at most
6 (theyear, themonth[, width[, css[, encoding]]]). 

Also, the title tag in the head of the produced document with (year,
month, css) as arguments isn't properly closed ; the line is
Calendar for 2008Calendar for 2008

This happend with linux (debian sid), with Python 2.5.1

Note: I haven't tested if the encoding did what it should 

Joined files :
 - HTMLyearbug.py: reproduces the bug
 - 2008cal.html: the output produced by this file

--
components: Extension Modules
files: cal.py
messages: 55376
nosy: inefab
severity: normal
status: open
title: HTMLCalendar.formatyearpage not behaving as documented
type: behavior
versions: Python 2.5

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1046>
__#requires python 2.5

from calendar import HTMLCalendar as Cal

## head = open('head','r')
## foot = open('foot','r')

firstmonth = 1
lastmonth = 12
year = 2008

a = Cal(0)

## for month in xrange(firstmonth, lastmonth+1):
## if month < 10:
## out = open(str(year) + ' - 0' + str(month), 'w') #add a leading 0
## else:
## out = open(str(year) + ' - '  + str(month), 'w')

## out.write(a.formatmonth(year, month, 1))
## out.close()

out = open(str(year), 'w')
out.write(a.formatyearpage(year, 1, 3, 'cal.css'))
out.close()___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1046] HTMLCalendar.formatyearpage not behaving as documented

2007-08-28 Thread inefab

inefab added the comment:

uploaded 2008cal.html

__
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1046>
__
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>




Calendar for 2008


2008
January
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   


February
MonTueWedThuFriSatSun
123
45678910
11121314151617
18192021222324
2526272829  


March
MonTueWedThuFriSatSun
 12
3456789
10111213141516
17181920212223
24252627282930
31  


April
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
282930


May
MonTueWedThuFriSatSun
   1234
567891011
12131415161718
19202122232425
262728293031 


June
MonTueWedThuFriSatSun
  1
2345678
9101112131415
16171819202122
23242526272829
30  


July
MonTueWedThuFriSatSun
 123456
78910111213
14151617181920
21222324252627
28293031   


August
MonTueWedThuFriSatSun
123
45678910
11121314151617
18192021222324
25262728293031


September
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
2930 


October
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  


November
MonTueWedThuFriSatSun
 12
3456789
10111213141516
17181920212223
24252627282930


December
MonTueWedThuFriSatSun
1234567
891011121314
15161718192021
22232425262728
293031



___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com