473,508 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

jython newbee general question docu / os.fstat

Hi there,

unfortunately I am new to Jython and my "Jython Essentials" book is
still in the mail. I looked into the Jython API Doc but could not find
the information.
I am porting a Python library to Jython and some parts are missing. My
question basically is where do I find information on what to use
instead. E.g. I could not find information on the os module. I do not
find the sys module docu either.
The concrete problem is I have something like os.fstat(infile.fileno())
which provokes:
IOError: fileno() is not supported in jpython.
If this question is already documented somewhere please point me to
this direction. I was not able to find it.

Best Regards,
Mark

Feb 5 '06 #1
1 2357
Mark Fink schrieb:
Hi there,

unfortunately I am new to Jython and my "Jython Essentials" book is
still in the mail. I looked into the Jython API Doc but could not find
the information.
I am porting a Python library to Jython and some parts are missing. My
question basically is where do I find information on what to use
instead. E.g. I could not find information on the os module. I do not
find the sys module docu either.
The concrete problem is I have something like os.fstat(infile.fileno())
which provokes:
IOError: fileno() is not supported in jpython.
If this question is already documented somewhere please point me to
this direction. I was not able to find it.


The general problem lies within JAVA. Instead of python that tries to
incorporate os-specific modules, it focuses of a common subset -
excluding lots of functionality. fstat and lots of functions in os are
not available - for example, you can't change the current working
directory. fstat is a posix-call, which is also not available.

The general rule of thumb is: whenever you encounter something missing,
try to find a solution for java. That could e.g. be a JNI-interfaced
special library to access the com-port or something else. If such a
solution exists, use that (its easy enough from jython). If not - bad luck.

Diez
Feb 5 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2101
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
4
3409
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class. Thanx
0
1246
by: Charles Griswold | last post by:
I'm just starting to learn jython prior to embedding it in a larger lava application. On my first try I get the following message C:\Downloaded Files\Jython>java -cp . jython-21 -o jython-2.1...
0
938
by: Mark Fink | last post by:
Hi there, I at the moment port a library from Python to Jython (at lease I try to do so :-))). The library uses the Rexec to form a type adapter to cast parameters given as text into the according...
12
5893
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
8
5979
by: Mark Fink | last post by:
I try to port a server application to Jython. At the moment I use Jython21\Lib\socket.py Currently I do face problems with casting the string "localhost" to the desired value:...
1
6301
by: Lars B | last post by:
Hey guys, I have written a C++ program that passes data from a file to an FPGA board and back again using software and DMA buffers. In my program I need to compare the size of a given file against...
11
5118
by: solarisss | last post by:
I have thousands of files whose exitence needs to be checked. I think fstat is too costly for this. Is there any better way for the same ?
2
1093
by: =?ISO-8859-1?Q?S=E9bastien_Boisg=E9rault?= | last post by:
Frank Wierzbicki and Ted Leung have been hired by Sun. Frank is a key Jython developer and is specifically hired to work full time on Jython, a version of the Python interpreter that runs on top of...
0
7127
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7331
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7501
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5633
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5056
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4713
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3204
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3188
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
424
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.