Re: Support for none-core python
Stefan Richthofer <[email protected]> Thu, 2 Apr 2020 08:53:54 +0200
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <CACQYzFL5cPMT6S3to83dGZA1=_eJ7YQrLTHXSdgi7FOFvLN80Q@mail.gmail.com> |
--===============0663405286423594174== Content-Type: multipart/related; boundary="000000000000d0fd4405a2494519" --000000000000d0fd4405a2494519 Content-Type: multipart/alternative; boundary="000000000000d0fd4205a2494518" --000000000000d0fd4205a2494518 Content-Type: text/plain; charset="UTF-8" Using native bindings from Jython is always difficult. From a quick look at 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. Best regards Stefan Am Do., 2. Apr. 2020 um 08:02 Uhr schrieb Charles Meo < [email protected]>: > Hello all, > > 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. > > Is there a way to make use of this module from inside jython? > > Thank you, > > Charles > -- > > > > [image: Apulia Grove Oil logo] > > Apulia Grove Olives > 40 Tranter Rd > Toolleen > Victoria 3551 > > M: 0409 258 471 > [email protected] > www.apulia-grove.com.au > _______________________________________________ > Jython-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jython-users > --000000000000d0fd4205a2494518 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>Using native bindings from Jython is always difficult= . From a quick look at <a href=3D"https://github.com/pyudev/pyudev">https:/= /github.com/pyudev/pyudev</a> it seems to be using ctypes to access native = code.</div><div>Jython has some limited ctypes support but this is often in= sufficient. There is a fair chance to get it working via JyNI (I never test= ed pyudev but some other ctypes-based libs work). That said, note that JyNI= is still highly experimental.</div><div><br></div><div>Best regards<br></d= iv><div><br></div><div>Stefan<br></div></div><br><div class=3D"gmail_quote"= ><div dir=3D"ltr" class=3D"gmail_attr">Am Do., 2. Apr. 2020 um 08:02=C2=A0U= hr schrieb Charles Meo <<a href=3D"mailto:[email protected]">c= [email protected]</a>>:<br></div><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex"> =20 =20 =20 <div> <p>Hello all,</p> <p>I am using JMRI which includes jython. I'd like to use the pytho= n pyudev module to help control USB devices used by JMRI but it doesn't seem to be supported in jython. <b>import pyudev </b>thro= ws lots of errors from inside the jython script.<br> </p> <p>Is there a way to make use of this module from inside jython?</p> <p>Thank you,</p> <p>Charles<br> </p> <div>-- <br> =20 =20 <table width=3D"536" cellspacing=3D"0" cellpadding=3D"0" border=3D"0"= > =20 <tbody> <tr> <td width=3D"224" height=3D"1"><br> </td> <td style=3D"background-color:rgb(153,153,153)" width=3D"150" h= eight=3D"1"><br> </td> <td style=3D"background-color:rgb(153,153,153)" width=3D"162" h= eight=3D"1"><br> </td> </tr> <tr> <td rowspan=3D"2" width=3D"224"><img src=3D"cid:17139a492dfb5de= 6f2a1" alt=3D"Apulia Grove Oil logo" style=3D"vertical-align: top;" width= =3D"187" height=3D"80"></td> <td width=3D"150" height=3D"8"><br> </td> <td width=3D"250" height=3D"8"><br> </td> </tr> <tr> <td width=3D"150" valign=3D"top"> <p style=3D"font-family:serif;font-size:12px;line-height:16px= ;color:rgb(51,51,51);vertical-align:top"> <span style=3D"color:rgb(255,51,0= )"> Apulia Grove Olives </span><br> 40 Tranter Rd<br> Toolleen<br> Victoria 3551</p> </td> <td width=3D"250" valign=3D"top"> <p style=3D"font-family:serif;font-size:12px;line-height:16px= ;color:rgb(51,51,51);vertical-align:top">M: 0409 258 471 <br> <a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected] </a><br> <a href=3D"http://www.apulia-grove.com.au" target=3D"_blank= ">www.apulia-grove.com.au </a></p> </td> </tr> </tbody> </table> </div> </div> _______________________________________________<br> Jython-users mailing list<br> <a href=3D"mailto:[email protected]" target=3D"_blank">Jyt= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/jython-users" rel= =3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listi= nfo/jython-users</a><br> </blockquote></div> --000000000000d0fd4205a2494518-- --000000000000d0fd4405a2494519 Content-Type: image/gif; name="Apulia_email_signature.gif" Content-Disposition: inline; filename="Apulia_email_signature.gif" Content-Transfer-Encoding: base64 Content-ID: <17139a492dfb5de6f2a1> X-Attachment-Id: 17139a492dfb5de6f2a1 R0lGODlhuwBQAMQAANxSFOR5Uu2pkv318umSdPjg2PbVy/K/r/vq5d9gK+ueg+JsP/C0oPTKveaG Y9pDAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAA AAAALAAAAAC7AFAAAAX/ICSOZGmeaKqubOuKQyMENIO8eK7vfO//JgThQSwSBcCkcslsvgYKo5RI cFqv2CwLsZgCAlKGdkwuAwsAKaEAixIBA7N8TjcNEkbHreQoIuuAgVpgfigIRQmCiotKDEZiKYQP bIyVli4DaUQOKwJFkC4HaQqXpXKeb3EqB0WkLgZGB6azWZmfLLBEAS+ourS/TqypuEW7Lr0PxsDL QJKuK7nJL8JUzFgFBgaqdQNGlJ3FL4eI1ksGCpJGAQrfZQ1FAMeFL0NF7eU6AwKaU1IB91l6KVsh CVQLBPxk4dvBgF+/fgazSPrDgh/AFdQoLsSUDlEAAui6TFGoReQDkioK/8Db0SABgIsbUaCRksBG kHpG9mQxYqAFzioudMbMMRNRA4xqxvDcYuQoiwJdUA5tUZSIgm2rjCTSsnQFzq0rbEn7oc+BUyx7 GogkgPVE1ZM4TD7g0dNF1xTR4LKQNLBFAxrr2EiSmkQfnjdSNNqRSxhckR1r2564e+IOORbI+nqd cviNUCCiHl5G0acISn0CJJPoBZYEAgFnTRhZwIKyiXR1U/p74Uh0qyU4fc9FkVdxPQCfSfw0UTRB YykwR5iMqDwPC8tNgwpf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9xgsepEEQpKgbLr4xecvZsQFJglgGXH4JX6pIIJr /OJh4sGfIogxjjjEifdGAEc8XpEaQ6yPHf14RYINqQW9eBchJziePeqNTotcIiAxA8lIEtGQqzNB DS3JRJz08JE35CQRj+gYI4mSiZ0JoJDWdcqF/PCNg2zlJe83n1jKEoe9ACIEJOHIWzJjUNyioi8n eLQ5HXKYOByU1/aFTCIOiGckOGMzcdiZiODkjtO0RjSQo6IdZTOPSiSRG78Zk0FBQkhkIic+QpUh TUBJnSUU0gJyCU8iFgmb9fxlqfJJxLekk5/4KAo0AVrCmeCToNboE0KdEAIAOw== --000000000000d0fd4405a2494519-- --===============0663405286423594174== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0663405286423594174== 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 --===============0663405286423594174==--