LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2011, 08:09 AM   #1
laurapt
LQ Newbie
 
Registered: Jul 2011
Posts: 1

Rep: Reputation: Disabled
executing an external command with Python (CGI)


Hi, I need to execute an external command with Python from Web. I know there is subprocess module that executes external programs but I'm trying to execute a command registered for the execution of a program. In this case when I execute my file in the shell everything is Ok, but from the Web it doesn't work. Does anybody know what could be???
 
Old 07-08-2011, 11:18 AM   #2
Guttorm
Senior Member
 
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,453

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi. I don't know much Python, but it's usually permissions. It could other things, like $PATH, $DISPLAY, current directory, selinux, etc. Working on getting the error message is often the easiest way. Does the program write anything to stderr? What is the python code doing with errors?

Last edited by Guttorm; 07-08-2011 at 11:20 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while executing python CGI in apache for wireless application srinuweb86 Linux - Wireless Networking 0 04-29-2009 10:42 AM
Python: catch stdout and stderr from external command Ephracis Programming 9 02-28-2008 08:57 AM
executing CGI scripts from command line mcnscott Programming 7 08-01-2007 08:08 PM
executing perl cgi DanTaylor Programming 4 09-21-2006 06:54 PM
Executing from cgi theonebeyond Programming 4 10-04-2004 11:30 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration