Re: Support for none-core python
Randall Wood <[email protected]> Sat, 4 Apr 2020 10:16:18 -0400
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <[email protected]> |
--===============2015805791200798521== Content-Type: multipart/alternative; boundary="Apple-Mail=_528FDEE6-9EB7-403E-BC09-AE9E0799B5C2" --Apple-Mail=_528FDEE6-9EB7-403E-BC09-AE9E0799B5C2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Assuming you are trying to access USB devices using Jython within the = JMRI Model Railroad software, please ask for assistance on the JMRI = User=E2=80=99s group or GitHub site. Randall > On 02-Apr-2020, at 02:53, Stefan Richthofer = <[email protected]> wrote: >=20 > Using native bindings from Jython is always difficult. =46rom a quick = look at https://github.com/pyudev/pyudev = <https://github.com/pyudev/pyudev> it seems to be using ctypes to access = native code. > Jython has some limited ctypes support but this is often insufficient. = There is a fair chance to get it working via JyNI (I never tested pyudev = but some other ctypes-based libs work). That said, note that JyNI is = still highly experimental. >=20 > Best regards >=20 > Stefan >=20 > Am Do., 2. Apr. 2020 um 08:02 Uhr schrieb Charles Meo = <[email protected] <mailto:[email protected]>>: > Hello all, >=20 > I am using JMRI which includes jython. I'd like to use the python = pyudev module to help control USB devices used by JMRI but it doesn't = seem to be supported in jython. import pyudev throws lots of errors from = inside the jython script. >=20 > Is there a way to make use of this module from inside jython? >=20 > Thank you, >=20 > Charles >=20 > --=20 >=20 >=20 >=20 > <Apulia_email_signature.gif>=09 >=20 > Apulia Grove Olives=20 > 40 Tranter Rd > Toolleen > Victoria 3551 >=20 > M: 0409 258 471=20 > [email protected]=C2=A0 <mailto:[email protected]> > www.apulia-grove.com.au = <http://www.apulia-grove.com.au/>_________________________________________= ______ > Jython-users mailing list > [email protected] = <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/jython-users = <https://lists.sourceforge.net/lists/listinfo/jython-users> > _______________________________________________ > Jython-users mailing list > [email protected] = <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/jython-users = <https://lists.sourceforge.net/lists/listinfo/jython-users> --Apple-Mail=_528FDEE6-9EB7-403E-BC09-AE9E0799B5C2 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D"">Assuming you are trying to access USB devices using Jython = within the JMRI Model Railroad software, please ask for assistance on = the JMRI User=E2=80=99s group or GitHub site.<div class=3D""><br = class=3D""></div><div class=3D"">Randall<br class=3D""><div class=3D""><br= class=3D""></div><div class=3D""><div class=3D""><div><blockquote = type=3D"cite" class=3D""><div class=3D"">On 02-Apr-2020, at 02:53, = Stefan Richthofer <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><div = class=3D"">Using native bindings from Jython is always difficult. =46rom = a quick look at<span class=3D"Apple-converted-space"> </span><a = href=3D"https://github.com/pyudev/pyudev" = class=3D"">https://github.com/pyudev/pyudev</a><span = class=3D"Apple-converted-space"> </span>it seems to be using ctypes = to access native code.</div><div class=3D"">Jython has some limited = ctypes support but this is often insufficient. There is a fair chance to = get it working via JyNI (I never tested pyudev but some other = ctypes-based libs work). That said, note that JyNI is still highly = experimental.</div><div class=3D""><br class=3D""></div><div = class=3D"">Best regards<br class=3D""></div><div class=3D""><br = class=3D""></div><div class=3D"">Stefan<br class=3D""></div></div><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><div = class=3D"gmail_quote" style=3D"caret-color: rgb(0, 0, 0); font-family: = Helvetica; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: normal; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;"><div dir=3D"ltr" class=3D"gmail_attr">Am Do., 2. Apr. 2020 um = 08:02 Uhr schrieb Charles Meo <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>>:<br = class=3D""></div><blockquote class=3D"gmail_quote" style=3D"margin: 0px = 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; = border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div = class=3D""><p class=3D"">Hello all,</p><p class=3D"">I am using JMRI = which includes jython. I'd like to use the python pyudev module to help = control USB devices used by JMRI but it doesn't seem to be supported in = jython.<span class=3D"Apple-converted-space"> </span><b = class=3D"">import pyudev<span = class=3D"Apple-converted-space"> </span></b>throws lots of errors = from inside the jython script.<br class=3D""></p><p class=3D"">Is there = a way to make use of this module from inside jython?</p><p = class=3D"">Thank you,</p><p class=3D"">Charles<br class=3D""></p><div = class=3D"">--<span class=3D"Apple-converted-space"> </span><br = class=3D""><table width=3D"536" cellspacing=3D"0" cellpadding=3D"0" = border=3D"0" class=3D""><tbody class=3D""><tr class=3D""><td width=3D"224"= height=3D"1" class=3D""><br class=3D""></td><td width=3D"150" = height=3D"1" style=3D"background-color: rgb(153, 153, 153);" = class=3D""><br class=3D""></td><td width=3D"162" height=3D"1" = style=3D"background-color: rgb(153, 153, 153);" class=3D""><br = class=3D""></td></tr><tr class=3D""><td rowspan=3D"2" width=3D"224" = class=3D""><span = id=3D"cid:17139a492dfb5de6f2a1"><Apulia_email_signature.gif></span><= /td><td width=3D"150" height=3D"8" class=3D""><br class=3D""></td><td = width=3D"250" height=3D"8" class=3D""><br class=3D""></td></tr><tr = class=3D""><td width=3D"150" valign=3D"top" class=3D""><p = style=3D"font-family: serif; font-size: 12px; line-height: 16px; color: = rgb(51, 51, 51); vertical-align: top;" class=3D""><span style=3D"color: = rgb(255, 51, 0);" class=3D"">Apulia Grove Olives<span = class=3D"Apple-converted-space"> </span></span><br class=3D"">40 = Tranter Rd<br class=3D"">Toolleen<br class=3D"">Victoria = 3551</p></td><td width=3D"250" valign=3D"top" class=3D""><p = style=3D"font-family: serif; font-size: 12px; line-height: 16px; color: = rgb(51, 51, 51); vertical-align: top;" class=3D"">M: 0409 258 471<span = class=3D"Apple-converted-space"> </span><br class=3D""><a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]<span = class=3D"Apple-converted-space"> </span></a><br class=3D""><a = href=3D"http://www.apulia-grove.com.au/" target=3D"_blank" = class=3D"">www.apulia-grove.com.au</a></p></td></tr></tbody></table></div>= </div>_______________________________________________<br = class=3D"">Jython-users mailing list<br class=3D""><a = href=3D"mailto:[email protected]" target=3D"_blank" = class=3D"">[email protected]</a><br class=3D""><a = href=3D"https://lists.sourceforge.net/lists/listinfo/jython-users" = rel=3D"noreferrer" target=3D"_blank" = class=3D"">https://lists.sourceforge.net/lists/listinfo/jython-users</a><b= r class=3D""></blockquote></div><span style=3D"caret-color: rgb(0, 0, = 0); font-family: Helvetica; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: normal; letter-spacing: normal; = text-align: start; text-indent: 0px; text-transform: none; white-space: = normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none; float: none; display: inline !important;" = class=3D"">_______________________________________________</span><br = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none;" class=3D""><span = style=3D"caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: = 12px; font-style: normal; font-variant-caps: normal; font-weight: = normal; letter-spacing: normal; text-align: start; text-indent: 0px; = text-transform: none; white-space: normal; word-spacing: 0px; = -webkit-text-stroke-width: 0px; text-decoration: none; float: none; = display: inline !important;" class=3D"">Jython-users mailing = list</span><br style=3D"caret-color: rgb(0, 0, 0); font-family: = Helvetica; font-size: 12px; font-style: normal; font-variant-caps: = normal; font-weight: normal; letter-spacing: normal; text-align: start; = text-indent: 0px; text-transform: none; white-space: normal; = word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: = none;" class=3D""><a href=3D"mailto:[email protected]" = style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: normal; letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" = class=3D"">[email protected]</a><br style=3D"caret-color:= rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: = normal; font-variant-caps: normal; font-weight: normal; letter-spacing: = normal; text-align: start; text-indent: 0px; text-transform: none; = white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; = text-decoration: none;" class=3D""><a = href=3D"https://lists.sourceforge.net/lists/listinfo/jython-users" = style=3D"font-family: Helvetica; font-size: 12px; font-style: normal; = font-variant-caps: normal; font-weight: normal; letter-spacing: normal; = orphans: auto; text-align: start; text-indent: 0px; text-transform: = none; white-space: normal; widows: auto; word-spacing: 0px; = -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" = class=3D"">https://lists.sourceforge.net/lists/listinfo/jython-users</a></= div></blockquote></div><br class=3D""></div></div></div></body></html>= --Apple-Mail=_528FDEE6-9EB7-403E-BC09-AE9E0799B5C2-- --===============2015805791200798521== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============2015805791200798521== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users --===============2015805791200798521==--