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

  • SEARCH
  • Home
  • 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 7701719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:03:41+00:00 2026-05-31T23:03:41+00:00

I am trying to export some data like the name of the user to

  • 0

I am trying to export some data like the name of the user to the gui when user pressed login button and username and password are correct… all i want to know is a procedure to export data from this code to the gui like inspite of “Welcome” in the object “boxWelcome” i want to display “welcome $username” (below is my python code nd this is my glade file http://dl.dropbox.com/u/12934567/Login.glade)

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

class login:

    def __init__( self):
        return None

    def giveResult( self,username,password ):
        print username
        if username == nitin and password == sharma:
            return 1
        else:
            return 0

class loginGui:

    def __init__( self ):
        self.builder = gtk.Builder()
        self.builder.add_from_file("Login.glade")

        dic = { 
            "on_buttonExit_clicked" : self.exit,
            "on_buttonLogin_clicked" : self.checkLogin,
            "on_windowMain_destroy" : self.exit,
         }

        self.builder.connect_signals( dic )

    def checkLogin(self, widget):        
        username = self.builder.get_object ("entryUsername")
        password = self.builder.get_object ("entryPassword")
        try:           
            if (username.get_text() == 'nitin' and password.get_text()== 'sharma'):
                        self.builder.get_object("boxWelcome").show()
                        self.builder.get_object ("boxWarning").hide()
            else:
                        self.builder.get_object("boxWarning").show()
                        self.builder.get_object ("boxWelcome").hide()
        except ValueError:
            #self.builder.get_object("hboxWarning").show()
            #self.builder.get_object("entryResult").set_text("ERROR")
            return 0      

        #self.builder.get_object("hboxWarning").hide()
        #self.builder.get_object("image1").hide()
        #self.builder.get_object("entryResult").set_text(thistime.giveResult())

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

loginGui = loginGui()
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-05-31T23:03:43+00:00Added an answer on May 31, 2026 at 11:03 pm

    Why won’t You just set it before showing it?
    self.builder.get_object("boxWelcome").set_text("Welcome %s!" % (username.get_text()))

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

Sidebar

Related Questions

I'm trying to use the primefaces dataExporter to export some data and I have
I am trying to use SDO2SHP.exe in order to export some spatial data from
I am trying to export some data from a SQL Express table to Access
I am trying to export some data from two tables bridged by a third
I'm trying to export some data from MATLAB to a database. I use a
I've spent the last two days trying to get some bloody data to export
I am trying to export some data to Excel. I am using OLEDB 12.
I'm trying to export some API JSON data to a csv, but I only
I am Trying to export xml from some data in C# XDocument doc =
I'm trying to create a CSV export for some data I have. Seems simple

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.