I have created a simple Tkinter GUI. I have a function that needs to be
executed automatically upon launching the GUI application. How can it be
done?
--
View this message in context:
http://www.nabble.com/How-to-automatically-run-some-code-upon-GUI-startup--tp16547636p16547636.html
Sent from
snakey wrote:
>
> Hi Fredrik,
> Thanks for the suggestion. Let me try it now. I guess I need a deeper
> understanding of this mainloop() thing. I am still unclear about how the
> whole GUI concept of mainloop() works.
>
Fredrik Lundh wrote:
>
> Snakey wrote
would think that the root window is exited by using the "X" windows close
button? If this is the case, you can bind the window manager event
WM_DELETE_WINDOW to a handler. Try this:
root = Tk()
...
... some other codes
# --
# to bind the window manager's CLOSE event to
I have created a GUI which has a button that when pressed, opens a Dos prompt
box. I am using os.system( '.somepath...\.\cmd.exe' ). In this dos box,
the user can run watever application he wants eg. execute a batchfile or run
dos commands.
1. I need the GUI to monitor this dos box such that
I have written a Tk GUI that upon pressing a button, will launch a subprocess
to open a dos-box "cmd.exe".
I need the GUI to monitor the returncode of this subprocess, so that when
the dos box closes with return code 0, a subroutine can be executed to
handle this event. BUT while the dos box is
piping is taking
place. Can this be done??
I tried >>>
s = subprocess.popen( 'cmd.exe', stdout=subprocess.PIPE )
# when the new process ends, I do the following:
out = s.stdout.readlines()
# i do some string action on out
Snakey wrote:
>
> I have created a GUI which ha
I created a text widget to allow my users to enter some lines of text. Now I
need to dump all the text contents into a string variable. How can i do
that?
--
View this message in context:
http://www.nabble.com/how-to-get-all-the-text-from-a-text-widget--tp17053954p17053954.html
Sent from the P
I have written some functions in "my_functions.py".
I need to use these functions in another program main.py.
But, "my_functions.py" cannot reside in my local work folder. It resides in
a shared directory somewhere else eg. in X:\shared\my_functions.py
How can I import my_functions.py into m
Hi Polo,
Thanks for the tip!
Guilherme Polo wrote:
>
> Snakey yahoo.com> writes:
>
>>
>>
>> I created a text widget to allow my users to enter some lines of text.
>> Now I
>> need to dump all the text contents into a string variable. How ca