FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Jython: os.chdir()





mike_phi
Hi there all,
Is there a way in jython to perform the Python os.chdir()-command ?

I tried performing os.chdir('..') but the following error occurred:

Traceback (innermost last):
File "<console>", line 1, in ?
File "/home/kdg/jython-2.1/Lib/javaos.py", line 56, in chdir
OSError: [Errno 0] chdir not supported in Java: ..


cheers
mike_phi
Hi there all for those of you that are interested th os module in jython does not support the python chdir funtionality.

there are a few methods around this in the jython community which entail overidding the os module origionally provided.

personally I just addapted my application and in the casses where I needed to us this I called it as a python script and wrapped my necesary Java/jython stuff in a seperate file at least this way I still use the standard jython instalation : )

cheers
Related topics
Reply to topic    Frihost Forum Index -> Computers -> Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.