From: Mark R. <blo...@ho...> - 2001-09-21 12:10:02
|
>From: Sebastien Pierre <Seb...@is...> >To: Mark Robinson <blo...@ho...> >Subject: Re: [Jython-users] no os.chdir() in jython? >Date: Fri, 21 Sep 2001 11:58:50 +0200 > > > > I have just found out that the os module in jython doesn't > > include the os.chdir() method. Can anyone tell me how it's > > functionality is usually achieved in jython? > >From what I know about Java, there is no way to change the current >directory...Thought maybe using the JVM properties, but I don't remember >the property name. Thanks!! I guess the java/jython way to do this is store the path and use the full path when writing files, rather than switching directories. It was probably bad practice anyhow ;), I exhibit lots of that. It does seem strange that java doesn't have these capabilities, is it due to security do you know? cheers blobby > >Cheers, > > -- Sebastien. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp |
From: Sebastien P. <Seb...@is...> - 2001-09-21 12:45:08
|
Mark Robinson wrote: > Thanks!! I guess the java/jython way to do this is store the path > and use the full path when writing files, rather than switching > directories. It was probably bad practice anyhow ;), I exhibit lots > of that. > > It does seem strange that java doesn't have these capabilities, > is it due to security do you know? Well, I don't think it is a "security feature", because applets cannot do what an application can do. As I've said you can set a property in the JVM (something like "java.currentPath"), actually the Ant build tool surely uses that when it runs a new program- maybe you could post on their mailing list... but I'm curious to know why Sun hasen't put a changeCurrentDir in the System class ;) Cheers, -- Sebastien. |