fcntl required.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fcntl required.

Nikhar Beejawat
Jython 2.7b1 (default:ac42d5644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_45
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named fcntl
>>>
Need to know how I can get the fcntl module for jython. If anyone can help me on jython compiled code for it.



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: fcntl required.

Stefan Richthofer
AfaIk, fcntl is a linux/unix specific module. I suppose that's the reason why Jython does not have it.
However it appears that lwjgl contains java bindings for fcntl https://github.com/LWJGL/lwjgl3-generated/blob/master/java/org/lwjgl/system/linux/Fcntl.java
With some luck you could fix your dependency with a minimal amount of work based on those bindings.
(I did not test them, nor can I confirm how complete the bindings are - it's just a quick shot - hope it's helpful anyway.)
 
If you want to scope windows, it is said to be non-trivial to replace fcntl by windows api calls. However, a quick search pointed me to portalocker:
http://code.activestate.com/recipes/65203/
However it is a higher lever api than fcntl, but I would consider it a good starting point anyway.
 
Cheers
 
Stefan
 
 
Gesendet: Mittwoch, 18. Juni 2014 um 10:27 Uhr
Von: "Nikhar Beejawat" <[hidden email]>
An: [hidden email]
Betreff: [Jython-users] fcntl required.
Jython 2.7b1 (default:ac42d5644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_45
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named fcntl
>>>
Need to know how I can get the fcntl module for jython. If anyone can help me on jython compiled code for it.
 
 
------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems_______________________________________________ Jython-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jython-users

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users
Reply | Threaded
Open this post in threaded view
|

Re: fcntl required.

Stefan Richthofer
Maybe I forgot to clarify that portalocker would not work with Jython since it is based on fcntl in linux-case and pywin32 in windows-case.
I just mentioned it as a starting point if fcntl functionality needs to be ported to windows.
 
Gesendet: Mittwoch, 18. Juni 2014 um 15:05 Uhr
Von: "Stefan Richthofer" <[hidden email]>
An: "Nikhar Beejawat" <[hidden email]>
Cc: [hidden email]
Betreff: Re: [Jython-users] fcntl required.
AfaIk, fcntl is a linux/unix specific module. I suppose that's the reason why Jython does not have it.
However it appears that lwjgl contains java bindings for fcntl https://github.com/LWJGL/lwjgl3-generated/blob/master/java/org/lwjgl/system/linux/Fcntl.java
With some luck you could fix your dependency with a minimal amount of work based on those bindings.
(I did not test them, nor can I confirm how complete the bindings are - it's just a quick shot - hope it's helpful anyway.)
 
If you want to scope windows, it is said to be non-trivial to replace fcntl by windows api calls. However, a quick search pointed me to portalocker:
However it is a higher lever api than fcntl, but I would consider it a good starting point anyway.
 
Cheers
 
Stefan
 
 
Gesendet: Mittwoch, 18. Juni 2014 um 10:27 Uhr
Von: "Nikhar Beejawat" <[hidden email]>
An: [hidden email]
Betreff: [Jython-users] fcntl required.
Jython 2.7b1 (default:ac42d5644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_45
Type "help", "copyright", "credits" or "license" for more information.
>>> import fcntl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named fcntl
>>>
Need to know how I can get the fcntl module for jython. If anyone can help me on jython compiled code for it.
 
 
------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems_______________________________________________ Jython-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jython-users
------------------------------------------------------------------------------ HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing & Easy Data Exploration http://p.sf.net/sfu/hpccsystems_______________________________________________ Jython-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/jython-users

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Jython-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-users