Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pyrte
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenVMS
WASD
pyrte
Commits
aff157d90253
Commit
aff157d90253
authored
4 years ago
by
Jean-Francois Pieronne
Browse files
Options
Downloads
Patches
Plain Diff
v3.0.0 update
parent
9f21a62c1055
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/python/build_pyrte3.com
+1
-1
1 addition, 1 deletion
src/python/build_pyrte3.com
src/python/pyrte.c
+1451
-922
1451 additions, 922 deletions
src/python/pyrte.c
src/python/readmore.html
+116
-62
116 additions, 62 deletions
src/python/readmore.html
with
1568 additions
and
985 deletions
src/python/build_pyrte3.com
+
1
−
1
View file @
aff157d9
...
...
@@ -64,7 +64,7 @@
$!
$ SET NOON
$ SET VERIFY
$ LINK /THREADS_ENABLE/EXECUTABLE=WASD_EXE:PYRTE.EXE -
$ LINK /THREADS_ENABLE/EXECUTABLE=WASD_EXE:PYRTE
3
.EXE -
[.OBJ_'ARCH_NAME']PYRTE.OBJ, -
SYS$INPUT:/OPTIONS
IDENTIFICATION="PYRTE 3.0.0"
...
...
This diff is collapsed.
Click to expand it.
src/python/pyrte.c
+
1451
−
922
View file @
aff157d9
This diff is collapsed.
Click to expand it.
src/python/readmore.html
+
116
−
62
View file @
aff157d9
...
...
@@ -88,5 +88,7 @@
<center>
<h1>
Python Run-Time Environment
</h1>
<h3
style=
"margin-bottom:0;"
>
Version 1.1.12, 30th July 2017
</h3>
<h3>
~~~ PRE-RELEASE ~~~
</h3>
<h3>
Version 2.0.0, 8th September 2020
<br>
Version 3.0.0, 8th September 2020
</h3>
...
...
@@ -92,5 +94,5 @@
<p><b>
Copyright
©
2007-20
17
Mark G. Daniel
</b>
<p><b>
Copyright
©
2007-20
20
Mark G. Daniel
</b>
<br>
This program, comes with ABSOLUTELY NO WARRANTY.
<br>
This is free software, and you are welcome to redistribute it under the
<br>
conditions of the GNU GENERAL PUBLIC LICENSE, version 3, or any later version.
...
...
@@ -106,6 +108,7 @@
<li><a
href=
"#example"
>
Example Scripts
</a>
<li><a
href=
"#wsgi"
>
Web Server Gateway Interface
</a>
<li><a
href=
"#lever"
>
Leveraging PyRTE
</a>
<li><a
href=
"#WATCHing"
>
WATCHing Scripts
</a>
<li><a
href=
"#problems"
>
Problems
</a>
<li><a
href=
"#releases"
>
Releases
</a>
<li><a
href=
"#ackn"
>
Acknowlegements
</a>
...
...
@@ -128,10 +131,10 @@
command-line OpenVMS Python. Alpha (AXP) and Itanium object modules are
provided for the VMS platforms available for Python.
<p>
<span
class=
"pyrte"
>
PyRTE
</span>
has been developed and tested on
VMS V8.3
and
V8.4, Alpha and
Itanium, using WASD
v10.
<i>
n
</i>
and
v11.
<i>
n
</i>
and VMS
Python kits PYTHON272 and PYTHON278 available
from and documented at
<p>
<span
class=
"pyrte"
>
PyRTE
</span>
has been developed and tested on
V8.4, Alpha and Itanium, using WASD v11.
<i>
n
</i>
and VMS
Python kits available
from and documented at
<a
target=
"_blank"
href=
"https://www.vmspython.org/"
>
https://www.vmspython.org/
</a>
. JFP's
Python kits are kept very up-to-date as Python updates or implementation
problems arise.
...
...
@@ -134,7 +137,13 @@
<a
target=
"_blank"
href=
"https://www.vmspython.org/"
>
https://www.vmspython.org/
</a>
. JFP's
Python kits are kept very up-to-date as Python updates or implementation
problems arise.
<p>
<b>
FYI:
</b>
Beginning August 2020, PyRTE underwent significant rework
prompted by the pre-release of JFP's Python v3.10 port. The core PyRTE code
now supports both Python 2.7 and 3.10 as independent builds and executables.
PyRTE reports itself as v2.
<i>
n
</i>
.
<i>
n
</i>
for the Python 2.7 build, and as
v3.
<i>
n
</i>
.
<i>
n
</i>
for Python 3.10.
<a
name=
"install"
>
<h2>
Installation
</h2>
</a>
...
...
@@ -179,9 +188,13 @@
$ SET DEFAULT WASD_ROOT:[SRC.PYTHON]
$ @BUILD_PYRTE LINK
</pre>
For Python 3:
<pre
class=
"code"
>
$ @BUILD_PYRTE3 LINK
</pre>
<li>
Copy the
<span
class=
"pyrte"
>
PyRTE
</span>
engine to the script executable location.
<pre
class=
"code"
>
$ COPY WASD_EXE:PYRTE.EXE CGI_EXE:
</pre>
...
...
@@ -182,9 +195,13 @@
<li>
Copy the
<span
class=
"pyrte"
>
PyRTE
</span>
engine to the script executable location.
<pre
class=
"code"
>
$ COPY WASD_EXE:PYRTE.EXE CGI_EXE:
</pre>
For Python 3:
<pre
class=
"code"
>
$ COPY WASD_EXE:PYRTE3.EXE CGI_EXE:
</pre>
<li>
<a
href=
"#configure_wasd"
>
Configure
</a>
the Web server.
...
...
@@ -188,7 +205,7 @@
<li>
<a
href=
"#configure_wasd"
>
Configure
</a>
the Web server.
<p><li>
Start scripting
<
tt>
:^)
</tt
>
<p><li>
Start scripting
<
span
style=
"font-size:130%;"
>
☺
</span
>
<br>
Try the
<a
href=
"#example"
>
example scripts
</a>
.
</ul>
...
...
@@ -211,7 +228,7 @@
<ul>
<li>
Server global configuration
(HTTPD$CONFIG)
can be used to indicate which
file types
should activate the Python engine and how perform non-script access.
<li>
Server global configuration can be used to indicate which
file types
should activate the Python engine and how perform non-script access.
<pre
class=
"code"
>
...
...
@@ -216,6 +233,6 @@
<pre
class=
"code"
>
#
HTTPD$CONFIG
#
WASD_CONFIG_GLOBAL
[DclScriptRunTime]
.PY $CGI-BIN:[000000]PYRTE
[AddType]
...
...
@@ -224,7 +241,15 @@
.PYO application/octet-stream Python optimised byte-code
</pre>
For Python 3:
<pre
class=
"code"
>
# WASD_CONFIG_GLOBAL
[DclScriptRunTime]
.PY $CGI-BIN:[000000]PYRTE3
</pre>
<li>
The following rules require the Python script files to be located in the
site administrator controlled /cgi-bin/ path.
<pre
class=
"code"
>
...
...
@@ -227,9 +252,9 @@
<li>
The following rules require the Python script files to be located in the
site administrator controlled /cgi-bin/ path.
<pre
class=
"code"
>
#
HTTPD$
MAP
#
WASD_CONFIG_
MAP
exec /py-bin/* (cgi_exe:pyrte)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
...
...
@@ -232,8 +257,16 @@
exec /py-bin/* (cgi_exe:pyrte)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
For Python 3:
<pre
class=
"code"
>
# WASD_CONFIG_MAP
exec /py-bin/* (cgi_exe:pyrte3)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
<li>
Alternatively, to automatically map scripts ending in .py to the RTE
engine.
<pre
class=
"code"
>
...
...
@@ -236,10 +269,10 @@
<li>
Alternatively, to automatically map scripts ending in .py to the RTE
engine.
<pre
class=
"code"
>
#
HTTPD$
MAP for automatic RTE usage
#
WASD_CONFIG_
MAP
for automatic RTE usage
map /cgi-bin/*.py* /py-bin/*.py*
exec /py-bin/* (cgi_exe:pyrte)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
...
...
@@ -241,10 +274,17 @@
map /cgi-bin/*.py* /py-bin/*.py*
exec /py-bin/* (cgi_exe:pyrte)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
For Python 3:
<pre
class=
"code"
>
exec /py-bin/* (cgi_exe:pyrte3)/cgi-bin/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
<li>
The following rule would allow .py type files anywhere in the mapped
directory structure to be executed. This may be what is desired but might be
dangerous in some circumstances.
<pre
class=
"code"
>
...
...
@@ -246,9 +286,9 @@
<li>
The following rule would allow .py type files anywhere in the mapped
directory structure to be executed. This may be what is desired but might be
dangerous in some circumstances.
<pre
class=
"code"
>
#
HTTPD$
MAP
#
WASD_CONFIG_
MAP
exec /web/**.py* /web/*.py* \
script=syntax=unix script=query=none map=once ods=5
</pre>
...
...
@@ -260,7 +300,7 @@
detail).
<pre
class=
"code"
>
#
HTTPD$
MAP
#
WASD_CONFIG_
MAP
exec /appx/**.py* /appx_root/*.py* \
script=syntax=unix script=query=none map=once ods=5 \
script=as=USERX
...
...
@@ -270,8 +310,8 @@
following configuration.
<pre
class=
"code"
>
#
HTTPD$
MAP
#
WASD_CONFIG_
MAP
exec /py-bin/* (cgi_exe:pyrte)/wasd_root/src/python/scripts/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
...
...
@@ -274,7 +314,14 @@
exec /py-bin/* (cgi_exe:pyrte)/wasd_root/src/python/scripts/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
For Python 3:
<pre
class=
"code"
>
exec /py-bin/* (cgi_exe:pyrte3)/wasd_root/src/python/scripts/* \
script=syntax=unix script=query=none map=once ods=5
</pre>
Note that the location of the above example scripts has changed to [.SCRIPTS]
since the v1.0 release.
...
...
@@ -448,6 +495,51 @@
$ HTTPD/DO=DELETE
</pre>
<a
name=
"WATCHing"
>
<h2>
WATCHing Scripts
</h2>
</a>
<p>
Debugging is always fun
<span
style=
"font-size:130%;"
>
☹
</span>
<p>
PyRTE provides some execution data via the WATCH report [X]Script item.
For example (note the SCRIPTs):
<pre
class=
"code"
style=
"width:100%;;padding-right:40%;"
>
|00:30:50.08 SERVICE 1735 093001 CONNECT VIRTUAL klaatu.local:443|
|00:30:50.08 REQUEST 4318 093001 REQUEST GET /py-bin/wsgi_test3.py|
|00:30:50.09 CACHE 0604 093001 RESPONSE CACHE search path 5F1A99EFCB98C60126B8F244110E5BDD|
|00:30:50.09 DCL 1572 093001 RESPONSE SCRIPT as HTTP$NOBODY RTE /py-bin/wsgi_test3.py wasd_root:[src.python.scripts]wsgi_test3.py ($cgi_exe:pyrte.exe)|
|00:30:50.10 DCL 7962 125001 SCRIPT PYRTE AXP-2.0.0 Python 2.7.18 (default, Jul 23 2020, 17:40:05) [DECC]|
|00:30:50.10 DCL 7945 093001 SCRIPT RTE caching /py-bin/wsgi_test3.py /WASD_ROOT/src/PYTHON/SCRIPTS/wsgi_test3.py|
|00:30:50.10 DCL 7945 093001 SCRIPT CACHE new 1/1|
|00:30:50.10 DCL 7945 093001 SCRIPT LOAD /py-bin/wsgi_test3.py /WASD_ROOT/src/PYTHON/SCRIPTS/wsgi_test3.py|
|00:30:50.10 DCL 7945 093001 SCRIPT CODE /WASD_ROOT/src/PYTHON/SCRIPTS/wsgi_test3.py|
|00:30:50.11 DCL 7945 093001 SCRIPT EVAL /py-bin/wsgi_test3.py|
|00:30:50.12 DCL 7945 093001 SCRIPT PYRTE AXP-2.0.0 USAGE:1/19 REAL:00:00:00.02 CPU:0.02 DIO:3 BIO:36 FAULTS:0 PGFL:463040/8%|
|00:30:50.12 GZIP 0608 093001 RESPONSE DEFLATE 1289->507 bytes, 39% (261kB)|
|00:30:50.12 REQUEST 1438 093001 REQUEST STATUS 200 (OK) rx:78 tx:2415 bytes 1.045832 seconds 2,383 B/s|
</pre>
<p>
Any reportable script error is indicated.
<pre
class=
"code"
style=
"width:100%;padding-right:20%;"
>
|00:33:50.17 DCL 7962 265001 SCRIPT EVAL /py-bin/pyrte_test3.py|
|00:33:56.82 DCL 7962 265001 SCRIPT ERROR
<
type 'exceptions.RuntimeError'
>
'logical name PYRTE_CACHE_ENTRY not defined'|
</pre>
<p>
It is also possible to add items from within the script Python code using
the wasd.WATCH() function. The example /py-bin/pyrte_test1.py script contains
the statement
<tt>
wasd.WATCH('and hello [x]Script')
</tt>
<pre
class=
"code"
style=
"width:100%;padding-right:25%;"
>
|00:35:15.05 DCL 7945 057001 SCRIPT RTE caching /py-bin/pyrte_test1.py /WASD_ROOT/src/PYTHON/SCRIPTS/pyrte_test1.py|
|00:35:15.05 DCL 7945 057001 SCRIPT CACHE new 1/1|
|00:35:15.05 DCL 7945 057001 SCRIPT LOAD /py-bin/pyrte_test1.py /WASD_ROOT/src/PYTHON/SCRIPTS/pyrte_test1.py|
|00:35:15.05 DCL 7945 057001 SCRIPT CODE /WASD_ROOT/src/PYTHON/SCRIPTS/pyrte_test1.py|
|00:35:15.06 DCL 7945 057001 SCRIPT EVAL /py-bin/pyrte_test1.py|
|00:35:15.07 DCL 7945 057001 SCRIPT WATCH and hello [x]Script|
|00:35:15.07 DCL 7945 057001 SCRIPT PYRTE AXP-2.0.0 USAGE:1/1 REAL:00:00:05.10 CPU:5.06 DIO:65 BIO:1060 FAULTS:870 PGFL:476448/5%|
</pre>
<a
name=
"problems"
>
<h2>
Problems?
</h2>
</a>
...
...
@@ -481,8 +573,17 @@
<dl>
<dt>
v3.0.0
08-SEP-2020 ~~~ PRE-RELEASE ~~~
</dt>
<dd>
•
Python version 3.10.0a0
</dd>
</dd>
<dt>
v2.0.0
08-SEP-2020 ~~~ PRE-RELEASE ~~~
</dt>
<dd>
•
Python version 2.7.18
</dd>
</dd>
</dd>
<dt>
v1.1.12
30-JUL-2017
</dt>
<dd>
•
wasd.cgi_callout()
<dd>
•
bugfix
</dd>
...
...
@@ -484,56 +585,9 @@
<dt>
v1.1.12
30-JUL-2017
</dt>
<dd>
•
wasd.cgi_callout()
<dd>
•
bugfix
</dd>
<dt>
v1.1.11
20-JUN-2013
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.10
05-NOV-2011
</dt>
<dd>
•
Python 2.7.2, see changes to includes
</dd>
<dt>
v1.1.9
27-FEB-2011
</dt>
<dd>
•
/CLI= to allow a command-line script activation
<dd>
•
logical PYRTE_METRICS enables "?$metrics$" report
</dd>
<dt>
v1.1.8
20-JUL-2010
</dt>
<dd>
•
WASD v10.1 proctor detect
</dd>
<dt>
v1.1.7
17-MAY-2010
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.6
30-APR-2010
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.5
29-APR-2010
</dt>
<dd>
•
PYRTE_HEAD_CVT_GET and script=param=PYRTE=/HEAD=GET
</dd>
<dt>
v1.1.4
08-DEC-2009
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.3
07-DEC-2009
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.2
19-APR-2008
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.1
17-JAN-2008
</dt>
<dd>
•
bugfix
</dd>
<dt>
v1.1.0
05-JAN-2008
</dt>
<dd>
•
WSGI support
</dd>
</dd>
⋮
<dt>
v1.0.0
22-APR-2007
</dt>
<dd>
•
initial
</dd>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment