Jython file manipulation?!

Andreas Ulbrich ulbi at ivs.tu-berlin.de
Tue Sep 24 02:56:32 EDT 2002


Matthew Bonig wrote:
> There are no exceptions raised...
> If you look at the source Jython uses for the os.rename function it just
> uses Java's File.renameTo()...
> that function returns false... which then the os.rename function throws a
> OSError exception, but it's not helpful in any way.
> The only thing I can think is happening is that I am doing this renaming on
> files that are on a netword drive on a win32 box, but I have double
> checked... the new filename is NOT there... (since win32 won't overwrite the
> new file if it exists, and therefore return an error, but that's not
> happening). I've also double checked to make sure I have write permissions
> on the network drive, which I most definetly do (I usually write 3-5 files
> onto that drive a day).
> This is why I thought there might be some sort of security issue with
> Jython... I'm pretty sure it's in the Jython side since when I tried exactly
> the same thing (os.rename(oldfilename, newFilename)) in python it worked
> perfectly.

Sounds weird. Have you tried to write a java program and check the 
results? Maybe it's an java issue ... Which java you are using?




More information about the Python-list mailing list