Permission

G

-g00t©-

--------------( oo )--------------

I don't know if there's a beginner board, just tell me if it's the place;

I tried Python this weekend. I'm java coder and I was looking for handling
names in os. I tried the os.raname('file.ext','nuFile.ext') and I got a
Permission denied error. In the docs, it say that it should work only for
UNIX, than it shouldn't work on XP (if I understood). I'm on XP, should I
declare something to enable permission, or is it common error?

Sorry about that newCommer question, but it would help, I'm on that problem
for a while...

--------------( oo )--------------
guillaumeLaBelle [alias goo©] - Architecture CAAO
 
P

Peter Hansen

-g00t©- said:
I tried Python this weekend. I'm java coder and I was looking for handling
names in os. I tried the os.raname('file.ext','nuFile.ext') and I got a
Permission denied error. In the docs, it say that it should work only for
UNIX, than it shouldn't work on XP (if I understood). I'm on XP, should I
declare something to enable permission, or is it common error?

Always post the *actual* code you ran, and include the full
"traceback" that was printed when it failed.

If you don't, you're causing us to waste time guessing at
the possible answer, suggesting things that aren't relevant
to the particular problem you're having, and generally making
it hard for us to help you.

-Peter
 
L

Larry Bates

The function is os.rename(old, new). If you actually
tried 'os.raname' (as your post suggests) that is an illegal
function. I suspect that you mistyped it in your post,
but Peter's replys is correct. Always copy and paste your
code and your traceback error message so it will be precise.

Permisssion denied means that you don't have permission to
rename this file. Normally this is a rights issue.

BTW-os.rename works on XP.

Larry Bates
Syscon, Inc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top