After reinstalling Python, installing a real proxy server on my PC and giving pip a --proxy to that then I managed to get it working too.
Next problem: getting venv working.
defining system data structures
-
- Senior Member
- Posts: 583
- Joined: Fri Apr 17, 2020 7:31 pm
- Reputation: 0
- Location: Rhode Island, USA
- Status: Offline
- Contact:
Re: defining system data structures
And a few SET PROT=(W:RE) to give everyone access to the installed.
Re: defining system data structures
Hi Ian,
JF
If I remember correctly, you have installed the ovms module (https://foss.vmsgenerations.org/openvms ... /vmspython), all you need is include in it (and much more...)imiller wrote: ↑Fri Apr 26, 2024 4:44 amwhen dabbling in lua I wrote the following little thing that reports ages of files on a disk.
As you can see it defines various file system data structures and uses those definitions when scanning indexf.sys
.
How would I do definitions like this in python?
...
JF
-
- Active Contributor
- Posts: 42
- Joined: Tue Jan 10, 2023 10:41 am
- Reputation: 0
- Location: Waterloo, Ontario, Canada
- Status: Offline
- Contact:
Re: defining system data structures
I've been working with Python for more than 5 years on various systems. Who ever attempts the initial port usually needs to start by writing system specific glue, so you might want to poke around to find some stuff that you can use, rather than writing your own stuff. On my OpenVMS system, lots of VMS specific stuff can be found here.
Code: Select all
$ set proc /case=sens/parse=extended
$ set def KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.vms]
$ dir
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.vms]
accdef.py;1 acldef.py;1 acrdef.py;1 armdef.py;1
brkdef.py;1 capdef.py;1 chpdef.py;1 ciadef.py;1
clidef.py;1 cmbdef.py;1 cvtfnmdef.py;1 dcdef.py;1
decc.py;1 dmtdef.py;1 dpsdef.py;1 dscdef.py;1
dtr.py;2 dvidef.py;1 dvsdef.py;1 efndef.py;1
eradef.py;1 fabdef.py;1 fdldef.py;1 fpdef.py;1
fscndef.py;1 iccdef.py;1 ile3.py;1 iledef.py;1
impdef.py;1 indexedfile.py;1 initdef.py;1 iodef.py;1
issdef.py;1 jbcmsgdef.py;1 jpidef.py;1 kgbdef.py;1
lckdef.py;1 lib.py;1 libclidef.py;1 libdtdef.py;1
libfisdef.py;1 lkidef.py;1 lnmdef.py;1 maildef.py;1
mntdef.py;1 nsadef.py;1 ossdef.py;1 pcbdef.py;1
ppropdef.py;1 pqldef.py;1 prcdef.py;1 prdef.py;1
prvdef.py;1 prxdef.py;1 pscandef.py;1 psldef.py;1
pxbdef.py;1 quidef.py;1 rabdef.py;1 rec.py;1
regdef.py;1 rmidef.py;1 rms.py;1 rmsdef.py;1
rsdmdef.py;1 sdvdef.py;1 sjcdef.py;1 ssdef.py;1
statedef.py;1 stenvdef.py;1 stsdef.py;1 syidef.py;1
sys.py;1 uafdef.py;1 uaidef.py;1 __init__.py;1
__pycache__.DIR;1
Total of 77 files.
$!
$! =====================================================================
$! Poke around to get ideas for how to call decc functions like getenv()
$! Always ignore stuff under __pycache__
$! =====================================================================
$ set def KAWC09$DKB0:[SYS0.SYSCOMMON.python]
$ dir [...]*decc*.*/date/size/width=file=40
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.lib-dynload]
_decc.exe;1 69 17-OCT-2022 09:39:47.29
Total of 1 file, 69 blocks.
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.test]
test_codeccallbacks.py;1 82 14-OCT-2022 09:26:44.15
test_vms_decc.py;1 7 14-OCT-2022 09:26:45.26
Total of 2 files, 89 blocks.
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.test.__pycache__]
test_codeccallbacks^.cpython-310.pyc;2 56 16-AUG-2023 09:11:25.99
test_vms_decc^.cpython-310.pyc;2 9 16-AUG-2023 09:11:46.57
Total of 2 files, 65 blocks.
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.vms]
decc.py;1 3 14-OCT-2022 09:26:51.43
Total of 1 file, 3 blocks.
Directory KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.vms.__pycache__]
decc^.cpython-310.pyc;2 3 16-AUG-2023 09:11:52.65
Total of 1 file, 3 blocks.
Grand total of 5 directories, 7 files, 229 blocks.
$
$!
$! see how to do various system calls
$!
$ set def KAWC09$DKB0:[SYS0.SYSCOMMON.python.lib.python3^.10.test]
$ type test_vms_sys.py
Last edited by neilrieck on Thu Sep 12, 2024 9:55 am, edited 1 time in total.