File descriptor access in scripting module

Running Ignition 8.1.31 on a Windows machine.

Is there an idiomatic Jython way, or perhaps some way with Java to interact with the file descriptor value (an integer) returned by The return value appears to be some sort of wrapper class and I'm not sure of how to drill down to the actual integer value. Here's a sample from my REPL showing to reproduce the object I'm struggling with:

>>> import os
>>> fd ="exercise.c", os.O_RDWR)
>>> isinstance(fd, int)

Nerd-sniped me.

I put this in a script console:

import os
f ='/home/philip/.screenrc', os.O_RDWR)
print type(f)
fd = f.getFD()
print type(fd)

It yields:

<type ''>
<type ''>

So, not an integer.

The first of those is here:

The second is an internal java type with no exposed way to get the numeric fd.


What you actually trying to do?


A file descriptor priority queue. Just a POC, nothing dedicated to. The current project we have a database table with integer priority column and it works fine. Thank you for poking around :slight_smile: