473,385 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Text not showing up

Hi all, I am new to python and trying to write a simple GUI that would
call 2 growisofs processes (dvd burning) at the same time, and retrive
the exit code to be printed on a text box (couldn't find any program
that could use multiple dvd burners, not even k3b). Excuse me if this is
really a simple problem, but two days of googling didn't help.
The program is really simple, I developed the GUI using glade and it
works.
The only thing I would like to improve is that I'd like it to show in
the text boxes messages like "Waiting for use input" or "Burning dvd
please wait", but it looks like even though I don't have any error, the
message won't show up until the burning process is finished (showing
either "burning successfully" or "an error occurred").
I am not sure I made myself clear on this, but I will post the relevant
code trying to explain it:

import os, sys
import gtk.glade

class DVD:
def __init__(self):
print "Initializing the Graphic User Interface: This may take
some time"
self.xml=gtk.glade.XML("./dvd2.xml")
self.window=self.xml.get_widget("dvd")
self.xml.signal_connect('on_quit_clicked', self.Quit)
self.xml.signal_connect('on_burn_clicked', self.Burn)

self.OrdKeys=["comboentry1","entry1","spinbutton1","entry2","esi totext","esitotext1"]
# here esitotext is the box I want the text to show up

def Quit(self, *args):
gtk.mainquit()

def Burn(self, *args):

comand=""
comand2=""

name=self.xml.get_widget("entry1").get_text() #name
for the dvd
path=self.xml.get_widget("comboentry1").get_text() #path to
dvd AUDIO_TS and VIDEO_TS
num=self.xml.get_widget("spinbutton1").get_text() #chosing
the number of dvd to burn
pub=self.xml.get_widget("entry2").get_text()
#publisher
self.xml.get_widget("esitotext").set_text("Waiting for
input") # THIS NEVER SHOWS UP
dvd1="/dev/hda" # this is the first dvd
burner, edit as needed
dvd2="/dev/hdc" # this is the second dvd
burner, edit as needed

comand+="growisofs -dvd-compat -Z "+dvd1+" -dvd-video -V
"+name+" -publisher "+pub+" "+path
comand2+="growisofs -dvd-compat -Z "+dvd2+" -dvd-video -V
"+name+" -publisher "+pub+" "+path
if num == "1":
self.xml.get_widget("esitotext").set_text("Burning the dvd,
please wait") # THIS NEVER SHOWS UP, unless i have an error and
the program

# quits
before executing the command
self.xml.get_widget("esitotext").show()
# don't know if this is correct,
but it doesn't work either
f = os.popen(comand, 'r')
line = f.readline()

error_in_prog = f.close()
if error_in_prog:
error=str(error_in_prog)
self.xml.get_widget("esitotext").set_text("An error
occurred. Burn not completed") # THIS COMES UP as it should
self.xml.get_widget("esitotext").show()
else:
self.xml.get_widget("esitotext").set_text("Burn
completed successfully") # THIS COMES UP as it should
self.xml.get_widget("esitotext").show()
if __name__=='__main__':
main=DVD()
gtk.main()
Any comment, help, url, really appreciated.

Have a nice day
Simone

Oct 14 '05 #1
0 1262

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Daniel Hill | last post by:
OK, I have very, VERY basic background knowledge of VB6 and have now upgraded to VB.NET and now I'm struggling to bring up the forms I want. What I am looking to do is to have a click a command...
1
by: Schu | last post by:
I am trying to show a grid in a text box in an aspx page but I am not able to convert the GUID to a string. Here is the line I am trying to get to work: textbox1.text =...
2
by: Jasim Iqbal | last post by:
hi all i ran into thi sproblem this monday and still havent been able to figure out why the list view control is not showing the complete text string the original strings i want to be displayed...
7
by: trint | last post by:
I have a textbox (textBox7) that isn't updating.. Is there a way, after I type new text in it, to have it update? It seems to be fairly normal: public class Form1 : System.Windows.Forms.Form {...
1
by: Alpha | last post by:
I'm working with a Window based application. I have a small form with just 1 label control which is set as Enabled and Visible. Its text is in black telling users to please wait while application...
3
by: pesani | last post by:
Hi experts, I defined two integer values in the class. Like this public class IntegerClass public ID1 as Int32 public ID2 as Int32 End Class then iam instantiating this class and...
2
by: melanieab | last post by:
Hi, Is there an easy way to say, on textboxHover, if the text inside the box isn't completely visible, have a popup tool come up showing the complete contents of the box? I'm guessing I need to...
1
by: Darsin | last post by:
What i am doing is to pull the data from a CMS and import it to Word 2007 Beta and i also have to export the data from Word 2007 Beta back to that CMS. We have with us two Web Services of the CMS....
1
by: vishwaramkumar | last post by:
Hi folks, I am beginner to tk. I have right simple code for tk. When i run as .pl the text content(lable,button) showing. But after conveting exe. The text in a tk(form) is not viewable it's...
0
by: yatinbvn | last post by:
hi , my name is yatin i have creating swt text with vertical scroll bar in shell, my question is: vertical scroll bar thumb is still visible in swt text when its size is not increase , i want...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.