/snap/core22/2411/usr/lib/python3.10/__pycache__
NameSizeModeActions
abc.cpython-310.pyc67510644editdlrm
aifc.cpython-310.pyc246850644editdlrm
antigravity.cpython-310.pyc8220644editdlrm
argparse.cpython-310.pyc635390644editdlrm
ast.cpython-310.pyc557390644editdlrm
asynchat.cpython-310.pyc70250644editdlrm
asyncore.cpython-310.pyc160020644editdlrm
base64.cpython-310.pyc171620644editdlrm
bdb.cpython-310.pyc258320644editdlrm
binhex.cpython-310.pyc128700644editdlrm
bisect.cpython-310.pyc25880644editdlrm
bz2.cpython-310.pyc108700644editdlrm
calendar.cpython-310.pyc263030644editdlrm
cgi.cpython-310.pyc267230644editdlrm
cgitb.cpython-310.pyc99980644editdlrm
chunk.cpython-310.pyc48600644editdlrm
cmd.cpython-310.pyc127070644editdlrm
code.cpython-310.pyc99570644editdlrm
codecs.cpython-310.pyc332190644editdlrm
codeop.cpython-310.pyc55950644editdlrm
colorsys.cpython-310.pyc32650644editdlrm
compileall.cpython-310.pyc127330644editdlrm
configparser.cpython-310.pyc454580644editdlrm
contextlib.cpython-310.pyc208950644editdlrm
contextvars.cpython-310.pyc2460644editdlrm
copy.cpython-310.pyc69960644editdlrm
copyreg.cpython-310.pyc46830644editdlrm
cProfile.cpython-310.pyc51130644editdlrm
crypt.cpython-310.pyc35500644editdlrm
csv.cpython-310.pyc117980644editdlrm
dataclasses.cpython-310.pyc265780644editdlrm
datetime.cpython-310.pyc565330644editdlrm
decimal.cpython-310.pyc3620644editdlrm
difflib.cpython-310.pyc589050644editdlrm
dis.cpython-310.pyc156560644editdlrm
doctest.cpython-310.pyc761750644editdlrm
enum.cpython-310.pyc260630644editdlrm
filecmp.cpython-310.pyc87490644editdlrm
fileinput.cpython-310.pyc140720644editdlrm
fnmatch.cpython-310.pyc42440644editdlrm
fractions.cpython-310.pyc186000644editdlrm
ftplib.cpython-310.pyc289770644editdlrm
functools.cpython-310.pyc283350644editdlrm
genericpath.cpython-310.pyc39070644editdlrm
getopt.cpython-310.pyc63390644editdlrm
getpass.cpython-310.pyc42100644editdlrm
gettext.cpython-310.pyc182210644editdlrm
glob.cpython-310.pyc58520644editdlrm
graphlib.cpython-310.pyc76160644editdlrm
gzip.cpython-310.pyc185460644editdlrm
hashlib.cpython-310.pyc68450644editdlrm
heapq.cpython-310.pyc138650644editdlrm
hmac.cpython-310.pyc69730644editdlrm
imaplib.cpython-310.pyc424320644editdlrm
imghdr.cpython-310.pyc39050644editdlrm
imp.cpython-310.pyc97860644editdlrm
inspect.cpython-310.pyc851530644editdlrm
io.cpython-310.pyc36630644editdlrm
ipaddress.cpython-310.pyc626700644editdlrm
keyword.cpython-310.pyc9270644editdlrm
linecache.cpython-310.pyc41420644editdlrm
locale.cpython-310.pyc461540644editdlrm
lzma.cpython-310.pyc121000644editdlrm
mailbox.cpython-310.pyc600910644editdlrm
mailcap.cpython-310.pyc73200644editdlrm
mimetypes.cpython-310.pyc176190644editdlrm
modulefinder.cpython-310.pyc161660644editdlrm
netrc.cpython-310.pyc39330644editdlrm
nntplib.cpython-310.pyc316230644editdlrm
ntpath.cpython-310.pyc147040644editdlrm
nturl2path.cpython-310.pyc17470644editdlrm
numbers.cpython-310.pyc118660644editdlrm
opcode.cpython-310.pyc54470644editdlrm
operator.cpython-310.pyc135080644editdlrm
optparse.cpython-310.pyc477540644editdlrm
os.cpython-310.pyc315990644editdlrm
pathlib.cpython-310.pyc420520644editdlrm
pdb.cpython-310.pyc474400644editdlrm
pickle.cpython-310.pyc468820644editdlrm
pickletools.cpython-310.pyc677600644editdlrm
pipes.cpython-310.pyc77690644editdlrm
pkgutil.cpython-310.pyc183610644editdlrm
platform.cpython-310.pyc274290644editdlrm
plistlib.cpython-310.pyc237650644editdlrm
poplib.cpython-310.pyc136700644editdlrm
posixpath.cpython-310.pyc105600644editdlrm
pprint.cpython-310.pyc178750644editdlrm
profile.cpython-310.pyc143910644editdlrm
pstats.cpython-310.pyc236210644editdlrm
pty.cpython-310.pyc41430644editdlrm
pyclbr.cpython-310.pyc97750644editdlrm
pydoc.cpython-310.pyc856450644editdlrm
py_compile.cpython-310.pyc73390644editdlrm
queue.cpython-310.pyc107920644editdlrm
quopri.cpython-310.pyc57940644editdlrm
random.cpython-310.pyc227480644editdlrm
re.cpython-310.pyc142270644editdlrm
reprlib.cpython-310.pyc52500644editdlrm
rlcompleter.cpython-310.pyc59540644editdlrm
runpy.cpython-310.pyc94110644editdlrm
sched.cpython-310.pyc61150644editdlrm
secrets.cpython-310.pyc21750644editdlrm
selectors.cpython-310.pyc171050644editdlrm
shelve.cpython-310.pyc94920644editdlrm
shlex.cpython-310.pyc77820644editdlrm
shutil.cpython-310.pyc385360644editdlrm
signal.cpython-310.pyc29350644editdlrm
site.cpython-310.pyc179220644editdlrm
sitecustomize.cpython-310.pyc2250644editdlrm
smtpd.cpython-310.pyc261470644editdlrm
smtplib.cpython-310.pyc357660644editdlrm
sndhdr.cpython-310.pyc69620644editdlrm
socket.cpython-310.pyc289630644editdlrm
socketserver.cpython-310.pyc253470644editdlrm
sre_compile.cpython-310.pyc151940644editdlrm
sre_constants.cpython-310.pyc63570644editdlrm
sre_parse.cpython-310.pyc217550644editdlrm
ssl.cpython-310.pyc452710644editdlrm
stat.cpython-310.pyc42730644editdlrm
statistics.cpython-310.pyc370510644editdlrm
string.cpython-310.pyc71020644editdlrm
stringprep.cpython-310.pyc170750644editdlrm
struct.cpython-310.pyc3070644editdlrm
subprocess.cpython-310.pyc447410644editdlrm
sunau.cpython-310.pyc164820644editdlrm
symtable.cpython-310.pyc128350644editdlrm
sysconfig.cpython-310.pyc181510644editdlrm
tabnanny.cpython-310.pyc69500644editdlrm
tarfile.cpython-310.pyc706740644editdlrm
telnetlib.cpython-310.pyc185060644editdlrm
tempfile.cpython-310.pyc273390644editdlrm
textwrap.cpython-310.pyc138120644editdlrm
this.cpython-310.pyc12640644editdlrm
threading.cpython-310.pyc449690644editdlrm
timeit.cpython-310.pyc117690644editdlrm
token.cpython-310.pyc27380644editdlrm
tokenize.cpython-310.pyc171940644editdlrm
trace.cpython-310.pyc198700644editdlrm
traceback.cpython-310.pyc217120644editdlrm
tracemalloc.cpython-310.pyc175250644editdlrm
tty.cpython-310.pyc10790644editdlrm
turtle.cpython-310.pyc1288570644editdlrm
types.cpython-310.pyc95250644editdlrm
typing.cpython-310.pyc852770644editdlrm
uu.cpython-310.pyc38670644editdlrm
uuid.cpython-310.pyc224980644editdlrm
warnings.cpython-310.pyc136460644editdlrm
wave.cpython-310.pyc175940644editdlrm
weakref.cpython-310.pyc203430644editdlrm
webbrowser.cpython-310.pyc170000644editdlrm
xdrlib.cpython-310.pyc78800644editdlrm
zipapp.cpython-310.pyc60130644editdlrm
zipfile.cpython-310.pyc618450644editdlrm
zipimport.cpython-310.pyc170330644editdlrm
_aix_support.cpython-310.pyc28790644editdlrm
_bootsubprocess.cpython-310.pyc22940644editdlrm
_collections_abc.cpython-310.pyc329250644editdlrm
_compat_pickle.cpython-310.pyc58720644editdlrm
_compression.cpython-310.pyc45120644editdlrm
_distutils_system_mod.cpython-310.pyc54220644editdlrm
_markupbase.cpython-310.pyc75720644editdlrm
_osx_support.cpython-310.pyc115350644editdlrm
_pydecimal.cpython-310.pyc1577360644editdlrm
_pyio.cpython-310.pyc736540644editdlrm
_py_abc.cpython-310.pyc46830644editdlrm
_sitebuiltins.cpython-310.pyc35470644editdlrm
_strptime.cpython-310.pyc159450644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-310.pyc353850644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-310.pyc353790644editdlrm
_threading_local.cpython-310.pyc65390644editdlrm
_weakrefset.cpython-310.pyc76080644editdlrm
__future__.cpython-310.pyc41310644editdlrm
__phello__.foo.cpython-310.pyc1300644editdlrm
Edit: /snap/core22/2411/usr/lib/python3.10/__pycache__/calendar.cpython-310.pyc (26303B)
o `wi_@sdZddlZddlZddlZddlmZgdZeZ GdddeZ GdddeZ d Z d Z gd ZGd d d ZGdddZedZedZedZedZed\ZZZZZZZddZddZddZddZ ddZ!dd Z"d!d"Z#Gd#d$d$e$Z%Gd%d&d&e%Z&Gd'd(d(e%Z'Gd)d*d*Z(Gd+d,d,e&Z)Gd-d.d.e'Z*e&Z+e+j,Z-d/d0Z.e+j/Z0e+j1Z1e+j2Z3e+j4Z5e+j6Z6e+j7Z8e+j9Z:e+j;Ze=e>fd3d4Z?e=e>fd5d6Z@d7ZAeBeAd d CZDd8d9ZEd:d;ZFeGd6 z_localized_month. rcCdS)Nr')xr'r'r(7sz_localized_month.cCr#r$formatr&rJr'r'r(r)9r*z_localized_month.__init__c0j|}t|trfdd|DS|jS)Ncg|]}|jqSr'rIr@fr,r'r(rB?z0_localized_month.__getitem__..)_months isinstanceslicerJr&rAfuncsr'r,r( __getitem__<   z_localized_month.__getitem__cCrE)N r'r,r'r'r(__len__Cz_localized_month.__len__N) r/r0r1rangerQinsertr)rVrYr'r'r'r(r94s  r9c@s6eZdZddedDZddZddZdd Zd S) _localized_daycCs g|] }tdd|djqSr:r;r?r'r'r(rBJrCz_localized_day.cCr#r$rIrKr'r'r(r)Lr*z_localized_day.__init__crL)NcrMr'rIrNr,r'r(rBRrPz._localized_day.__getitem__..)_daysrRrSrJrTr'r,r(rVOrWz_localized_day.__getitem__cCrENr^r'r,r'r'r(rYVrZz_localized_day.__len__N)r/r0r1r[r_r)rVrYr'r'r'r(r]Gs  r]z%Az%az%Bz%br^cCs$|ddko|ddkp|ddkS)z5Return True for leap years, False for non-leap years.rdr')yearr'r'r(rfs$rcCs@|d8}|d8}|d|d|d|d|d|dS)zFReturn number of leap years in range [y1, y2). Assume y1 <= y2.r4rarbrcr')y1y2r'r'r(rks0rcCs8tj|kr tjksnd|d}t|||S)zBReturn weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).irc)r<MINYEARMAXYEARr=r )rdr dayr'r'r(r ss r cCsPd|kr dkst|t|t||d}t||tko"t|}||fS)zQReturn weekday (0-6 ~ Mon-Sun) and number of days (28-31) for year, month.r4rD)rr mdaysFebruaryr)rdr day1ndaysr'r'r(r zs r cCst||tko t|Sr$)rjrkrrdr r'r'r( _monthlensrocCs |dkr |ddfS||dfS)Nr4rDr'rnr'r'r( _prevmonth  rpcCs |dkr |ddfS||dfS)NrDr4r'rnr'r'r( _nextmonthrqrrc@seZdZdZd#ddZddZddZeeeZd d Z d d Z d dZ ddZ ddZ ddZddZddZddZd$ddZd$ddZd$d d!Zd"S)%rzo Base calendar class. This class doesn't do any formatting. It simply provides data to subclasses. rcCr#r$rr&rr'r'r(r)r*zCalendar.__init__cCs |jdSr` _firstweekdayr,r'r'r(getfirstweekdayr*zCalendar.getfirstweekdaycCr#r$rurtr'r'r(rr*zCalendar.setfirstweekdayccs(t|j|jdD]}|dVq dS)zt Return an iterator for one week of weekday numbers starting with the configured first one. r^N)r[r)r&rAr'r'r( iterweekdayss zCalendar.iterweekdaysccs.|||D] \}}}t|||VqdS)z Return an iterator for one month. The iterator will yield datetime.date values and will always iterate through complete weeks, so it will yield dates outside the specified month. N)itermonthdays3r<r=)r&rdr ymdr'r'r(itermonthdatesszCalendar.itermonthdatesccsht||\}}||jd}td|EdHtd|dEdH|j||d}td|EdHdS)z Like itermonthdates(), but will yield day numbers. For days outside the specified month the day number is 0. r^rNr4)r rrr[)r&rdr rlrm days_before days_afterr'r'r( itermonthdaysszCalendar.itermonthdaysccs2t||||jD] \}}||dfVq dS)z Like itermonthdates(), but will yield (day number, weekday number) tuples. For days outside the specified month the day number is 0. r^N) enumeraterr)r&rdr rAr|r'r'r(itermonthdays2szCalendar.itermonthdays2c cst||\}}||jd}|j||d}t||\}}t||d} t| || D]} ||| fVq-td|dD]} ||| fVq=t||\}}td|dD]} ||| fVqTdS)z Like itermonthdates(), but will yield (year, month, day) tuples. Can be used for dates outside of datetime.date range. r^r4N)r rrpror[rr) r&rdr rlrmr~rrzr{endr|r'r'r(ryszCalendar.itermonthdays3ccs>t|||D]\}\}}}||||j|dfVq dS)z Like itermonthdates(), but will yield (year, month, day, day_of_week) tuples. Can be used for dates outside of datetime.date range. r^N)rryr)r&rdr rArzr{r|r'r'r(itermonthdays4szCalendar.itermonthdays4c.t|||fddtdtdDS)z Return a matrix (list of lists) representing a month's calendar. Each row represents a week; week entries are datetime.date values. cg|] }||dqSr^r'r?datesr'r(rBz/Calendar.monthdatescalendar..rr^)listr}r[lenr&rdr r'rr(monthdatescalendarzCalendar.monthdatescalendarcr)z Return a matrix representing a month's calendar. Each row represents a week; week entries are (day number, weekday number) tuples. Day numbers outside this month are zero. crrr'r?daysr'r(rBrz/Calendar.monthdays2calendar..rr^)rrr[rrr'rr(monthdays2calendarszCalendar.monthdays2calendarcr)z Return a matrix representing a month's calendar. Each row represents a week; days outside this month are zero. crrr'r?rr'r(rBrz.Calendar.monthdayscalendar..rr^)rrr[rrr'rr(monthdayscalendarrzCalendar.monthdayscalendarc>fddtttdDfddtdtDS)a' Return the data for the specified year ready for formatting. The return value is a list of month rows. Each month row contains up to width months. Each month contains between 4 and 6 weeks and each week contains 1-7 days. Days are datetime.date objects. cg|]}|qSr')rr?r&rdr'r(rB z.Calendar.yeardatescalendar..rDcg|] }||qSr'r'r?monthswidthr'r(rB rrr[Januaryrr&rdrr'rr&rrdr(yeardatescalendar   zCalendar.yeardatescalendarcr)z Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are (day number, weekday number) tuples. Day numbers outside this month are zero. crr')rr?rr'r(rBrz.Calendar.yeardays2calendar..rDcrr'r'r?rr'r(rBrrrrr'rr(yeardays2calendar rzCalendar.yeardays2calendarcr)z Return the data for the specified year ready for formatting (similar to yeardatescalendar()). Entries in the week lists are day numbers. Day numbers outside this month are zero. crr')rr?rr'r(rB rz-Calendar.yeardayscalendar..rDcrr'r'r?rr'r(rB$rrrrr'rr(yeardayscalendars   zCalendar.yeardayscalendarN)rr)r/r0r1__doc__r)rwrpropertyrrxr}rrryrrrrrrrr'r'r'r(rs$       rc@sjeZdZdZddZddZddZdd Zd d Zdd dZ dddZ dddZ dddZ d ddZ dS)!rzr Subclass of Calendar that outputs a calendar as a simple plain text similar to the UNIX program cal. cCst|||dddS)z3 Print a single week (no newline). rFrN)print formatweekr&theweekrr'r'r(prweek-szTextCalendar.prweekcCs |dkrd}nd|}||S)z* Returns a formatted day. rrFz%2icenter)r&rir rsr'r'r( formatday3s zTextCalendar.formatdaycsdfdd|DS)zA Returns a single week in a string (no newline).  c3s"|] \}}||VqdSr$rr@r|wdr&rr'r( As z*TextCalendar.formatweek..joinrr'rr(r=szTextCalendar.formatweekcCs(|dkrt}nt}||d||S)z4 Returns a formatted week day name. N)rrr)r&rirnamesr'r'r( formatweekdayCszTextCalendar.formatweekdaycsdfddDS)z- Return a header for a week. rc3s|] }|VqdSr$rr?rr'r(rQsz0TextCalendar.formatweekheader..rrxrr'rr(formatweekheaderMszTextCalendar.formatweekheaderTcCs"t|}|r d||f}||S)z0 Return a formatted month name. z%s %r)rr)r&theyearthemonthrwithyearrr'r'r(formatmonthnameSs  zTextCalendar.formatmonthnamercCst|||||dddS)z+ Print a month's calendar. rFrN)r formatmonth)r&rrwlr'r'r(r \szTextCalendar.prmonthcCstd|}td|}|||d|dd}|}|d|7}|||7}|d|7}|||D]}||||7}|d|7}q6|S)z@ Return a month's calendar string (multi-line). r5r4r^ )maxrrstriprrr)r&rrrrrweekr'r'r(rbs    zTextCalendar.formatmonthr5r4rc std|}td|}td|}|dddg}|j}|t|||d|d||t|D]\}} t||dt ||ddd} |d|fdd| D} |t | ||d|fdd| D} |t | ||d|td d| D} t| D]0}g}| D]}|t |kr|d q| |||q|t |||d|qqBd |S) zC Returns a year's calendar as a multi-line string. r5r4r^rrXc3s |] }|dVqdS)FN)rr@k)colwidthr&rr'r(rsz*TextCalendar.formatyear..c3s|]}VqdSr$r'r)headerr'r(rscss|]}t|VqdSr$)r)r@calr'r'r(rsrF)rappendreprrrrrrr[min formatstringrrr)r&rrrcr{varArowrrheadersheightjweeksrr')rrr&rr( formatyearrs>   &  $       zTextCalendar.formatyearcCst||||||dddS)zPrint a year's calendar.rFrN)rr)r&rrrrr{r'r'r(pryearszTextCalendar.pryearNT)rr)r5r4rr)rrrr)r/r0r1rrrrrrrr rrrr'r'r'r(r's    %rc@sxeZdZdZgdZeZdZdZdZdZ dZ ddZ dd Z d d Z d d ZdddZdddZdddZdddZdS)rz4 This calendar returns complete HTML pages. )montuewedthufrisatsunnodayr rdcCs$|dkr d|jSd|j||fS)z/ Return a day as a table cell. rz z%d)cssclass_noday cssclasses)r&rir r'r'r(rs zHTMLCalendar.formatdaycs dfdd|D}d|S)z8 Return a complete week as a table row. rFc3s |] \}}||VqdSr$rrr,r'r(rsz*HTMLCalendar.formatweek.. %sr)r&rrr'r,r(rszHTMLCalendar.formatweekcCsd|j|t|fS)z: Return a weekday name as a table header. z%s)cssclasses_weekday_headrr&rir'r'r(rszHTMLCalendar.formatweekdaycs$dfddD}d|S)z< Return a header for a week as a table row. rFc3s|]}|VqdSr$rr?r,r'r(rz0HTMLCalendar.formatweekheader..rr)r&rr'r,r(rszHTMLCalendar.formatweekheaderTcCs0|r dt||f}ndt|}d|j|fS)z5 Return a month name as a table row. z%s %sz%sz+%s)rcssclass_month_head)r&rrrrr'r'r(rs  zHTMLCalendar.formatmonthnamecCsg}|j}|d|j|d||j|||d|d|||d|||D] }||||dq.|d|dd|S)z6 Return a formatted month as a table. =rr
rF)rcssclass_monthrrrrr)r&rrrrrrr'r'r(rs    zHTMLCalendar.formatmonthrcCsg}|j}t|d}|d|j|d|d||j|ftttd|D]+}t|t||d}|d|D]}|d||j||d d |d q9|d q'|d d|S)z? Return a formatted year as a table of tables. r4rrz,%srDrXzzFrzzrrF) rr cssclass_yearcssclass_year_headr[rrrr)r&rrrrrArr{r'r'r(rs(    zHTMLCalendar.formatyear calendar.cssNcCs|durt}g}|j}|d||d|d|d|d||dur/|d||d||d |d |||||d |d d ||dS)zB Return a formatted year as a complete HTML page. Nz$ zn z z zC z4 zCalendar for %d z z z z rFxmlcharrefreplace)sysgetdefaultencodingrrrencode)r&rrcssencodingrrr'r'r(formatyearpage s$    zHTMLCalendar.formatyearpagerr)rrN)r/r0r1rrrrrrrrrrrrrrrrr'r'r'r(rs"   rc@s$eZdZddZddZddZdS)different_localecCr#r$locale)r&rr'r'r(r)%r*zdifferent_locale.__init__cCs"ttj|_ttj|jdSr$)_locale getlocaleLC_TIME oldlocale setlocalerr,r'r'r( __enter__(szdifferent_locale.__enter__cGsttj|jdSr$)rrrr)r&argsr'r'r(__exit__,szdifferent_locale.__exit__N)r/r0r1r)rrr'r'r'r(r$s rc8eZdZdZd ddZfddZd fd d ZZS) r This class can be passed a locale name in the constructor and will return month and weekday names in the specified locale. If this locale includes an encoding all strings containing month and weekday names will be returned as unicode. rNcC&t|||durt}||_dSr$)rr)rgetdefaultlocalerr&rrr'r'r(r)8  zLocaleTextCalendar.__init__cs<t|jt||WdS1swYdSr$rrsuperr)r&rir __class__r'r(r>s  $z LocaleTextCalendar.formatweekdayTcs@t|jt||||WdS1swYdSr$rrrr)r&rrrrrr'r(rBs $z"LocaleTextCalendar.formatmonthnamerNrr/r0r1rr)rr __classcell__r'r'rr(r0s   rcr) rr rNcCr r$)rr)rr rr r'r'r(r)Nr zLocaleHTMLCalendar.__init__cs:t|jt|WdS1swYdSr$rrrr'r(rTs  $z LocaleHTMLCalendar.formatweekdayTcs>t|jt|||WdS1swYdSr$r)r&rrrrr'r(rXs $z"LocaleHTMLCalendar.formatmonthnamerrrr'r'rr(rGs   rcCs.t|kr tkst|t||t_dSr$)rr!rrrrsr'r'r(ras  rrcCstt|||dS)z1Prints multi-column formatting for year calendarsN)rrcolsrspacingr'r'r(rJusrJcs |d9}|fdd|DS)zEReturns a string formatted from n strings, centered within n columns.rc3s|]}|VqdSr$r)r@rrr'r(r}rzformatstring..rrr'rr(rzsric Cs^|dd\}}}}}}t||dt|d}|d|}|d|} | d|} | S)zBUnrelated but handy function to calculate Unix timestamp from GMT.Nrr4<)r<r= toordinal _EPOCH_ORD) tuplerdr rihourminutesecondrhoursminutessecondsr'r'r(rs    rc Csddl}|}|d}|d}|jddtddd|jd d td d d|jd dtddd|jddtddd|jddddd|jddddd|jddddd|jd d!d"d#d$d%|jd&d'td(d)|jd*d'td+d)||d d}|jr|js|d,t d |j|jf}|j d-kr|jrt |d.}nt }|j}|durt }t||jd/} t jjj} |jdur| |jtjjfi| dS|jdur| |j|jfi| dS|d0t d dS|jrt|d.}nt}t|j|jd1} |jdur|j| d2<|j| d3<|jdur%|j tjjfi| } n|jdur6|j |jfi| } n |j!|j|jfi| } t jj} |jrU| "|j} t jjj} | | dS)4Nrztext only argumentszhtml only argumentsz-wz--widthr5z width of date column (default 2))typedefaulthelpz-lz--linesr4z)number of lines for each week (default 1)z-sz --spacingrz"spacing between months (default 6)z-mz--monthsrzmonths per row (default 3)z-cz--cssrzCSS to use for page)r'r(z-Lz--localez.locale to be used from month and weekday namesz-ez --encodingzencoding to use for outputz-tz--typetext)r)htmlzoutput type (text or html))r'choicesr(rd?zyear number (1-9999))nargsr&r(r zmonth number (1-12, text only)z/if --locale is specified --encoding is requiredr*r)rrzincorrect number of arguments)rrrr{)#argparseArgumentParseradd_argument_group add_argumentint parse_argsrrerrorrexitr&rrrdictrstdoutbufferwriterdrr<r=todayr rrrlinesrrrrr) rr.parser textgroup htmlgroupoptionsrrroptdictr9resultr'r'r(mains          "           rB__main__)Irrr<rr itertoolsr__all__ ValueErrorr4rrrrkrjr9r]rrrrr[rrrrrr r!rrr r rorprrobjectrrrrrrrrwrrrr rrrrrr rr rrrr _colwidth_spacingrJrEPOCHr=rrrrBr/argvr'r'r'r(sp   u   h