-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathInstall
More file actions
64 lines (55 loc) · 1.7 KB
/
Copy pathInstall
File metadata and controls
64 lines (55 loc) · 1.7 KB
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
; Python68k pythonami Install
; AmigaDOS shell script — run from the unpacked LHA directory:
; execute Install
; or double-click Install after Protect Install +s
;
; Installs:
; SYS:pythonami/pythonami — Hunk executable
; SYS:pythonami/lib/ — stdlib (.py modules)
;
; Session setup (current boot):
; Assign pythonami_lib: SYS:pythonami/lib
; Path SYS:pythonami ADD
;
; Permanence: append the same Assign/Path lines to S:User-Startup.
echo "pythonami Install"
echo "-----------------"
IF NOT EXISTS pythonami
echo "Error: pythonami not found in the current directory."
echo "Unpack the LHA, CD into that drawer, then run Install again."
QUIT 20
ENDIF
IF NOT EXISTS lib
echo "Error: lib drawer not found in the current directory."
echo "The package must contain lib/random.py and lib/randgen.py."
QUIT 20
ENDIF
echo "Creating SYS:pythonami"
IF NOT EXISTS SYS:pythonami
makedir SYS:pythonami
ENDIF
echo "Copying pythonami -> SYS:pythonami/"
copy pythonami SYS:pythonami/
echo "Copying lib -> SYS:pythonami/lib"
copy lib SYS:pythonami/lib ALL
echo "Assign pythonami_lib: SYS:pythonami/lib"
Assign pythonami_lib: SYS:pythonami/lib
echo "Path SYS:pythonami ADD"
Path SYS:pythonami ADD
echo ""
echo "Installation complete for this session."
echo ""
echo "For permanence, add these lines to S:User-Startup:"
echo " Assign pythonami_lib: SYS:pythonami/lib"
echo " Path SYS:pythonami ADD"
echo ""
echo "Then you can run from any Shell:"
echo " pythonami script.py"
echo ""
echo "Stdlib import (lib is NOT searched automatically yet)."
echo "In your script:"
echo " import sys"
echo " sys.path.append('pythonami_lib:')"
echo " import random"
echo ""
echo "Or: sys.path.append('SYS:pythonami/lib')"