This file is indexed.

/usr/share/doc/python-myghty/html/params.html is in python-myghty 1.1-5.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
<html>
<head>
	<title>
Myghty Documentation
</title>
	<link href="style.css" rel="stylesheet" type="text/css"></link>
	<link href="syntaxhighlight.css" rel="stylesheet" type="text/css"></link>
</head>
<body>




<link href="docs.css" rel="stylesheet" type="text/css"></link>


<div style="position:absolute;left:0px;top:0px;"><a name="top"></a>&nbsp;</div>

<div class="doccontainer">

<div class="docheader">

<div class="docheadertext" >Myghty Documentation</div>
<div class="">Version: 1.1   Last Updated: 09/10/06 19:32:29</div>
</div>



		<A name="parameters"></a>
		
	
<div class="topnav">


	
	<div class="topnavcontrol">
	View: <b>Paged</b> &nbsp;|&nbsp; <a href="documentation.html">One Page</a>
	</div>



<div class="topnavsectionlink">

<a href="index.html">Table of Contents</a>

<div class="prevnext">
Previous: <a href="unicode.html">Unicode Support</a>

&nbsp; | &nbsp;


Next: <a href="technical.html">Myghty Guts (tech description)</a>

</div>
</div>


<div class="topnavmain">
	<div class="topnavheader">Index of Configuration Parameters</div>
	<div class="topnavitems">
	



	</div>
</div>

</div>

		<div class="sectioncontent">
			




<div class="subsection" style="margin-left:10px;">

    <div class="sectiontext">


	
	<p>Configuration parameters in Myghty are basically a big dictionary of data that is initially passed to the constructor for <span class="codeline">myghty.interp.Interpreter</span>, which represents the entry point for running a Myghty template.  Upon construction, the Interpreter instantiates all the other objects
	it needs, such as the Compiler, the Resolver, and a prototype Request object (a prototype is an object that is used as a template to make copies of itself), passing in the same hash of configuration parameters.  Each object takes what it needs out of the dictionary.</p>
	
	<p>If you are writing your own interface to <span class="codeline">Interpreter</span>, such as a standalone or simple CGI client, you can pass one or more of these values programmatically to the constructor of the Interpreter.  If running from mod python, values can be specified in the http.conf file using the format <span class="codeline">Myghty&lt;<i>Name</i>&gt;</span>, where <i>Name</I> is the parameter name in InitialCaps format (i.e., data_dir becomes DataDir).
	</p>
	
	<p>Note also that there are configuration parameters specific to the caching mechanism, listed in <a href="cache.html#caching_options" >Cache Options</a>, as well as session specific parameters listed in <a href="session.html#session_options" >Session Options</a>.</p>
	
	
	<table cellspacing="0">
	
	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_allow_globals"></a>
	<b>allow_globals</b> (list of strings)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	A list of global variable names that will be compiled into Myghty templates, and will be expected to be provided upon template execution.  The variable "r", representing the Apache Request, is delivered to templates via this parameter.  To add your own variables, specify their names in this list, and also specify it as a key in the RequestImpl argument global_args to provide the values.
	See the section <a href="globals.html#globals_globalcustom" >Make your Own Friends</a> for details.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_attributes"></a>
	<b>attributes</b> (dictionary)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	A dictionary of data that will be stored by the Interpreter used throughout a particular Myghty application.  This is a way
	to set per-application global variables.  The values are accessible via the <span class="codeline">interpreter.attributes</span> 
	dictionary.  </p>
	

<div class="code">
<pre><span class="python_name">i </span><span class="python_operator">= </span><span class="python_name">interp</span><span class="python_operator">.</span><span class="python_name">Interpreter</span><span class="python_enclosure">(</span><span class="python_name">attributes </span><span class="python_operator">= </span><span class="python_enclosure">{</span><span class="python_literal">'param'</span><span class="python_operator">: </span><span class="python_literal">'value'</span><span class="python_enclosure">})</span><span class="python_operator"></span></pre></div>

	Accessing attributes:	
	

