Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7707989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:29:47+00:00 2026-06-01T00:29:47+00:00

i want to make a system call in my python code but the problem

  • 0

i want to make a system call in my python code but the problem is that it breaks the sequence of my original code..

for ex.

def call_host(self):
    self.builder.get_object("windowMain").show()         
    os.system('python Adder.py')
    self.builder.get_object("window1").show()

in above pygtk code once Adder.py is called next line wont execute i want system to execute adder.py and come back to my original code…
thnx in advance

Here is my code for Adder.py

import sys
try:  
    import pygtk  
    pygtk.require("2.0")  
except:  
    pass  
try:  
    import gtk  
except:  
    print("GTK Not Availible")
    sys.exit(1)

class adder:
    result = 0

    def __init__( self, number1, number2 ):    
        return None            

    def giveResult( self,number1,number2 ):    
        self.result = int( number1 ) + int( number2 )    
        return str(self.result)

class adderGui:    
    def __init__( self ):    
        self.builder = gtk.Builder()    
        self.builder.add_from_file("Adder.glade")

        dic = { 
            "on_buttonQuit_clicked" : self.quit,    
            "on_buttonAdd_clicked" : self.add,    
            "on_windowMain_destroy" : self.quit,    
        }

        self.builder.connect_signals( dic )

    def add(self, widget):    
        entry1 = self.builder.get_object ("entry1")    
        entry2 = self.builder.get_object ("entry2")

        try:    
            thistime = adder( entry1.get_text(), entry2.get_text() )
        except ValueError:    
            self.builder.get_object("hboxWarning").show()    
            self.builder.get_object("entryResult").set_text("ERROR")    
            return 0

        self.builder.get_object("hboxWarning").show()

        #self.builder.get_object("image1").hide()

        self.builder.get_object("entryResult").set_text(
            thistime.giveResult(entry1.get_text(), entry2.get_text())
        )

    def quit(self, widget):    
        sys.exit(0)

adderGui = adderGui()    
gtk.main()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:29:48+00:00Added an answer on June 1, 2026 at 12:29 am

    If you use subprocess.Popen, your main program will continue running without “blocking” until the subprocess terminates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a system call in ruby, but rather than wait for
I want to make a custom ASP.NET control that is a subclasse of System.Web.UI.WebControls.Calendar
My os-book says that if you want to add a system call to the
My problem is that I want to execute a python file with an argument
I want make simple call app. I use this code. Intent intent = new
I want to add a system call using KLD in FreeBSD 8.2 that has
My search system has two main parts: index and search. I want to make
I have the python code... but how do i do it in c++? I
I want to get MySQL working with the system Python 2.7 in Mac OS
I've got a QT problem. I want to make my program stop at place

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.