[Python-bugs-list] [Bug #122625] Using os.system() does not execute some programs

noreply@sourceforge.net noreply@sourceforge.net
Mon, 27 Nov 2000 13:24:56 -0800


Bug #122625, was updated on 2000-Nov-16 13:29
Here is a current snapshot of the bug.

Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 3
Summary: Using os.system() does not execute some programs

Details: I do not think I can fully explain what is happening. Here is my attempt.
I use Python as a scripting to run large programs. Sometimes the code I expect python to run in os.system(command) does not run. I cannot figure out why it does not run. 

My guess is that os.system() cannot execute large programs (sometimes?). Becuase when I run
	command = "XYZ"   # whatever long program
	print command
	os.system(command)
it sometimes works. I have not just piped it to tcsh as 
	command = "XYZ"
	print command
Take the above program | tcsh
This works all the time.

Follow-Ups:

Date: 2000-Nov-16 13:42
By: gvanrossum

Comment:
We don't have enough information to go on here. What's the platform used?

It may well have to do with the exact contents of "XYZ". Can you give an example of an XYZ that doesn't work? (As a baseline, an example that *does* work for you would be helpful too.)

I'm not sure what you mean by "large program", but I'm suspecting that you mean "a large amount of sh script code". If this is the case, consider using os.popen() to pipe the script into tcsh under control of your program.

I *think* this is not a bug but a "HOWTO" question.

-------------------------------------------------------

Date: 2000-Nov-27 13:24
By: gvanrossum

Comment:
I'll close this, the submitter is clearly not very interested.
-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=122625&group_id=5470