• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jython: os.chdir()

 
Ann
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Is there a way in jython to perform the Python os.chdir()-command ?
We 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: ..

When we tried the dir(os)-command, the chdir-statement was present in the resulting list.
[ February 09, 2004: Message edited by: Barry Gaunt ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found this in the Jython FAQ. So it seems to be a Java VM restriction.
You could try jnios but I don't know anything about it myself, and it looks a little neglected.
-Barry
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic