blob: 74835fc142838dda5b06c2088601acd89999b689 [file] [log] [blame]
Jack Jansend2d2b201999-01-29 16:15:52 +00001/*
2** Resources for the sys.path initialization, the Python options
3** and the preference filename
4*/
5#include "Types.r"
6#include "patchlevel.h"
7#include "pythonresources.h"
8
9/* A few resource type declarations */
10
11type 'Popt' {
12 literal byte version = POPT_VERSION_CURRENT;
13 byte noInspect = 0, inspect = 1;
14 byte noVerbose = 0, verbose = 1;
15 byte noOptimize = 0, optimize = 1;
16 byte noUnbuffered = 0, unbuffered = 1;
17 byte noDebugParser = 0, debugParser = 1;
18 byte closeOnNormalExit = 0, noCloseOnNormalExit = 1;
19 byte closeOnErrorExit = 0, noCloseOnErrorExit = 1;
20 byte interactiveOptions = 0, noInteractiveOptions = 1;
21 byte argcArgv = 0, noArgcArgv = 1;
22 byte newStandardExceptions = 0, oldStandardExceptions = 1;
23 byte sitePython = 0, noSitePython = 1;
Jack Jansen0c6d0372000-05-05 23:11:14 +000024 byte navService = 0, noNavService = 1;
Jack Jansend2d2b201999-01-29 16:15:52 +000025};
26
27type 'TMPL' {
28 wide array {
29 pstring;
30 literal longint;
31 };
32};
33
34/* The resources themselves */
35
36/* Popt template, for editing them in ResEdit */
37
38resource 'TMPL' (PYTHONOPTIONS_ID, "Popt") {
39 {
40 "preference version", 'DBYT',
41 "Interactive after script", 'DBYT',
42 "Verbose import", 'DBYT',
43 "Optimize", 'DBYT',
44 "Unbuffered stdio", 'DBYT',
45 "Debug parser", 'DBYT',
46 "Keep window on normal exit", 'DBYT',
47 "Keep window on error exit", 'DBYT',
48 "No interactive option dialog", 'DBYT',
49 "No argc/argv emulation", 'DBYT',
50 "Old standard exceptions", 'DBYT',
51 "No site-python support", 'DBYT',
Jack Jansen0c6d0372000-05-05 23:11:14 +000052 "No NavServices in macfs", 'DBYT',
Jack Jansend2d2b201999-01-29 16:15:52 +000053 }
54};
55
56/* The default-default Python options */
57
58resource 'Popt' (PYTHONOPTIONS_ID, "Options") {
59 POPT_VERSION_CURRENT,
60 noInspect,
61 noVerbose,
62 noOptimize,
63 noUnbuffered,
64 noDebugParser,
65 closeOnNormalExit,
66 noCloseOnErrorExit,
67 interactiveOptions,
68 argcArgv,
69 newStandardExceptions,
70 sitePython,
Jack Jansen0c6d0372000-05-05 23:11:14 +000071 navService,
Jack Jansend2d2b201999-01-29 16:15:52 +000072};
73
74/* The sys.path initializer */
75
76resource 'STR#' (PYTHONPATH_ID, "sys.path initialization") {
77 {
78 "$(PYTHON)",
79 "$(PYTHON):Lib",
80 "$(PYTHON):Mac:PlugIns",
81 "$(PYTHON):Mac:Lib",
82 "$(PYTHON):Mac:Lib:lib-toolbox",
83 "$(PYTHON):Mac:Lib:lib-scripting",
Jack Jansen6d3d6e41999-02-06 17:56:59 +000084 "$(PYTHON):Extensions:img:Mac",
Just van Rossum53ea1341999-01-29 16:28:55 +000085 "$(PYTHON):Extensions:img:Lib",
Jack Jansendab05542000-06-05 08:35:47 +000086 "$(PYTHON):Extensions:Numerical:Lib",
87 "$(PYTHON):Lib:lib-tk"
Jack Jansend2d2b201999-01-29 16:15:52 +000088 }
89};
90
91/* The preferences filename */
92
93resource 'STR ' (PREFFILENAME_ID, PREFFILENAME_PASCAL_NAME) {
94 $$Format("Python %s Preferences", PY_VERSION)
95};