LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-22-2011, 05:51 AM   #1
deepmala8
LQ Newbie
 
Registered: May 2011
Posts: 14

Rep: Reputation: 0
how system call can be used in python


Hi,

I want to call system call in python script like this
system("./add.sh");
But it is giving some error,can anyone help on this,Thanks in advance.

deep
 
Old 09-22-2011, 07:11 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,255

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Well I would search for 'some error' but I do not believe it will help. If you do not provide information I am not sure how you think people can assist?
 
1 members found this post helpful.
Old 09-27-2011, 04:57 AM   #3
deepmala8
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 0
on "make -s unix " reported error is as follws


test_cli_cmd.c:66: error: ignoring return value of ‘system’, declared with attribute warn_unused_result
make[2]: *** [../build/unix/obj/.//test_cli_cmd.o] Error 1
make[1]: *** [test_parser_fsm] Error 2
make: *** [unix] Error 2
 
Old 09-27-2011, 12:28 PM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,255

Rep: Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686Reputation: 2686
Right so it is a C question and almost nothing to do with python. Maybe you might to elaborate a whole lot more and give details on what it is you are trying to do?
What are you building? (ie personal code or something you downloaded)
An error is generally not particularly useful without the associated offending lines of code.

At least try and help us help you.
 
1 members found this post helpful.
Old 09-28-2011, 01:34 AM   #5
deepmala8
LQ Newbie
 
Registered: May 2011
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks for your response....
Actually i have downloaded "cli_parser" code and modifying it for my purpose to prepare a command line interface for user ( cli_parser is written in python i think). for modifications i am writing some shell scripts using 'sed' to add or delete the configuration file content. Hence i am using linux system call "system("./add.sh")" which is giving an error as i mentioned above. Kindly help.
Is there any way to call linux calls .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
calling a system call inside a system call suresh.j Linux - Kernel 1 08-03-2010 10:28 PM
How to call system call from usb driver's code Mr.J Linux - Kernel 4 09-29-2008 04:47 AM
How can i make centos 4.5's system call using vDSO(call *%gs:0x10) instead of int80 tclwp Red Hat 3 08-06-2007 01:07 AM
python, os.system() function. howto use python variables? jhwilliams Programming 5 07-28-2007 02:56 AM
Calling a system call from a system call? Loc_8 Programming 0 09-16-2006 05:21 PM


All times are GMT -5. The time now is 02:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration