-
Notifications
You must be signed in to change notification settings - Fork 0
/
testShell.oz
37 lines (36 loc) · 887 Bytes
/
testShell.oz
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
declare
{Inspector.configure widgetShowStrings true}
{Inspect 1#{OS.getCWD}}
{OS.chDir 'c:/cygwin/home/d050517/xdg/parser/xdk/'}
{Inspect 2#{OS.getCWD}}
declare
{Inspector.configure widgetShowStrings true}
try
PidI
% ReadSocketI
WriteSocketI
ListS
TailX
% ReadI
FileNameS
Pipe
in
FileNameS = {OS.getCWD}
{Inspect FileNameS}
{OS.chDir 'Solver/Principles'}
% {OS.chDir 'PrincipleWriter'}
% {OS.pipe 'mspaint' nil _ _}
% {OS.pipe 'pw' nil _ _}
% {OS.pipe "pw" nil _ _#WriteSocketI}
% {OS.pipe "ozc" ["-c" "Principles.oz"] _ _#WriteSocketI}
%% {OS.pipe "ozc" ["-c" "Principles.oz"] PidI _#WriteSocketI}
%% {OS.read WriteSocketI 10000 ListS TailX _}
Pipe = {New Open.pipe init(cmd:"ozc" args:"-c Principles.oz")}
{Pipe close}
{OS.chDir FileNameS}
%% TailX = nil
%% {Inspect PidI}
%% {Inspect ListS}
catch E then
{Inspect E}
end