<div class="code">
<pre><span class="python_comment"># call interpreter off request,</span>
<span class="python_comment"># and get an attribute</span>
<span class="python_name">p </span><span class="python_operator">= </span><span class="python_name">m</span><span class="python_operator">.</span><span class="python_name">interpreter</span><span class="python_operator">.</span><span class="python_name">attributes</span><span class="python_enclosure">[</span><span class="python_literal">'param'</span><span class="python_enclosure">]</span><span class="python_operator">
</span>
<span class="python_comment"># call interpreter off component,</span>
<span class="python_comment"># and set an attribute</span>
<span class="python_name">self</span><span class="python_operator">.</span><span class="python_name">interpreter</span><span class="python_operator">.</span><span class="python_name">attributes</span><span class="python_enclosure">[</span><span class="python_literal">'param'</span><span class="python_enclosure">] </span><span class="python_operator">= </span><span class="python_literal">'value'</span><span class="python_operator"></span></pre></div>

	
	<p>Interpreter attributes can be compared to component <a href="components.html#components_members_attributes" >attributes</a>, as well
	as request <a href="request.html#request_members_attributes" >attributes</a>.
	</p>
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_auto_flush"></a>
	<b>auto_flush</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: False<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Whether or not <span class="codeline">m.write</span> calls will be automatically flushed to the final output stream as they are called, or will be buffered until the end of the request.  Autoflush being on makes things a little more tricky, as you can't do any kind of page redirects (neither external nor internal) once the content starts coming out.  Error messages become messy as well since they are similar to an internal redirect.</p>
	<p>Autoflush can be set in a variety of ways and is described fully in the section <a href="filtering.html#filtering_autoflush" >The Autoflush Option</a>.
	</p>
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_auto_handler_name"></a>
	<b>auto_handler_name</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: autohandler<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	The name of the file used as a global page wrapper, defaults to 'autohandler'.  See the section <a href="specialtempl.html#specialtempl_autohandler" >autohandlers</a> for information on autohandlers.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_cache_debug_file"></a>
	<b>cache_debug_file</b> (file object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: None<br/>
		used by: Cache
		<br/>since version: 0.94
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	If pointing to a Python file object, container operations performed by the caching system will be logged, allowing the viewing of how often data is being refreshed as well as how many concurrent threads and processes are hitting various containers.
	When running with ApacheHandler or CGIHandler, this parameter can be set to the standard Apache log via the 
	parameter <span class="codeline">log_cache_operations</span>.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_code_cache_size"></a>
	<b>code_cache_size</b> (integer)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: 16777216<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Size of the cache used by Interpreter to cache loaded component objects, measured in bytes.  The cache works on a "least recently used" scheme.  This value has a great impact on performance, as too large a value can use up lots of memory for a very large site, and too small results in excessive "swapping" of components in and out of memory.  Cache operations can be logged via <a href="params.html#parameters_debug_file" >debug_file</a>.  
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_compiler"></a>
	<b>compiler</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.compiler.Compiler<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.compiler.Compiler</span> used to generate object files.  Not much reason to play with this unless you are seriously hacking your own engine.  The default Compiler object will receive its optional parameters from the argument list sent to the constructor for <span class="codeline">Interpreter</span>.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_component_root"></a>
	<b>component_root</b> (string or list)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: Resolver
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>This parameter is almost always required; it is the filesystem location, or list of locations, with which to locate Myghty component files.  </p>
	<p>The two formats of component_root are as follows:</p>
	<p>Single string</p>
	

<div class="code">
<pre><span class="python_name">component_root </span><span class="python_operator">= </span><span class="python_literal">"/web/sites/mysite/htdocs"</span><span class="python_operator"></span></pre></div>

	<p>List of hashes</p>
	

<div class="code">
<pre><span class="python_name">component_root </span><span class="python_operator">= </span><span class="python_enclosure">[</span>
        <span class="python_enclosure">{</span><span class="python_literal">'main'</span><span class="python_operator">:</span><span class="python_literal">"/web/sites/mysite/htdocs"</span><span class="python_enclosure">}</span><span class="python_operator">,</span>
        <span class="python_enclosure">{</span><span class="python_literal">'components'</span><span class="python_operator">:</span><span class="python_literal">"/web/sites/mysite/components"</span><span class="python_enclosure">}</span><span class="python_operator">,</span>
        <span class="python_enclosure">{</span><span class="python_literal">'alt'</span><span class="python_operator">:</span><span class="python_literal">"/usr/local/lib/special-comp"</span><span class="python_enclosure">}</span>
    <span class="python_enclosure">]</span><span class="python_operator"></span></pre></div>


	<p>The single string specifies one root for all component calls, which will be assigned the identifying key "main".  The list of hashes specifies the keys and paths for a collection of locations which will be searched in order for a component.  This allows you to have one file tree that is web-server accessible files, and another file tree that contains files which can only be used as embedded components, and can't be accessed by themselves.  The key names are used to uniquely identify a component by both its location and its name, such as "main:/docs/index.myt".</p>
	
	<p>For examples of component_root configuration, see the section <a href="configuration.html#configuration" >Configuration</a>.  For advanced options on file-based resolution, see <a href="resolver.html#resolver" >Advanced Resolver Configuration</a>.
	</p>
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_data_dir"></a>
	<b>data_dir</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Directory to be used to store compiled object files (.py files and .pyc files), lock files used for synchronization, as well as container files which store data for the component caching system and the session object.  A non-None value implies True for the "use_object_files" setting.  Compiled object files are stored in the <span class="codeline">obj</span> directory, and cache/session files are stored underneath <span class="codeline">container_XXX</span> directories.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_debug_elements"></a>
	<b>debug_elements</b> (list)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: []<br/>
		used by: Interpreter
		<br/>since version: 0.97alpha3
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>A list of string names that refer to various elements that can send debug information to the Interpreter's debug output.  An example with all allowed names:</p>
	

<div class="code">
<pre><span class="python_name">debug_elements </span><span class="python_operator">= </span><span class="python_enclosure">[</span>
    <span class="python_comment"># all resolution of components</span>
    <span class="python_literal">'resolution'</span><span class="python_operator">, </span>

    <span class="python_comment"># inspection of component objects and modules loaded into memory and later garbage-collected</span>
    <span class="python_literal">'codecache'</span><span class="python_operator">, </span>
    
    <span class="python_comment"># inspection of the generation and compilation of components</span>
    <span class="python_literal">'classloading'</span><span class="python_operator">,</span>
    
    <span class="python_comment"># cache operations, reloading of cached data</span>
    <span class="python_literal">'cache'</span><span class="python_operator">, </span>
<span class="python_enclosure">]</span><span class="python_operator"></span></pre></div>

	
	</p>

	</td>
</tr>


	
	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_debug_file"></a>
	<b>debug_file</b> (file object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: stderr<br/>
		used by: Interpreter
		<br/>since version: 0.93b
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>References a Python file object; if non-None, the Interpreter will send debugging information to this file.  Note that line breaks are not sent by default; use code such as <span class="codeline">myghty.buffer.LinePrinter(sys.stderr)</span> to wrap the file in a line-based formatter.
	</p>
	<p>When running the Interpreter in an HTTP context, various implementations of HTTPHandler supply their own stream for debugging information, such as the ApacheHandler which supplies the Apache error log as a filehandle.</p>
	<p>As of version 0.97alpha3, to actually enable debug logging requires the <a href="params.html#parameters_debug_elements" >debug_elements</a> parameter to be set up.
	</p>
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_default_escape_flags"></a>
	<b>default_escape_flags</b> (list)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This is a list of escape flags that will be automatically applied to all substitution calls, i.e. &lt;% <i>string</i> %&gt;.  See <a href="filtering.html#filtering_escaping" >Escaping Content</a> for more information on content escaping.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_dhandler_name"></a>
	<b>dhandler_name</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: dhandler<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	The name of the file used as a directory handler, defaults to 'dhandler'.  See the section <a href="specialtempl.html#specialtempl_dhandler" >dhandlers</a> for information on directory handlers.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_disable_unicode"></a>
	<b>disable_unicode</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: False<br/>
		used by: Request, Compiler
		<br/>since version: 1.1
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Disable the new unicode support features.   If set, all strings are assumed to be <span class="codeline">str</span>s in the system default encoding (usually ASCII).
See the section on <a href="unicode.html#unicode" >Unicode Support</a> for further details.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_dont_auto_flush_filters"></a>
	<b>dont_auto_flush_filters</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: False<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	If auto_flush is turned on, this option will keep auto_flush turned off for components that use &lt;%filter&gt; sections.  This is useful if you have filters that rely upon receiving the entire block of text at once.  See the section <a href="filtering.html#filtering_filtering" >&lt;%filter&gt;</a> for more information on filters.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_encoding_errors"></a>
	<b>encoding_errors</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: strict<br/>
		used by: Request
		<br/>since version: 1.1
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
<p>Sets the initial value for the <span class="codeline">encoding_errors</span> of requests, which, in turn, determines how character set encoding errors are handled.</p>
<p>Some choices are:</p>
<dl>
    <dt><span class="codeline">strict</span></dt>
    <dd>Raise an exception in case of an encoding error.</dd>
    <dt><span class="codeline">replace</span></dt>
    <dd>Replace malformed data with a suitable replacement marker,
        such as <span class="codeline">"?"</span>.</dd>
    <dt><span class="codeline">xmlcharrefreplace</span></dt>
    <dd>Replace with the appropriate XML character reference.</dd>
    <dt><span class="codeline">htmlentityreplace</span></dt>
    <dd>Replace with the appropriate HTML character entity reference,
      if there is one; otherwise replace with a numeric character reference.
      (This is not a standard python encoding error handler.  It is
      provided by the <span class="codeline">mighty.escapes</span> module.)
    </dd>
    <dt><span class="codeline">backslashreplace</span></dt>
    <dd>Replace with backslashed escape sequence.</dd>
    <dt><span class="codeline">ignore</span></dt>
    <dd>Ignore malformed data and continue without further notice.</dd>
</dl>
<p>See also the section on <a href="unicode.html#unicode" >Unicode Support</a>,
and the Python <a href="http://docs.python.org/lib/module-codecs.html">codecs</a> documentation.
</p>
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_error_handler"></a>
	<b>error_handler</b> (function)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: RequestImpl
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>A function object that will be passed all exceptions and given the chance to handle them before regular processing occurs.  The format of the function is:</p>
	

<div class="code">
<pre><span class="python_keyword">def </span><span class="python_name">handle_error</span><span class="python_enclosure">(</span><span class="python_name">e</span><span class="python_operator">, </span><span class="python_name">m</span><span class="python_operator">, **</span><span class="python_name">params</span><span class="python_enclosure">)</span><span class="python_operator">:
    </span><span class="python_comment"># custom error handling goes here</span>
    <span class="python_comment"># ...</span>

    <span class="python_comment"># return False to continue handling error, True to disregard</span>
<span class="python_operator">    </span><span class="python_keyword">return </span><span class="python_name">False</span><span class="python_operator"></span></pre></div>

	<p>Where 'e' is a <span class="codeline">myghty.exception.Error</span> object and m is the request object.  The global variable 'r' will also be passed if running in an HTTP context.  The function should return True to stop all further error handling, or False to continue error handling as normal.</p>

	<p>
	The request object, while it is the same instance used to handle the request initially, no longer will have any buffered content and will also not have a current component instance.  It is safe to call subrequests from it, allowing the construction of custom error pages.
	</p>

	<p>See also <a href="params.html#parameters_raise_error" >raise_error</a> to simply raise an error outside the Request and bypass all internal and custom error handling.</p>
	
	</p>

	</td>
</tr>


	
	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_escapes"></a>
	<b>escapes</b> (dict)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: {'h':html_escape, 'u':url_escape}<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Use this parameter to define your own custom escaping functions that are available within substitutions, as well as <span class="codeline">m.apply_escapes()</span>.  Within a dictionary key/value pair, the key is the identifying character, and the value is a reference to a single-argument function that will be called with the string with which to apply the text escape.  The function should return the filtered text.
	</p>
	
	<p>Escaping is described fully at <a href="filtering.html#filtering_escaping" >Escaping Content</a>.
	</p>
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_generator"></a>
	<b>generator</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.objgen.PythonGenerator<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.objgen.ObjectGenerator</span> that is used to generate object files.  Again, for the brave hacker, you can write your own generator and output object files in whatever language you like.  
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_global_args"></a>
	<b>global_args</b> (dictionary)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: RequestImpl
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	A list of global argument names and values that will be available in all template calls.  See the section <a href="globals.html#globals_globalcustom" >Make your Own Friends</a> for details.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_interpreter_name"></a>
	<b>interpreter_name</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: None<br/>
		used by: HTTPHandler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Specifies the name of the Myghty interpreter that should be used.  All HTTP handlers modules maintain a dictionary of HTTPHandler instances, each of which references a Myghty interpreter, keyed off of a name.  
	When this name is explicitly specified, that particular handler will be created if it doesnt exist and then used.</p>
	<p>This option is currently most useful for use within multiple Apache directives, so that different sets of configuration parameters can be used for different directives, without requiring the use mod_python's multiple Python interpreters feature.  See the example in <a href="configuration.html#configuration_mod_python_multiple" >Advanced mod_python Configuration - Multiple ApacheHandlers</a>.
	</p>
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_lexer"></a>
	<b>lexer</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.lexer.Lexer<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.request.Lexer</span>, used to parse the text of template files.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_log_cache_operations"></a>
	<b>log_cache_operations</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: False<br/>
		used by: ApacheHandler or CGIHandler
		<br/>since version: 0.93b
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Deprecated; use <a href="params.html#parameters_debug_elements" >debug_elements</a> instead.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_log_component_loading"></a>
	<b>log_component_loading</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: False<br/>
		used by: ApacheHandler or CGIHandler
		<br/>since version: 0.93b
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Deprecated; use <a href="params.html#parameters_debug_elements" >debug_elements</a> instead.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_log_errors"></a>
	<b>log_errors</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: False<br/>
		used by: HTTPHandler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Specifies whether or not component errors should receive a full stack trace in the Apache error log,  standard error output of CGIHandler, or other HTTP-specific logging system.
	If false, component errors still produce a single-line description of the error in the log.  See also <a href="params.html#parameters_output_errors" >output_errors</a>.  If <a href="params.html#parameters_raise_error" >raise_error</a> is set to true, no logging of errors occurs.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_max_recursion"></a>
	<b>max_recursion</b> (integer)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: 32<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	The highest level of component recursion that can occur, i.e. as in recursive calls to a subcomponent.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_module_components"></a>
	<b>module_components</b> (array of hashes)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: ResolveModule
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This parameter is used for resolving <a href="modulecomponents.html#modulecomponents" >Module Components</a> using regular expressions which are mapped to function, class or class instance objects.  See <a href="modulecomponents.html#modulecomponents_resolution_module_components" >module_components</a> for examples.</p>
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_module_root"></a>
	<b>module_root</b> (array of hashes)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: ResolvePathModule
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This parameter is used for resolving <a href="modulecomponents.html#modulecomponents" >Module Components</a> using file paths which map to the locations of python files and the attributes within. See <a href="modulecomponents.html#modulecomponents_resolution_module_root" >module_root</a> for examples.</p>
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_module_root_adjust"></a>
	<b>module_root_adjust</b> (callable)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: None<br/>
		used by: ResolvePathModule
		<br/>since version: 0.99b
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This parameter is used in combination with <a href="params.html#parameters_module_root" >module_root</a> to specify a callable that will translate an incoming URI before being resolved to a path-based module.  See <a href="modulecomponents.html#modulecomponents_resolution_module_root" >module_root</a> for more detail.</p>
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_out_buffer"></a>
	<b>out_buffer</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: DefaultRequestImpl
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	A Python file object, or similar, with which to send component output.  See the <a href="configuration.html#configuration" >Configuration</a> section for examples.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_output_encoding"></a>
	<b>output_encoding</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: sys.getdefaultencoding()<br/>
		used by: Request
		<br/>since version: 1.1
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Sets the initial value for the <span class="codeline">output_encoding</span> of requests.  The default value is python's system default encoding (usually ASCII.)
See the section on <a href="unicode.html#unicode" >Unicode Support</a> for further details.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_output_errors"></a>
	<b>output_errors</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: True<br/>
		used by: ApacheHandler or CGIHandler
		<br/>since version: 0.93b
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Specifies whether or not component errors with full stack trace should be reported to the client application.
	If false, component errors will produce a 500 Server Error.  See also <a href="params.html#parameters_log_errors" >log_errors</a>.  If <a href="params.html#parameters_raise_error" >raise_error</a> is set to True, this parameter is overridden and client will receive a 500 server error (unless the error is caught by an external handler).
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_parent_request"></a>
	<b>parent_request</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: None<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This parameter specifies the parent request when making subrequests, and is automatically provided.  For more information see <a href="components.html#components_programmatic" >Programmatic Interface</a>. 
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_path_moduletokens"></a>
	<b>path_moduletokens</b> (list of strings)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: ['index']<br/>
		used by: ResolvePathModule
		<br/>since version: 0.99b
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Used by <a href="params.html#parameters_module_root" >module_root</a> to specify default path tokens that should be searched in module attribute paths.  See <a href="modulecomponents.html#modulecomponents_resolution_module_root_options" >Module Root Options</a> for details.
    </p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_path_stringtokens"></a>
	<b>path_stringtokens</b> (list of strings)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: []<br/>
		used by: ResolvePathModule
		<br/>since version: 0.99b
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Used by <a href="params.html#parameters_module_root" >module_root</a> to specify default path tokens that should be searched in file paths.  See <a href="modulecomponents.html#modulecomponents_resolution_module_root_options" >Module Root Options</a> for details.
    </p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_path_translate"></a>
	<b>path_translate</b> (list of tuples, or a callable)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: administrators<br/>
		default: None<br/>
		used by: Resolver
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	A list of regular-expression translations that will be performed on paths before they are used to locate a component and/or module component.  This can be useful for complicated web server configurations where aliases point to component roots, or specifying a default document for path requests.  It looks as follows:

	

<div class="code">
<pre><span class="python_name">path_translate </span><span class="python_operator">= </span><span class="python_enclosure">[</span>
        <span class="python_comment"># convert /store/* to /shop/*</span>
        <span class="python_enclosure">(</span><span class="python_literal">r'^/store/(.*)'</span><span class="python_operator">, </span><span class="python_literal">r'/shop/\1'</span><span class="python_enclosure">)</span><span class="python_operator">,</span>
        
        <span class="python_comment"># convert /documents/* to /docs/*</span>
        <span class="python_enclosure">(</span><span class="python_literal">r'^/documents/'</span><span class="python_operator">, </span><span class="python_literal">'/docs/'</span><span class="python_enclosure">)</span><span class="python_operator">,</span>
        
        <span class="python_comment"># convert /foo/bar/ to /foo/bar/index.myt</span>
        <span class="python_enclosure">(</span><span class="python_literal">r'/$'</span><span class="python_operator">, </span><span class="python_literal">'/index.myt'</span><span class="python_enclosure">)</span><span class="python_operator">,</span>
    <span class="python_enclosure">]</span><span class="python_operator"></span></pre></div>

	<p>As of revision 0.99b, the argument to path_translate can alternatively be specified as a callable, which converts its given URI to the translated value:</p>
	

<div class="code">
<pre><span class="python_keyword">def </span><span class="python_name">my_translate</span><span class="python_enclosure">(</span><span class="python_name">uri</span><span class="python_enclosure">)</span><span class="python_operator">:
    </span><span class="python_keyword">return </span><span class="python_literal">"/doc/" </span><span class="python_operator">+ </span><span class="python_name">uri</span><span class="python_operator">
</span><span class="python_name">path_translate </span><span class="python_operator">= </span><span class="python_name">my_translate</span><span class="python_operator"></span></pre></div>

	
	<p>Note that the <a href="request.html#request_members_request_path" >request_path</a> member of the request object will reference the original path before translation, whereas the <a href="components.html#components_members_path" >path</a> of the component served will contain the translated path (for file-based components).</p>

	<p>More detail about path translation can be found in <a href="resolver.html#resolver" >Advanced Resolver Configuration</a>.</p>
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_python_post_processor"></a>
	<b>python_post_processor</b> (function)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	References a function that will be invoked with the full text of each individual unit of Python code created during component generation (i.e., creation of .py files).  The returned string will be used as the Python code that is actually placed within the generated .py file.  Also see <a href="params.html#parameters_text_post_processor" >text_post_processor</a>.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_python_pre_processor"></a>
	<b>python_pre_processor</b> (function)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	References a function that will be invoked with the full text of a template's source file before it is parsed.  The returned string will then be used as the source to be parsed.  
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_raise_error"></a>
	<b>raise_error</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: False<br/>
		used by: Request
		<br/>since version: 0.97a
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Indicates if errors should be raised when they occur, or be handled by error handling functionality.  If set to True, no error logging, friendly client response, or custom internal error handler function will happen.  Instead, an external error handler can be used.

This parameter overrides invalidates the functionality of <a href="params.html#parameters_log_errors" >log_errors</a>, <a href="params.html#parameters_output_errors" >output_errors</a> and <a href="params.html#parameters_error_handler" >error_handler</a>.
	</p>
	<p>
	This parameter allows the entire <span class="codeline">interpreter.execute()</span> or <span class="codeline">handler.handle()</span> call to be wrapped in a <span class="codeline">try: / except:</span> block, where the error can be handled externally to all Myghty functionality.
	</p>
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_request"></a>
	<b>request</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.request.Request<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.request.Request</span> used as a prototype to generate new requests.  Its context-specific behavior is supplied by a separate instance of <span class="codeline">myghty.request.RequestImpl</span>, so there is not much reason to change this either.
	</p>

	</td>
</tr>





	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_request_impl"></a>
	<b>request_impl</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.request.DefaultRequestImpl<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.request.RequestImpl</span> that will be used either as a prototype to create new RequestImpls per request, or can be passed per individual interpreter execution.  RequestImpl tells <span class="codeline">Request</span> how it should interact with its environment.  Take a look at <span class="codeline">ApacheHandler.ApacheRequestImpl</span>, <span class="codeline">CGIHandler.CGIRequestImpl</span>, and <span class="codeline">myghty.request.DefaultRequestImpl</span> for examples.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_request_path"></a>
	<b>request_path</b> (string)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: myghty.request.Request<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Sets the initial request path for this request.  In most cases, this is set automatically by simply calling a request with a string-based component name, or with a file-based component which can return its originating path.  However, in the case of a request being called with a memory or module-based component, the path defaults to None and must be set by the calling function if it is to be referenced by components.
	</p>

	</td>
</tr>



	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_require_publish"></a>
	<b>require_publish</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: all<br/>
		default: False<br/>
		used by: ResolvePathModule
		<br/>since version: 0.99b
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	<p>Indicates that callables located via <a href="params.html#parameters_module_root" >module_root</a> resolution require an attribute named 'public' set to True attached to them, in order to allow access.  See <a href="modulecomponents.html#modulecomponents_resolution_module_root_options" >Module Root Options</a> for details.
    </p>

	</td>
</tr>


    
	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_resolver"></a>
	<b>resolver</b> (object)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: myghty.resolver.FileResolver<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	An instance of <span class="codeline">myghty.resolver.Resolver</span> that is used to locate component files.  Both ApacheHandler and CGIHandler have their own instances of <span class="codeline">Resolver</span> but don't yet do anything special.  If you wanted some kind of special file resolution behavior, you can swap in your own subclass of <span class="codeline">Resolver</span>.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_resolver_strategy"></a>
	<b>resolver_strategy</b> (list)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: Resolver
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Allows configuration of the rules used in component resolution.  See the section <a href="resolver.html#resolver" >Advanced Resolver Configuration</a> for details.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_source_cache_size"></a>
	<b>source_cache_size</b> (integer)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: 1000<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Size of the cache used by Interpreter to cache the source of components.  See <a href="params.html#parameters_use_static_source" >use_static_source</a> for
	a description of source caching, and see code_cache_size for a description of the LRU caching scheme.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_text_post_processor"></a>
	<b>text_post_processor</b> (function)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	References a function that will be invoked with the full text of each individual unit of output text created during component generation (i.e., creation of .py files).  The returned string will be used as the output text that is actually placed within the generated .py file.  Also see <a href="params.html#parameters_python_post_processor" >python_post_processor</a>.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_use_auto_handlers"></a>
	<b>use_auto_handlers</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: True<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Whether or not to use autohandlers.  See the section <a href="specialtempl.html#specialtempl_autohandler" >autohandlers</a> for more information.
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_use_dhandlers"></a>
	<b>use_dhandlers</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: True<br/>
		used by: Request
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Whether or not to use directory handlers.  See the section <a href="specialtempl.html#specialtempl_dhandler" >dhandlers</a> for more information.
	</p>

	</td>
</tr>




	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_use_object_files"></a>
	<b>use_object_files</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: True if data_dir is not null<br/>
		used by: Interpreter
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Indicates whether or not components should be compiled into module files on the filesystem, or into strings held in memory.  A value of None for the <a href="params.html#parameters_data_dir" >data_dir</a> parameter will have the same effect.  There is no advantage whatsoever to having components compiled in memory, and startup performance will be degraded for repeated calls to the same component.  It might be useful if you are running the interpreter in a "one shot" fashion where there is no need to have compiled object files lying around.  
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_use_session"></a>
	<b>use_session</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: developers<br/>
		default: None<br/>
		used by: ApacheHandler
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
		The additional global variable <i>s</i> to reference the Myghty session, or alternatively 
		the mod_python 3.1 session,
		is turned on when this option is set to True.  See the section <a href="session.html#session" >Session</a> for details.
	</p>

	</td>
</tr>



	
        
<tr class="light">
	<td valign="top">
	<A name="parameters_use_source_line_numbers"></a>
	<b>use_source_line_numbers</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: hackers<br/>
		default: None<br/>
		used by: Compiler
		</div>
	</td>
</tr>

<tr class="light">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	Whether or not to put source line numbers in compiled object files.  This is used to generate friendly stack traces upon errors (when that feature is complete).
	</p>

	</td>
</tr>




	
        
<tr class="dark">
	<td valign="top">
	<A name="parameters_use_static_source"></a>
	<b>use_static_source</b> (boolean)</td>
	<td align="right" width="40%">
		<div style="text-align:left">
		for users: optimizers<br/>
		default: False<br/>
		used by: Interpreter, Resolver
		</div>
	</td>
</tr>

<tr class="dark">
	<td colspan="2">
	<p style="margin-left:15px;margin-bottom:5px;margin-top:5px">
	This parameter, when set to <span class="codeline">True</span>:  
	<ul>
		<li>Enables URI caching within the resolver, and/or turns on all configured URICache() resolution rules, so that visiting a URI a second time does not produce any filesystem checks, within the currently cached set of URIs.  </li>
		<li>Disables repeated last-modification time checks on all template files and module-component files</li>
		<li>Disables last-modification time checks on compiled template object files against the template they were generated from, which in effect disables re-compilation of templates even across server restarts, unless the object file is removed from the <span class="codeline">obj</span> directory underneath the configured <a href="params.html#parameters_data_dir" >data_dir</a> directory</li>
	</ul>
	Use use_static_source on production servers where the site's structure is not being changed, to prevent auto-recompilation of modified templates, and to prevent reloads of modified module component modules.  There is both a performance increase due to fewer filesystem checks, and also a stability increase, as no Python modules are dynamically reloaded within a running server.   Dynamic reloads in Python are somewhat error-prone, particularly if a module with a base class changes, and a corresponding subclass in a different, non-reloaded module attempts to instantiate itself.  
	</p>

	</td>
</tr>


	
	</table>





	
    </div>


    <a href="#parameters" class="toclink">back to section top</a>

    
<div class="sectionnavblock">
<div class="sectionnav">


        Previous: <a href="unicode.html">Unicode Support</a>

                |

        Next: <a href="technical.html">Myghty Guts (tech description)</a>

</div>
</div>


</div>


		</div>






</div>

















<center>
</center>
</body>
</html>