System calls not using correct permissions?

S

skilpat

My Python script is basically glue for a lot of batch files and
whatnot, so it uses os.system liberally. However, there is a strange
problem where the scripts called by os.system do not function correctly
in the Python code, but work fine when I simply copy and paste the
command into the shell myself. I am thinking it's some sort of
permissions issue. The batch files contain multiple calls to other
scripts as well... don't know if that has anything to do with it. I
also set my umask to 0 at the beginning of the [Python] script and
still no luck.

Anyone know what the deal might be?

Thanks,
Scott
 
D

Dan Sommers

On 14 Jul 2005 15:51:52 -0700,

[ os.system doesn't work right, even when I set umask to 0 ]
Anyone know what the deal might be?

It might be anything, but without more details (like what operating
system you're running, what version of Python you're running, an actual
error message, a traceback, what your program is supposed to do that you
think it isn't doing, etc.), it's absolutely impossible for anyone to
make even an educated guess.

See also www.catb.org/~esr/faqs/smart-questions.html.

Regards,
Dan
 
S

skilpat

Oops, yeah I should have mentioned some of that. It's a Linux
environment, and it's running Python 2.2. To my knowledge, the batch
files my program calls run a few processes on some data and generate a
few temporary files. I believe those files are not correctly being
generated. There is an error message in one of the scripts that says
could not find xxx.xxx, which is a temp file it creates. The batch
files are all executed with tcsh.
 
D

Dan Sommers

Oops, yeah I should have mentioned some of that. It's a Linux
environment, and it's running Python 2.2. To my knowledge, the batch
files my program calls run a few processes on some data and generate a
few temporary files. I believe those files are not correctly being
generated. There is an error message in one of the scripts that says
could not find xxx.xxx, which is a temp file it creates. The batch
files are all executed with tcsh.

Again, just a guess, but one of (the many) reasons not to use tcsh is
that it has some very strange (to me, anyway) rules about which startup
files (e.g., .login) to run when. Perhaps one of your such files is
being executed in one case and not the other, and is doing something
relevant to an environment variable or umask.

Regards,
Dan
 

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
474,261
Messages
2,571,308
Members
47,976
Latest member
AlanaKeech

Latest Threads

Top